Now that I have the framebuffer working, I've run into a harder problem. I'm rendering a bunch of polygons and textures to a single texture via the framebuffer as follows.
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, FBO);glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, texture, 0);glClearColor(0.0f, 0.0f, 1.0f, 0.0f);glClear(GL_COLOR_BUFFER_BIT);for (int i = 0; i < nbits; i++) { bits->draw();}glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
The problem is when I try to use this texture it disregards the alpha value of glClearColor and always comes out opaque. The code above will result in a texture which has a blue background for example. If I comment out bits
->draw(); I'll get a solid blue texture. First of all, is what I'm trying to accomplish even possible?
Thanks in advance