diff options
author | Brian Paul <brianp@vmware.com> | 2009-09-15 17:08:33 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-09-15 18:17:42 -0600 |
commit | 7f86da6c609191dbad1887fe5683dfee087fa909 (patch) | |
tree | 98fbe42be7f101d7a63548a19b6c8b5b92695874 /progs/demos/lodbias.c | |
parent | a016043386045d7cc35d70e42d963704fcae3731 (diff) | |
download | external_mesa3d-7f86da6c609191dbad1887fe5683dfee087fa909.zip external_mesa3d-7f86da6c609191dbad1887fe5683dfee087fa909.tar.gz external_mesa3d-7f86da6c609191dbad1887fe5683dfee087fa909.tar.bz2 |
progs/demos: create a texture object in lodbias.c
Before, we were using the default texture object (name=0). This caused
the intel_generate_mipmap() path to fail since passing texture=0 to
glFramebufferTexture2DEXT() causes us to _unbind_ the texture if present.
Diffstat (limited to 'progs/demos/lodbias.c')
-rw-r--r-- | progs/demos/lodbias.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/progs/demos/lodbias.c b/progs/demos/lodbias.c index 30b1ed1..8d39bd6 100644 --- a/progs/demos/lodbias.c +++ b/progs/demos/lodbias.c @@ -43,6 +43,7 @@ static GLboolean Anim = GL_TRUE; static GLint Bias = 0, BiasStepSign = +1; /* ints avoid fp precision problem */ static GLint BiasMin = -400, BiasMax = 400; static int win = 0; +static GLuint TexObj = 0; static void @@ -214,6 +215,9 @@ static void Init( void ) glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + glGenTextures(1, &TexObj); + glBindTexture(GL_TEXTURE_2D, TexObj); + if (glutExtensionSupported("GL_SGIS_generate_mipmap")) { /* test auto mipmap generation */ GLint width, height, i; |