Search
lxdream.org :: lxdream :: r558:428cf8528699
lxdream 0.9.1
released Jun 29
Download Now
changeset558:428cf8528699 lxdream-mmu
parent557:37c162b2f1b8
child559:06714bc64271
authornkeynes
dateTue Jan 01 04:56:52 2008 +0000 (16 years ago)
branchlxdream-mmu
Remove the 0.5 texture offsets - it's actually sharper this way
src/drivers/gl_common.c
1.1 --- a/src/drivers/gl_common.c Tue Jan 01 04:55:06 2008 +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 );
.