- ifdef for IPHONEOS in glLoadExtension ios-revival
authorantonc27 <antonc27@mail.ru>
Fri, 11 Sep 2015 01:05:02 +0200
branchios-revival
changeset 11153 2ac6b0d29aba
parent 11150 877de65e0e13
child 11158 797bc8d70e75
- ifdef for IPHONEOS in glLoadExtension
hedgewars/uRender.pas
--- a/hedgewars/uRender.pas	Thu Sep 10 17:51:49 2015 +0200
+++ b/hedgewars/uRender.pas	Fri Sep 11 01:05:02 2015 +0200
@@ -360,30 +360,30 @@
 
 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
+{$IFNDEF IPHONEOS}
+    //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}
+{$ELSE}
     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}
-*)
- 
- extension:= extension; // avoid hint
- glLoadExtension:= false;
- AddFileLog('OpenGL - "' + extension + '" skipped')
 end;
 
 {$IFDEF USE_S3D_RENDERING OR USE_VIDEO_RECORDING}