projects
/
dana
/
openbox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
497f624
)
proper co-ords for padded textures
author
Derek Foreman
<manmower@gmail.com>
Mon, 9 Jun 2003 01:09:50 +0000
(
01:09
+0000)
committer
Derek Foreman
<manmower@gmail.com>
Mon, 9 Jun 2003 01:09:50 +0000
(
01:09
+0000)
render2/texture.c
patch
|
blob
|
history
diff --git
a/render2/texture.c
b/render2/texture.c
index 2e65754a4257bdf446c3d22eb05c768dea81edda..36486d7952f0befb3e65b5f28d5df9ea2b969d4c 100644
(file)
--- a/
render2/texture.c
+++ b/
render2/texture.c
@@
-125,13
+125,14
@@
void RrTexturePaint(struct RrSurface *sur, struct RrTexture *tex,
glBegin(GL_TRIANGLES);
glTexCoord2f(0, 0);
glVertex2i(x, y);
- glTexCoord2f(
1
, 0);
+ glTexCoord2f(
w/(float)tex->data.rgba.padw
, 0);
glVertex2i(x+w, y);
- glTexCoord2f(1, 1);
+ glTexCoord2f(w/(float)tex->data.rgba.padw,
+ h/(float)tex->data.rgba.padh);
glVertex2i(x+w, y+h);
glVertex2i(x+w, y+h);
- glTexCoord2f(0,
1
);
+ glTexCoord2f(0,
h/(float)tex->data.rgba.padh
);
glVertex2i(x, y+h);
glTexCoord2f(0, 0);
glVertex2i(x, y);