[fpc-pascal] How to use OpenGL 2.0 features

Michalis Kamburelis michalis.kambi at gmail.com
Mon May 11 03:09:40 CEST 2009


Lord Satan wrote:
> On Sun, 10 May 2009 23:47:07 +0200
> Lord Satan <reimgrab at web.de> wrote:
> 
> I uploaded the patch to the bug tracker as issue #0013687
> 

Looking quickly at the patch, it doesn't seem to set Result values
correctly. For example, all Load_GL_version_xxx will always return true,
if only the first Load_GL_version_1_2 will return true. If you call
Load_GL_version_2_0, it will do "Result := Load_GL_version_1_5". If it
set Result to true, then Result will remain true --- even if some gl 2.0
function, like glBlendEquationSeparate, will not exist and cause Exit.

Change this e.g. to follow each
  Result := Load_GL_version_1_5;
by
  if not Result then Exit;
  Result := FALSE;
... to make sure that Load_GL_version_2_0 returns true *only* if both
Load_GL_version_1_5 succeeded *and* all functions on level 2.0 succeeded.

Michalis



More information about the fpc-pascal mailing list