|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-31 23:57:36
|
Module: performous
Branch: opengl2
Commit: b115088a478a826830ecf533144d1eae109381c7
Author: Lasse Karkkainen <tro...@tr...>
Date: Fri Jan 28 23:52:28 2011 +0100
New way of generating mipmaps (GL_GENERATE_MIPMAP has been removed since OpenGL 3.1)
---
game/surface.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/surface.cc b/game/surface.cc
index ec2004e..54fb533 100644
--- a/game/surface.cc
+++ b/game/surface.cc
@@ -95,7 +95,6 @@ void Texture::load(unsigned int width, unsigned int height, pix::Format format,
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 16.0f);
glerror.check("MAX_ANISOTROPY_EXT");
- glTexParameteri(type(), GL_GENERATE_MIPMAP, GL_TRUE);
PixFmt const& f = getPixFmt(format);
glPixelStorei(GL_UNPACK_SWAP_BYTES, f.swap);
// Load the data into texture
@@ -113,6 +112,7 @@ void Texture::load(unsigned int width, unsigned int height, pix::Format format,
// Just don't do it in Surface class, thanks. -Tronic
glTexImage2D(type(), 0, GL_RGBA, newWidth, newHeight, 0, f.format, f.type, &outBuf[0]);
}
+ glGenerateMipmap(type());
}
void Surface::load(unsigned int width, unsigned int height, pix::Format format, unsigned char const* buffer, float ar) {
|