I use OpenGL to render my sprites which work fine with the framework commands except for Godrays and DOF.
The process is first initiated by the following code;
void Begin(void)
{
int vPort[4];
glGetIntegerv(GL_VIEWPORT, vPort);
// Set the projection
glOrtho(0, vPort[2], vPort[3], 0, 1.0, 1000.0);/
// Reset transformation
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
glEnableClientState(GL_VERTEX_ARRAY);
//glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_CULL_FACE);
glCullFace(GL_BACK);
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
}
void End(void)
{
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
//glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisableClientState(GL_VERTEX_ARRAY);
glDisable(GL_TEXTURE_2D);
glDisable(GL_BLEND);
glDisable(GL_CULL_FACE);
glColor4f(1.0, 1.0, 1.0, 1.0);
}
I've had this problem for some time time now and I have worked around it by simply not using Godrays or DOF.
Can anyone please confirm that the code above is all there? Oh, and I call Begin() right after RenderFramework() too. Thanks