diff options
Diffstat (limited to 'Game/Code/Classes')
-rw-r--r-- | Game/Code/Classes/UDraw.pas | 10 |
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);
|