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