[fpc-pascal] How to use OpenGL 2.0 features

dmitry boyarintsev skalogryz.lists at gmail.com
Wed May 13 13:56:10 CEST 2009


> OpenGL 3.x also deprecates many OpenGL 1.1 functions (for example immediate mode). OpenGL 1.1 is not loaded (as there is no need even on windows) so how does the 'flexibility' help us there?

Binding flexibility is required, if application is to be distributed.
There's no way to say, what kind of OpenGL drivers is installed on the
next machine.

for example, an application uses some 2.0 features (that're available
in earlier gl versions as some extensions)
The application will run fine with OpenGL 2.0 drives installed, but if
there's older drivers it will probably fail.

The most robust code is the following:

if not Load_SomeFunc_asCore and
   not Load_SomeFunc_asExtension then begin
  writeln('Please, update OpenGL drivers');
  Halt;
end;

I know, it's easy, to say: "My application requirement is GL 2.0 or
higher", but, personally, i prefer to care about the user, rather
making him/her to install latests drivers.

thanks,
dmitry



More information about the fpc-pascal mailing list