hedgewars/uRender.pas
changeset 11159 48190da6af61
parent 11151 5c40c65b619d
parent 11158 797bc8d70e75
child 11317 62287d4044e7
--- a/hedgewars/uRender.pas	Fri Sep 11 09:18:08 2015 +0200
+++ b/hedgewars/uRender.pas	Fri Sep 11 21:42:55 2015 +0200
@@ -359,31 +359,29 @@
 {$ENDIF}
 
 function glLoadExtension(extension : shortstring) : boolean;
+var logmsg: shortstring;
 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}
+    logmsg:= 'OpenGL - "' + extension + '" skipped';
+
+{$IFNDEF IPHONEOS}
+//TODO: pas2c does not handle
+{$IFNDEF PAS2C}
+// FreePascal doesnt come with OpenGL ES 1.1 Extension headers
+{$IF GLunit <> gles11}
+
     glLoadExtension:= glext_LoadExtension(extension);
-    if glLoadExtension then
-        AddFileLog('OpenGL - "' + extension + '" loaded')
-    else
-        AddFileLog('OpenGL - "' + extension + '" failed to load');
-{$ENDIF}
 
-{$ELSE} // pas2c part
-    glLoadExtension:= false;
+    if glLoadExtension then
+        logmsg:= 'OpenGL - "' + extension + '" loaded'
+    else
+        logmsg:= 'OpenGL - "' + extension + '" failed to load';
+
 {$ENDIF}
-*)
- 
- extension:= extension; // avoid hint
- glLoadExtension:= false;
- AddFileLog('OpenGL - "' + extension + '" skipped')
+{$ENDIF}
+{$ENDIF}
+    AddFileLog(logmsg);
 end;
 
 {$IFDEF USE_S3D_RENDERING OR USE_VIDEO_RECORDING}