358 end; |
358 end; |
359 {$ENDIF} |
359 {$ENDIF} |
360 |
360 |
361 function glLoadExtension(extension : shortstring) : boolean; |
361 function glLoadExtension(extension : shortstring) : boolean; |
362 begin |
362 begin |
363 (* |
363 {$IFNDEF IPHONEOS} |
364 //TODO: pas2c does not handle {$IF (GLunit = gles11) OR DEFINED(PAS2C)} |
364 //TODO: pas2c does not handle {$IF (GLunit = gles11) OR DEFINED(PAS2C)} |
365 {$IFNDEF PAS2C} |
365 {$IFNDEF PAS2C} |
366 {$IF GLunit = gles11} |
366 {$IF GLunit = gles11} |
367 // FreePascal doesnt come with OpenGL ES 1.1 Extension headers |
367 // FreePascal doesnt come with OpenGL ES 1.1 Extension headers |
|
368 extension:= extension; // avoid hint |
|
369 glLoadExtension:= false; |
|
370 AddFileLog('OpenGL - "' + extension + '" skipped') |
|
371 {$ELSE} |
|
372 glLoadExtension:= glext_LoadExtension(extension); |
|
373 if glLoadExtension then |
|
374 AddFileLog('OpenGL - "' + extension + '" loaded') |
|
375 else |
|
376 AddFileLog('OpenGL - "' + extension + '" failed to load'); |
|
377 {$ENDIF} |
|
378 |
|
379 {$ELSE} // pas2c part |
|
380 glLoadExtension:= false; |
|
381 {$ENDIF} |
|
382 {$ELSE} |
368 extension:= extension; // avoid hint |
383 extension:= extension; // avoid hint |
369 glLoadExtension:= false; |
384 glLoadExtension:= false; |
370 AddFileLog('OpenGL - "' + extension + '" skipped') |
385 AddFileLog('OpenGL - "' + extension + '" skipped') |
371 {$ELSE} |
386 {$ENDIF} |
372 glLoadExtension:= glext_LoadExtension(extension); |
|
373 if glLoadExtension then |
|
374 AddFileLog('OpenGL - "' + extension + '" loaded') |
|
375 else |
|
376 AddFileLog('OpenGL - "' + extension + '" failed to load'); |
|
377 {$ENDIF} |
|
378 |
|
379 {$ELSE} // pas2c part |
|
380 glLoadExtension:= false; |
|
381 {$ENDIF} |
|
382 *) |
|
383 |
|
384 extension:= extension; // avoid hint |
|
385 glLoadExtension:= false; |
|
386 AddFileLog('OpenGL - "' + extension + '" skipped') |
|
387 end; |
387 end; |
388 |
388 |
389 {$IFDEF USE_S3D_RENDERING OR USE_VIDEO_RECORDING} |
389 {$IFDEF USE_S3D_RENDERING OR USE_VIDEO_RECORDING} |
390 procedure CreateFramebuffer(var frame, depth, tex: GLuint); |
390 procedure CreateFramebuffer(var frame, depth, tex: GLuint); |
391 begin |
391 begin |