Initial revision

This commit is contained in:
jtg
1999-08-19 00:55:39 +00:00
parent f2544d4920
commit afb833d4e8
359 changed files with 145077 additions and 0 deletions

26
progs/util/idproj.c Normal file
View File

@@ -0,0 +1,26 @@
/* idproj.c */
/*
* Setup an identity projection such that glVertex(x,y) maps to
* window coordinate (x,y).
*
* Written by Brian Paul and in the public domain.
*/
void IdentityProjection( GLint x, GLint y, GLsizei width, GLsizei height )
{
glViewport( x, y, width, height );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho( (GLdouble) x, (GLdouble) y,
(GLdouble) width, (GLdouble) height,
-1.0, 1.0 );
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
}