aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
authorb1indy <b1indy@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-07-21 20:40:18 +0000
committerb1indy <b1indy@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-07-21 20:40:18 +0000
commit3c45a26796c089e79bce700729d019251adeeff3 (patch)
treeedf200a546abbef7e33e7dc93af71537a3056848 /Game
parent4d300a0b6d5b074fcea0a1cf9b04f180782aa1c1 (diff)
downloadusdx-3c45a26796c089e79bce700729d019251adeeff3.tar.gz
usdx-3c45a26796c089e79bce700729d019251adeeff3.tar.xz
usdx-3c45a26796c089e79bce700729d019251adeeff3.zip
texture tiling for notes now stretches the middle part just as much as needed to seamlessly attach both ends
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@313 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game')
-rw-r--r--Game/Code/Classes/UDraw.pas10
1 files changed, 6 insertions, 4 deletions
diff --git a/Game/Code/Classes/UDraw.pas b/Game/Code/Classes/UDraw.pas
index d9582aee..bf85888d 100644
--- a/Game/Code/Classes/UDraw.pas
+++ b/Game/Code/Classes/UDraw.pas
@@ -260,8 +260,8 @@ begin
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex2f(Rec.Left, Rec.Top);
glTexCoord2f(0, 1); glVertex2f(Rec.Left, Rec.Bottom);
- glTexCoord2f((Rec.Right-Rec.Left)/32, 1); glVertex2f(Rec.Right, Rec.Bottom);
- glTexCoord2f((Rec.Right-Rec.Left)/32, 0); glVertex2f(Rec.Right, Rec.Top);
+ glTexCoord2f(round((Rec.Right-Rec.Left)/32), 1); glVertex2f(Rec.Right, Rec.Bottom);
+ glTexCoord2f(round((Rec.Right-Rec.Left)/32), 0); glVertex2f(Rec.Right, Rec.Top);
glEnd;
// prawa czesc - right part
@@ -362,11 +362,13 @@ var
// glColor3f(R, G, B);
// glBindTexture(GL_TEXTURE_2D, Tex_MidGray.TexNum);
glBindTexture(GL_TEXTURE_2D, Tex_Mid[NrGracza+1].TexNum);
+ glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT );
+ glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT );
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex2f(Rec.Left, Rec.Top);
glTexCoord2f(0, 1); glVertex2f(Rec.Left, Rec.Bottom);
- glTexCoord2f((Rec.Right-Rec.Left)/32, 1); glVertex2f(Rec.Right, Rec.Bottom);
- glTexCoord2f((Rec.Right-Rec.Left)/32, 0); glVertex2f(Rec.Right, Rec.Top);
+ glTexCoord2f(round((Rec.Right-Rec.Left)/32), 1); glVertex2f(Rec.Right, Rec.Bottom);
+ glTexCoord2f(round((Rec.Right-Rec.Left)/32), 0); glVertex2f(Rec.Right, Rec.Top);
glEnd;
glColor3f(1, 1, 1);