Search
lxdream.org :: lxdream/src/drivers/gl_common.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/gl_common.c
changeset 586:2a3ba82cf243
prev545:fdcdcd8b9fd1
author nkeynes
date Tue Jan 15 20:50:23 2008 +0000 (13 years ago)
permissions -rw-r--r--
last change Merged lxdream-mmu r570:596 to trunk
file annotate diff log raw
1.1 --- a/src/drivers/gl_common.c Thu Nov 29 09:28:28 2007 +0000
1.2 +++ b/src/drivers/gl_common.c Tue Jan 15 20:50:23 2008 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: gl_common.c,v 1.7 2007-10-31 12:05:23 nkeynes Exp $
1.6 + * $Id$
1.7 *
1.8 * Common GL code that doesn't depend on a specific implementation
1.9 *
1.10 @@ -102,11 +102,11 @@
1.11 {
1.12 float top, bottom;
1.13 if( inverted ) {
1.14 - top = ((float)height) - 0.5;
1.15 - bottom = 0.5;
1.16 + top = ((float)height);
1.17 + bottom = 0;
1.18 } else {
1.19 - top = 0.5;
1.20 - bottom = ((float)height) - 0.5;
1.21 + top = 0;
1.22 + bottom = ((float)height);
1.23 }
1.24
1.25 /* Reset display parameters */
1.26 @@ -156,13 +156,13 @@
1.27 glEnable( GL_BLEND );
1.28 glBlendFunc( GL_ONE, GL_ZERO );
1.29 glBegin( GL_QUADS );
1.30 - glTexCoord2f( 0.5, top );
1.31 + glTexCoord2f( 0, top );
1.32 glVertex2f( x1, y1 );
1.33 - glTexCoord2f( ((float)width)-0.5, top );
1.34 + glTexCoord2f( ((float)width), top );
1.35 glVertex2f( x2, y1 );
1.36 - glTexCoord2f( ((float)width)-0.5, bottom );
1.37 + glTexCoord2f( ((float)width), bottom );
1.38 glVertex2f( x2, y2 );
1.39 - glTexCoord2f( 0.5, bottom );
1.40 + glTexCoord2f( 0, bottom );
1.41 glVertex2f( x1, y2 );
1.42 glEnd();
1.43 glDisable( GL_TEXTURE_RECTANGLE_ARB );
.