nuclear@12: /* nuclear@13: Printblobs - halftoning display hack nuclear@12: Copyright (C) 2013 John Tsiombikas nuclear@12: nuclear@12: This program is free software: you can redistribute it and/or modify nuclear@12: it under the terms of the GNU General Public License as published by nuclear@12: the Free Software Foundation, either version 3 of the License, or nuclear@12: (at your option) any later version. nuclear@12: nuclear@12: This program is distributed in the hope that it will be useful, nuclear@12: but WITHOUT ANY WARRANTY; without even the implied warranty of nuclear@12: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nuclear@12: GNU General Public License for more details. nuclear@12: nuclear@12: You should have received a copy of the GNU General Public License nuclear@12: along with this program. If not, see . nuclear@12: */ 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: }