diff options
author | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-07-16 04:05:20 +0400 |
---|---|---|
committer | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-07-16 04:05:20 +0400 |
commit | 07f294cf4a0af8797a46bc4b77ee1084ab2c552e (patch) | |
tree | 0bfd38c30a56f770125060a73949f898bbd07b9f /source/blender/src/drawmesh.c | |
parent | f7a4b6f1d7ce47a21b7c8db9c81a0d1ced93f1bd (diff) |
Fix ATI texture performance under Linux.
glGenTexturesEXT(1, &bind); // produces bind == 0
while:
glGenTextures(1, &bind); // produces bind correctly.
(Ported from tuhopuu2)
Diffstat (limited to 'source/blender/src/drawmesh.c')
-rw-r--r-- | source/blender/src/drawmesh.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/source/blender/src/drawmesh.c b/source/blender/src/drawmesh.c index b06ff19170e..2ef2908cf36 100644 --- a/source/blender/src/drawmesh.c +++ b/source/blender/src/drawmesh.c @@ -85,13 +85,8 @@ //#include "glext.h" /* some local functions */ -#if defined(GL_EXT_texture_object) && (!defined(__sun__) || (!defined(__sun))) && !defined(__APPLE__) - - /* exception for mesa... not according th opengl specs */ - #ifndef __linux__ - #define glBindTexture(A,B) glBindTextureEXT(A,B) - #endif - +#if defined(GL_EXT_texture_object) && (!defined(__sun__) || (!defined(__sun))) && !defined(__APPLE__) && !defined(__linux__) && !defined(WIN32) + #define glBindTexture(A,B) glBindTextureEXT(A,B) #define glGenTextures(A,B) glGenTexturesEXT(A,B) #define glDeleteTextures(A,B) glDeleteTexturesEXT(A,B) #define glPolygonOffset(A,B) glPolygonOffsetEXT(A,B) @@ -392,7 +387,7 @@ int set_tpage(TFace *tface) printf("name: %d, tpx: %d\n", *bind, tpx); printf("tile: %d, mode: %d\n", fCurtile, tilemode); if (error) - printf("error: %d\n", (int)error); + printf("error: %s\n", gluErrorString(error)); } glBindTexture( GL_TEXTURE_2D, *bind); @@ -405,7 +400,7 @@ int set_tpage(TFace *tface) { int minfilter= fLinearMipMap?GL_LINEAR_MIPMAP_LINEAR:GL_LINEAR_MIPMAP_NEAREST; - gluBuild2DMipmaps(GL_TEXTURE_2D, 4, rectw, recth, GL_RGBA, GL_UNSIGNED_BYTE, rect); + gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA, rectw, recth, GL_RGBA, GL_UNSIGNED_BYTE, rect); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, minfilter); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); } |