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 558:428cf8528699
prev545:fdcdcd8b9fd1
next561:533f6b478071
author nkeynes
date Tue Jan 01 04:56:52 2008 +0000 (12 years ago)
branchlxdream-mmu
permissions -rw-r--r--
last change Remove the 0.5 texture offsets - it's actually sharper this way
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 01 04:56:52 2008 +0000
1.3 @@ -102,11 +102,11 @@
1.4 {
1.5 float top, bottom;
1.6 if( inverted ) {
1.7 - top = ((float)height) - 0.5;
1.8 - bottom = 0.5;
1.9 + top = ((float)height);
1.10 + bottom = 0;
1.11 } else {
1.12 - top = 0.5;
1.13 - bottom = ((float)height) - 0.5;
1.14 + top = 0;
1.15 + bottom = ((float)height);
1.16 }
1.17
1.18 /* Reset display parameters */
1.19 @@ -156,13 +156,13 @@
1.20 glEnable( GL_BLEND );
1.21 glBlendFunc( GL_ONE, GL_ZERO );
1.22 glBegin( GL_QUADS );
1.23 - glTexCoord2f( 0.5, top );
1.24 + glTexCoord2f( 0, top );
1.25 glVertex2f( x1, y1 );
1.26 - glTexCoord2f( ((float)width)-0.5, top );
1.27 + glTexCoord2f( ((float)width), top );
1.28 glVertex2f( x2, y1 );
1.29 - glTexCoord2f( ((float)width)-0.5, bottom );
1.30 + glTexCoord2f( ((float)width), bottom );
1.31 glVertex2f( x2, y2 );
1.32 - glTexCoord2f( 0.5, bottom );
1.33 + glTexCoord2f( 0, bottom );
1.34 glVertex2f( x1, y2 );
1.35 glEnd();
1.36 glDisable( GL_TEXTURE_RECTANGLE_ARB );
.