dbf-udg

annotate src/post.cc @ 12:1abbed71e9c9

cleanup, copyright statements and notices, readme files
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 20 Feb 2013 05:45:27 +0200
parents 5f99c4c7a9fe
children 6a836b1dc31b
rev   line source
nuclear@12 1 /*
nuclear@12 2 Printblobs - typography display hack
nuclear@12 3 Copyright (C) 2013 John Tsiombikas <nuclear@member.fsf.org>
nuclear@12 4
nuclear@12 5 This program is free software: you can redistribute it and/or modify
nuclear@12 6 it under the terms of the GNU General Public License as published by
nuclear@12 7 the Free Software Foundation, either version 3 of the License, or
nuclear@12 8 (at your option) any later version.
nuclear@12 9
nuclear@12 10 This program is distributed in the hope that it will be useful,
nuclear@12 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
nuclear@12 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
nuclear@12 13 GNU General Public License for more details.
nuclear@12 14
nuclear@12 15 You should have received a copy of the GNU General Public License
nuclear@12 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
nuclear@12 17 */
nuclear@11 18 #include "opengl.h"
nuclear@11 19 #include "post.h"
nuclear@11 20
nuclear@11 21 void overlay(float r, float g, float b, float a)
nuclear@11 22 {
nuclear@11 23 glPushAttrib(GL_ENABLE_BIT);
nuclear@11 24 glDisable(GL_DEPTH_TEST);
nuclear@11 25 glDisable(GL_LIGHTING);
nuclear@11 26
nuclear@11 27 glMatrixMode(GL_MODELVIEW);
nuclear@11 28 glPushMatrix();
nuclear@11 29 glLoadIdentity();
nuclear@11 30 glMatrixMode(GL_PROJECTION);
nuclear@11 31 glPushMatrix();
nuclear@11 32 glLoadIdentity();
nuclear@11 33
nuclear@11 34 glBegin(GL_QUADS);
nuclear@11 35 glColor4f(r, g, b, a);
nuclear@11 36 glTexCoord2f(0, 0); glVertex2f(-1, -1);
nuclear@11 37 glTexCoord2f(1, 0); glVertex2f(1, -1);
nuclear@11 38 glTexCoord2f(1, 1); glVertex2f(1, 1);
nuclear@11 39 glTexCoord2f(0, 1); glVertex2f(-1, 1);
nuclear@11 40 glEnd();
nuclear@11 41
nuclear@11 42 glPopMatrix();
nuclear@11 43 glMatrixMode(GL_MODELVIEW);
nuclear@11 44 glPopMatrix();
nuclear@11 45
nuclear@11 46 glPopAttrib();
nuclear@11 47 }