hedgewars/uLandTexture.pas
changeset 7080 dbf43c07a507
parent 6700 e04da46ee43c
child 7186 013deb83086b
--- a/hedgewars/uLandTexture.pas	Mon May 14 22:47:56 2012 +0400
+++ b/hedgewars/uLandTexture.pas	Mon May 14 19:26:50 2012 +0200
@@ -91,7 +91,7 @@
             with LandTextures[x, y] do
                 begin
                 tex:= NewTexture(TEXSIZE, TEXSIZE, Pixels(x, y));
-                glBindTexture(GL_TEXTURE_2D, tex^.id);
+                glBindTexture(GL_TEXTURE_2D, tex^.atlas^.id);
                 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_PRIORITY, tpHigh);
                 end
 else
@@ -101,7 +101,7 @@
                 if shouldUpdate then
                     begin
                     shouldUpdate:= false;
-                    glBindTexture(GL_TEXTURE_2D, tex^.id);
+                    glBindTexture(GL_TEXTURE_2D, tex^.atlas^.id);
                     glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, TEXSIZE, TEXSIZE, 0, GL_RGBA, GL_UNSIGNED_BYTE, Pixels(x,y));
                     end
 end;