hedgewars/uStore.pas
changeset 3695 c11abf387a7d
parent 3691 34fe2149f75d
child 3697 d5b30d6373fc
--- a/hedgewars/uStore.pas	Sat Jul 31 10:42:40 2010 +0200
+++ b/hedgewars/uStore.pas	Sat Jul 31 10:52:43 2010 +0200
@@ -39,9 +39,7 @@
     rotationQt: GLfloat;
     wScreen: LongInt;
     hScreen: LongInt;
-    framel, framer, depthl, depthr: GLuint;
-    texl, texr: GLuint;
-
+    
 procedure initModule;
 procedure freeModule;
 
@@ -804,15 +802,6 @@
     SDL_FreeSurface(MissionIcons);
     FreeTexture(ropeIconTex);
     FreeTexture(HHTexture);
-    if isStereoEnabled then
-    begin
-        glDeleteTextures(1, @texl);
-        glDeleteRenderbuffersEXT(1, @depthl);
-        glDeleteFramebuffersEXT(1, @framel);
-        glDeleteTextures(1, @texr);
-        glDeleteRenderbuffersEXT(1, @depthr);
-        glDeleteFramebuffersEXT(1, @framer)
-    end
 end;
 
 
@@ -1182,9 +1171,7 @@
 {$ENDIF}
     end;
 
-{$IFDEF IPHONEOS}
-    cGPUVendor:= gvApple;
-{$ELSE}
+{$IFNDEF IPHONEOS}
     if StrPos(Str2PChar(vendor), Str2PChar('nvidia')) <> nil then
         cGPUVendor:= gvNVIDIA
     else if StrPos(Str2PChar(vendor), Str2PChar('intel')) <> nil then
@@ -1192,43 +1179,8 @@
     else if StrPos(Str2PChar(vendor), Str2PChar('ati')) <> nil then
         cGPUVendor:= gvIntel;
 //SupportNPOTT:= glLoadExtension('GL_ARB_texture_non_power_of_two');
-
-    if isStereoEnabled 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);
-
-        // 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)
-    end;
+{$ELSE}
+    cGPUVendor:= gvApple;
 {$ENDIF}
 
 {$IFDEF DEBUGFILE}