--- a/hedgewars/uStore.pas Wed Dec 22 12:17:34 2010 +0100
+++ b/hedgewars/uStore.pas Mon Dec 27 23:57:44 2010 +0100
@@ -887,6 +887,7 @@
SDL_FreeSurface(MissionIcons);
FreeTexture(ropeIconTex);
FreeTexture(HHTexture);
+{$IFNDEF S3D_DISABLED}
if (cStereoMode = smHorizontal) or (cStereoMode = smVertical) or (cStereoMode = smAFR) then
begin
glDeleteTextures(1, @texl);
@@ -896,6 +897,7 @@
glDeleteRenderbuffersEXT(1, @depthr);
glDeleteFramebuffersEXT(1, @framer)
end
+{$ENDIF}
end;
@@ -1193,10 +1195,10 @@
{$ELSE}
glLoadExtension:= glext_LoadExtension(extension);
{$IFDEF DEBUGFILE}
- if not glLoadExtension then
- AddFileLog('OpenGL - "' + extension + '" failed to load')
+ if glLoadExtension then
+ AddFileLog('OpenGL - "' + extension + '" loaded')
else
- AddFileLog('OpenGL - "' + extension + '" loaded');
+ AddFileLog('OpenGL - "' + extension + '" failed to load');
{$ENDIF}
{$ENDIF}
end;
@@ -1263,43 +1265,47 @@
cGPUVendor:= gvATI
else if StrPos(Str2PChar(vendor), Str2PChar('ati')) <> nil then
cGPUVendor:= gvIntel;
+{$ENDIF}
//SupportNPOTT:= glLoadExtension('GL_ARB_texture_non_power_of_two');
-
+{$IFNDEF S3D_DISABLED}
if (cStereoMode = smHorizontal) or (cStereoMode = smVertical) or (cStereoMode = smAFR) then
begin
// prepare left and right frame buffers and associated textures
- glLoadExtension('GL_EXT_framebuffer_object');
-
- // left
- glGenFramebuffersEXT(1, @framel);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framel);
- glGenRenderbuffersEXT(1, @depthl);
- glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, depthl);
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, cScreenWidth, cScreenHeight);
- glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, depthl);
- glGenTextures(1, @texl);
- glBindTexture(GL_TEXTURE_2D, texl);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, cScreenWidth, cScreenHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, nil);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, texl, 0);
+ if glLoadExtension('GL_EXT_framebuffer_object') then
+ begin
+ // left
+ glGenFramebuffersEXT(1, @framel);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framel);
+ glGenRenderbuffersEXT(1, @depthl);
+ glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, depthl);
+ glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, cScreenWidth, cScreenHeight);
+ glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, depthl);
+ glGenTextures(1, @texl);
+ glBindTexture(GL_TEXTURE_2D, texl);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, cScreenWidth, cScreenHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, nil);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, texl, 0);
- // right
- glGenFramebuffersEXT(1, @framer);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framer);
- glGenRenderbuffersEXT(1, @depthr);
- glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, depthr);
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, cScreenWidth, cScreenHeight);
- glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, depthr);
- glGenTextures(1, @texr);
- glBindTexture(GL_TEXTURE_2D, texr);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, cScreenWidth, cScreenHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, nil);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, texr, 0);
+ // right
+ glGenFramebuffersEXT(1, @framer);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framer);
+ glGenRenderbuffersEXT(1, @depthr);
+ glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, depthr);
+ glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, cScreenWidth, cScreenHeight);
+ glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, depthr);
+ glGenTextures(1, @texr);
+ glBindTexture(GL_TEXTURE_2D, texr);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, cScreenWidth, cScreenHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, nil);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, texr, 0);
- // reset
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0)
+ // reset
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0)
+ end
+ else
+ cStereoMode:= smNone;
end;
{$ENDIF}
--- a/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Wed Dec 22 12:17:34 2010 +0100
+++ b/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Mon Dec 27 23:57:44 2010 +0100
@@ -877,7 +877,7 @@
6179898B114AB3FA00BA94A9 /* SDL_mixer.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL_mixer.xcodeproj; path = "../../../Library/SDL-1.3/SDL_mixer/Xcode-iPhoneOS/SDL_mixer.xcodeproj"; sourceTree = SOURCE_ROOT; };
617989B3114AB47500BA94A9 /* SDL_net.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL_net.xcodeproj; path = "../../../Library/SDL-1.3/SDL_net/Xcode-iPhoneOS/SDL_net.xcodeproj"; sourceTree = SOURCE_ROOT; };
61798A0B114AB65600BA94A9 /* SDL_ttf.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL_ttf.xcodeproj; path = "../../../Library/SDL-1.3/SDL_ttf/Xcode-iPhoneOS/SDL_ttf.xcodeproj"; sourceTree = SOURCE_ROOT; };
- 61798A5E114AE08600BA94A9 /* Data */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Data; sourceTree = "<group>"; };
+ 61798A5E114AE08600BA94A9 /* Data */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Data; path = ../../../trunk/project_files/HedgewarsMobile/Data; sourceTree = "<group>"; };
61808A4A128C901B005D0E2F /* startButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = startButton.png; path = "Resources/Frontend-iPhone/startButton.png"; sourceTree = "<group>"; };
61808A6E128C94E1005D0E2F /* backgroundTop.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = backgroundTop.png; path = "Resources/Frontend-iPhone/backgroundTop.png"; sourceTree = "<group>"; };
6183D83C11E2BCE200A88903 /* Default-ipad-Landscape.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-ipad-Landscape.png"; path = "Resources/Icons/Default-ipad-Landscape.png"; sourceTree = "<group>"; };
@@ -2396,7 +2396,7 @@
PREBINDING = NO;
PROVISIONING_PROFILE = "450C4020-346A-4F44-8DDE-E71300796C94";
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "450C4020-346A-4F44-8DDE-E71300796C94";
- SDKROOT = iphoneos4.1;
+ SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VALID_ARCHS = "armv7 armv6";
@@ -2490,7 +2490,7 @@
PREBINDING = NO;
PROVISIONING_PROFILE = "";
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
- SDKROOT = iphoneos4.1;
+ SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VALID_ARCHS = "armv7 armv6";
@@ -2583,7 +2583,7 @@
"-Wl,-no_order_inits",
);
PREBINDING = NO;
- SDKROOT = iphoneos4.1;
+ SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = NO;
VALID_ARCHS = "armv7 armv6";
@@ -2716,7 +2716,7 @@
"-Wl,-no_order_inits",
);
PREBINDING = NO;
- SDKROOT = iphoneos4.1;
+ SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = NO;
VALID_ARCHS = "armv7 armv6";
@@ -2762,7 +2762,7 @@
PREBINDING = NO;
PROVISIONING_PROFILE = "";
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
- SDKROOT = iphoneos4.1;
+ SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = NO;
VALID_ARCHS = "armv7 armv6";