nuclear@11: #include "opengl.h" nuclear@11: #include "post.h" nuclear@11: nuclear@11: void overlay(float r, float g, float b, float a) nuclear@11: { nuclear@11: glPushAttrib(GL_ENABLE_BIT); nuclear@11: glDisable(GL_DEPTH_TEST); nuclear@11: glDisable(GL_LIGHTING); nuclear@11: nuclear@11: glMatrixMode(GL_MODELVIEW); nuclear@11: glPushMatrix(); nuclear@11: glLoadIdentity(); nuclear@11: glMatrixMode(GL_PROJECTION); nuclear@11: glPushMatrix(); nuclear@11: glLoadIdentity(); nuclear@11: nuclear@11: glBegin(GL_QUADS); nuclear@11: glColor4f(r, g, b, a); nuclear@11: glTexCoord2f(0, 0); glVertex2f(-1, -1); nuclear@11: glTexCoord2f(1, 0); glVertex2f(1, -1); nuclear@11: glTexCoord2f(1, 1); glVertex2f(1, 1); nuclear@11: glTexCoord2f(0, 1); glVertex2f(-1, 1); nuclear@11: glEnd(); nuclear@11: nuclear@11: glPopMatrix(); nuclear@11: glMatrixMode(GL_MODELVIEW); nuclear@11: glPopMatrix(); nuclear@11: nuclear@11: glPopAttrib(); nuclear@11: }