hedgewars/uStore.pas
changeset 10309 e338ccbbe100
parent 10304 7e40820b7ed6
child 10443 42dadeb6e8ae
--- a/hedgewars/uStore.pas	Sun Jun 15 04:46:34 2014 +0200
+++ b/hedgewars/uStore.pas	Sun Jun 15 13:42:34 2014 +0200
@@ -489,31 +489,6 @@
 IMG_Quit();
 end;
 
-{$IF DEFINED(USE_S3D_RENDERING) OR DEFINED(USE_VIDEO_RECORDING)}
-procedure CreateFramebuffer(var frame, depth, tex: GLuint);
-begin
-    glGenFramebuffersEXT(1, @frame);
-    glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, frame);
-    glGenRenderbuffersEXT(1, @depth);
-    glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, depth);
-    glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, cScreenWidth, cScreenHeight);
-    glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, depth);
-    glGenTextures(1, @tex);
-    glBindTexture(GL_TEXTURE_2D, tex);
-    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, tex, 0);
-end;
-
-procedure DeleteFramebuffer(var frame, depth, tex: GLuint);
-begin
-    glDeleteTextures(1, @tex);
-    glDeleteRenderbuffersEXT(1, @depth);
-    glDeleteFramebuffersEXT(1, @frame);
-end;
-{$ENDIF}
-
 procedure StoreRelease(reload: boolean);
 var ii: TSprite;
     ai: TAmmoType;
@@ -743,28 +718,6 @@
         end;
 end;
 
-function glLoadExtension(extension : shortstring) : boolean;
-begin
-//TODO: pas2c does not handle {$IF (GLunit = gles11) OR DEFINED(PAS2C)}
-{$IFNDEF PAS2C}
-{$IF GLunit = gles11}
-    // FreePascal doesnt come with OpenGL ES 1.1 Extension headers
-    extension:= extension; // avoid hint
-    glLoadExtension:= false;
-    AddFileLog('OpenGL - "' + extension + '" skipped')
-{$ELSE}
-    glLoadExtension:= glext_LoadExtension(extension);
-    if glLoadExtension then
-        AddFileLog('OpenGL - "' + extension + '" loaded')
-    else
-        AddFileLog('OpenGL - "' + extension + '" failed to load');
-{$ENDIF}
-
-{$ELSE} // pas2c part
-    glLoadExtension:= false;
-{$ENDIF}
-end;
-
 procedure SetupOpenGLAttributes;
 begin
 {$IFDEF IPHONEOS}
@@ -1093,7 +1046,7 @@
     glutHideWindow();
     // we do not need to set this callback, but it is required for GLUT3 compat
     glutDisplayFunc(@SwapBuffers);
-    SetupRenderer();
+    RenderSetup();
 end;
 {$ENDIF} // SDL2
 {$ENDIF} // USE_VIDEO_RECORDING