]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix the picture drawing fix
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 26 Oct 2007 11:44:28 +0000 (11:44 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 26 Oct 2007 11:44:28 +0000 (11:44 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7653 d7cf8633-e32d-0410-b094-e92efae38249

gl_draw.c

index b6d8d065000ea5ebab0d7b3317daf9c3e676b228..6eb9378fab042c45f1be0fe5c0f0bda3e7c71c92 100644 (file)
--- a/gl_draw.c
+++ b/gl_draw.c
@@ -599,8 +599,8 @@ void DrawQ_Pic(float x, float y, cachepic_t *pic, float width, float height, flo
 
       // AK07: lets be texel correct on the corners
       {
-         float horz_offset = 0.5f / width;
-         float vert_offset = 0.5f / height;
+         float horz_offset = 0.5f / pic->width;
+         float vert_offset = 0.5f / pic->height;
 
                   floats[12] = 0.0f + horz_offset;floats[13] = 0.0f + vert_offset;
                   floats[14] = 1.0f - horz_offset;floats[15] = 0.0f + vert_offset;
@@ -855,8 +855,8 @@ void DrawQ_SuperPic(float x, float y, cachepic_t *pic, float width, float height
 
       // AK07: lets be texel correct on the corners
       {
-         float horz_offset = 0.5f / width;
-         float vert_offset = 0.5f / height;
+         float horz_offset = 0.5f / pic->width;
+         float vert_offset = 0.5f / pic->height;
 
          floats[12] = s1 + horz_offset;floats[13] = t1 + vert_offset;
          floats[14] = s2 - horz_offset;floats[15] = t2 + vert_offset;