merge
authorsheepluva
Fri, 11 Sep 2015 21:42:55 +0200
changeset 11159 48190da6af61
parent 11157 73036e057d32 (current diff)
parent 11158 797bc8d70e75 (diff)
child 11160 f1f044e88039
child 11164 e19cf9459665
merge
hedgewars/uRender.pas
--- 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}