--- a/hedgewars/uAtlas.pas Mon Jun 25 15:46:49 2012 +0200
+++ b/hedgewars/uAtlas.pas Mon Jun 25 16:22:03 2012 +0200
@@ -127,13 +127,18 @@
if not Info[i].allocated then
continue;
glGetIntegerv(GL_VIEWPORT, @vp);
+{$IFDEF GL2}
glGetIntegerv(GL_CURRENT_PROGRAM, @prog);
-
glUseProgram(0);
+{$ENDIF}
+ glPushMatrix;
+ glLoadIdentity;
+ glMatrixMode(GL_PROJECTION);
glPushMatrix;
glLoadIdentity;
glOrtho(0, vp[2], vp[3], 0, -1, 1);
+ glDisable(GL_CULL_FACE);
glBindTexture(GL_TEXTURE_2D, Info[i].TextureInfo.id);
glBegin(GL_QUADS);
@@ -148,6 +153,8 @@
glEnd();
glPopMatrix;
+ glMatrixMode(GL_MODELVIEW);
+ glPopMatrix;
inc(x);
if (x = 2) then
@@ -156,8 +163,9 @@
inc(y);
end;
-
+{$IFDEF GL2}
glUseProgram(prog);
+{$ENDIF}
end;
end;
--- a/hedgewars/uWorld.pas Mon Jun 25 15:46:49 2012 +0200
+++ b/hedgewars/uWorld.pas Mon Jun 25 16:22:03 2012 +0200
@@ -957,7 +957,7 @@
begin
glClear(GL_COLOR_BUFFER_BIT);
DrawWorldStereo(Lag, rmDefault)
- end;
+ end
{$IFNDEF S3D_DISABLED}
else if (cStereoMode = smAFR) then
begin
@@ -1066,6 +1066,8 @@
glColorMask(GL_TRUE, GL_FALSE, GL_FALSE, GL_TRUE);
DrawWorldStereo(Lag, rmRightEye);
end;
+{$ELSE}
+ ;
{$ENDIF}
DebugAtlas;
end;