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);
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);
}
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));
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,
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,