GLExt.Load_GL_EXT_fog_coord doesn't work because functions are named like glFogCoordfEXfloat instead of glFogCoordfEXT
Original Reporter info from Mantis: Michalis @michaliskambi
-
Reporter name: Michalis Kamburelis
Original Reporter info from Mantis: Michalis @michaliskambi
- Reporter name: Michalis Kamburelis
Description:
OpenGL EXT_fog_coord extension exposes functions named like glFogCoordfEXT, see http://www.opengl.org/registry/doc/fog_coord.txt
But in GLExt unit, they are accidentaly named like glFogCoordfEXfloat ("float" instead of "T"). Consequently, Load_GL_EXT_fog_coord always returns false, even when the extension is correctly present in GL library, because wglGetProcAddress('glFogCoordfEXfloat') returns nil.
To reproduce: add lines like
Writeln('Supported extensions: ', glGetString(GL_EXTENSIONS));
Writeln('Load_GL_EXT_fog_coord ? ', Load_GL_EXT_fog_coord);
to any example program (like packages/extra/opengl/examples/morph3d.pp) after GL context is created (after glutCreateWindow for glut programs). On my system (GeForce FX 5200 with NVidia drivers "2.1.1 NVIDIA 100.14.19"), this writes
Supported extensions: .... GL_EXT_fog_coord ....
Load_GL_EXT_fog_coord ? FALSE
which is wrong, since it means that GL_EXT_fog_coord is claimed to be supported but Load_GL_EXT_fog_coord fails to load it.
This is a known bug, fixed in "upstream" version of the unit (that is, the one from http://www.delphi3d.net/). See http://www.delphi3d.net/forums/viewtopic.php?p=1257&sid=941333d5bfd5e1d34161c1703c8f3db0
I'm attaching simple patch to glext unit to fix this. This also fixes "v" version to take pointers (PGLfloat instead of GLfloat) as they should (yes, this is also fixed in "upstream" on delphi3d.net).
Mantis conversion info:
- Mantis ID: 10460
- OS: Debian GNU/Linux
- OS Build: (testing)
- Platform: i386
- Version: 2.2.0
- Fixed in version: 2.2.2
- Fixed in revision: 9762 (#23b62be0)