Re: [AD] Re: OpenGL 3.0 fails on Windows

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


This seems related to https://github.com/liballeg/allegro5/issues/1285, where the extension listing functionality was also modified. I'll take a look what can be synthesized from your proposal and the changes proposed in that issue.

-SL

On 10/24/21 9:17 AM, Karl Robillard wrote:
As ALLEGRO_OPENGL_3_0 doesn't work on my systems I'm trying to use
ALLEGRO_OPENGL by itself along with a manual check that the GL version is at
least 3.  In order to get the GL API function pointers I'm using the Glad code
generator (https://glad.dav1d.de/).

Allegro's al_get_opengl_proc_address() does not work with the Glad
gladLoadGLLoader function.  It fails immediately when getting the address of
"glGetString" because wglGetProcAddress only returns addresses for extension
functions, not those defined in GL 1.1 (such as glGetString).  The higher level
gladLoadGL loader handles this by using GetProcAddress when wglGetProcAddress
fails.  I propose that al_get_opengl_proc_address should do the same fallback
to GetProcAddress.  This would make it compatible with Glad and insure that
all OpenGL functions can be obtained.


-Karl








Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/