diff options
author | Brian Paul <[email protected]> | 2005-10-04 15:16:27 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-10-04 15:16:27 +0000 |
commit | 7edf1e80bd7ae3436e352cdb2ab1203afc0d9d33 (patch) | |
tree | e6885eddd2b34dbd00652b247fd5441746bb8ecf /progs/tests/fbotexture.c | |
parent | 9e920fb93cc0c388a9fc727b515dedcf1d2f5d9b (diff) |
glBindTexture changes, new assertions
Diffstat (limited to 'progs/tests/fbotexture.c')
-rw-r--r-- | progs/tests/fbotexture.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/progs/tests/fbotexture.c b/progs/tests/fbotexture.c index e1f10c94185..f348d202f4e 100644 --- a/progs/tests/fbotexture.c +++ b/progs/tests/fbotexture.c @@ -56,7 +56,8 @@ RenderTexture(void) glLoadIdentity(); glTranslatef(0.0, 0.0, -15.0); - /* draw to texture */ + /* draw to texture image */ + glBindTexture(GL_TEXTURE_2D, 0); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, MyFB); glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, TexObj, level); @@ -142,6 +143,7 @@ Display(void) glPushMatrix(); glRotatef(Rot, 0, 1, 0); glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, TexObj); glBegin(GL_POLYGON); glColor3f(0.25, 0.25, 0.25); glTexCoord2f(0, 0); @@ -203,7 +205,7 @@ Init(void) } printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - /* make framebuffer */ + /* gen framebuffer id, delete it, do some assertions, just for testing */ glGenFramebuffersEXT(1, &MyFB); assert(MyFB); assert(!glIsFramebufferEXT(MyFB)); @@ -221,6 +223,7 @@ Init(void) assert(DepthRB); assert(!glIsRenderbufferEXT(DepthRB)); glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, DepthRB); + assert(glIsRenderbufferEXT(DepthRB)); glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, TexWidth, TexHeight); glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT, @@ -233,6 +236,7 @@ Init(void) assert(StencilRB); assert(!glIsRenderbufferEXT(StencilRB)); glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, StencilRB); + assert(glIsRenderbufferEXT(StencilRB)); glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_STENCIL_INDEX, TexWidth, TexHeight); glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT, |