I apologize in advance if this question seems confused. The behaviour I am seeing makes no sense to me.
I have a Framebuffer rendering to a texture. I render solid rectangles of red, green, blue of varying opacity to this texture. I then render the texture to the screen (Framebuffer 0). The Framebuffer attached to the texture is persistent, and in each render loop I draw more rectangles to the texture -- eventually filling the screen.
I have found that if I do not set glColor()
to white 100% opacity before rendering the texture to the screen, rectangles of particular colours will not be rendered. That is if glColor(1.f, 0.f, 0.f, 1.f)
is set before rendering the texture, only the blue rectangles will be drawn.
I don't understand why the current colour would have an affect on the rendering of the texture (which I assume is like a blit). I have tried various texParameter(...)
calls to no avail, but I am just guessing.
Thanks.