2.5 filebrowser WIP commit
[blender-staging.git] / source / blender / editors / screen / glutil.c
index 573e89b8bb4bfb8c13d5e7a4d65b53dab43e99a0..74e0bc3852eb4b8854c81829daaaa6cd3f82ba1f 100644 (file)
@@ -462,10 +462,10 @@ void glaDrawPixelsTex(float x, float y, int img_w, int img_h, int format, void *
                        glTexCoord2f((float) (subpart_w-1)/tex_w, 0);
                        glVertex2f(rast_x+subpart_w*xzoom, rast_y);
 
-                       glTexCoord2f((float) (subpart_w-1)/tex_w, (float) subpart_h/tex_h);
+                       glTexCoord2f((float) (subpart_w-1)/tex_w, (float) (subpart_h-1)/tex_h);
                        glVertex2f(rast_x+subpart_w*xzoom, rast_y+subpart_h*yzoom);
 
-                       glTexCoord2f(0, (float) subpart_h/tex_h);
+                       glTexCoord2f(0, (float) (subpart_h-1)/tex_h);
                        glVertex2f(rast_x, rast_y+subpart_h*yzoom);
                        glEnd();
                        glDisable(GL_TEXTURE_2D);