aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorb1indy <b1indy@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-07-21 00:09:19 +0000
committerb1indy <b1indy@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-07-21 00:09:19 +0000
commit8f170f0cad67b6bd94e04fe517ba3fe0dfe1099d (patch)
tree1d34c833979405c8f2edafc0209961268a26218f
parent9ea1096f3ee6102ad83982ebaedbc954c5d19b69 (diff)
downloadusdx-8f170f0cad67b6bd94e04fe517ba3fe0dfe1099d.tar.gz
usdx-8f170f0cad67b6bd94e04fe517ba3fe0dfe1099d.tar.xz
usdx-8f170f0cad67b6bd94e04fe517ba3fe0dfe1099d.zip
notes can now have tiled texture (32x32 pixels)
http://imageshock.eu/img/tilednotes_PoC.jpg http://imageshock.eu/img/tilednotes_PoC2.jpg git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@311 b956fd51-792f-4845-bead-9b4dfca2ff2c
-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 077f5121..df729bd4 100644
--- a/Game/Code/Classes/UDraw.pas
+++ b/Game/Code/Classes/UDraw.pas
@@ -255,11 +255,13 @@ begin
Rec.Right := (Start+Dlugosc-Czesci[NrCzesci].Czesc[Czesci[NrCzesci].Akt].StartNote) * TempR + Left - NotesW - 0.5 + 10*ScreenX;
glBindTexture(GL_TEXTURE_2D, Tex_Mid[Color].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(1, 1); glVertex2f(Rec.Right, Rec.Bottom);
- glTexCoord2f(1, 0); glVertex2f(Rec.Right, Rec.Top);
+ glTexCoord2f((Rec.Right-Rec.Left)/32, 1); glVertex2f(Rec.Right, Rec.Bottom);
+ glTexCoord2f((Rec.Right-Rec.Left)/32, 0); glVertex2f(Rec.Right, Rec.Top);
glEnd;
// prawa czesc - right part
@@ -363,8 +365,8 @@ var
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex2f(Rec.Left, Rec.Top);
glTexCoord2f(0, 1); glVertex2f(Rec.Left, Rec.Bottom);
- glTexCoord2f(1, 1); glVertex2f(Rec.Right, Rec.Bottom);
- glTexCoord2f(1, 0); glVertex2f(Rec.Right, Rec.Top);
+ glTexCoord2f((Rec.Right-Rec.Left)/32, 1); glVertex2f(Rec.Right, Rec.Bottom);
+ glTexCoord2f((Rec.Right-Rec.Left)/32, 0); glVertex2f(Rec.Right, Rec.Top);
glEnd;
glColor3f(1, 1, 1);