[AD] Re: OpenGL 3.0 fails on Windows |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: allegro-developers@xxxxxxxxxxxxxxxxxx
- Subject: [AD] Re: OpenGL 3.0 fails on Windows
- From: Karl Robillard <krobillard@xxxxxxxx>
- Date: Sun, 24 Oct 2021 12:17:51 -0400
- Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=krobillard@xxxxxxxx; dmarc=pass header.from=<krobillard@xxxxxxxx>
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1635092275; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=r22UqrV+KBErtCltHKD/72UrhwlJDVbeHkEt77k2k7M=; b=JOFOsM4zPv3i+mnv58xRqe4LImK0K8edfghbpQ0WHdCa8SUfX6sH+SB3iWfxq4iAwll9h+JJuNeRQlhwMh7pwfu4AlVpLVhjOwUQ2Jdz1iJiz8NcHUWTs5bheEWUobey+LXo0NwwRz+80C4XcDrRHsr9OrDKdd+m4O92mvCidwg=
- Arc-seal: i=1; a=rsa-sha256; t=1635092275; cv=none; d=zohomail.com; s=zohoarc; b=KgB6pnaxn6Nrsagv9JUyr05sfYp7+JUCFoCvHi6FGncXfR7MW4c+7d5YvS6A1wHqtI6hTbYe5SPiLU7oQ2Dv+UGHrapj9ZOaAJ9uNyWDp/ehhiyi1BRdcZ/7KPiji/F3wsrn0eKSbQVFgNvksIXV6ClfNfA0YQtXW5KWCCDocJ4=
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1635092275; s=zm2020; d=zoho.com; i=krobillard@xxxxxxxx; h=From:To:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type; bh=r22UqrV+KBErtCltHKD/72UrhwlJDVbeHkEt77k2k7M=; b=AJYi8xpvcjhydWnZ4jtN+ozqGCKoPSDNcB3spD3mhjSzot9wQXzbpX9mi2hJhWKy ItKl7VTo3vreFyidFkdzWAregFt8bjLW4Ee3+fAQp8kxsY0yhq5mu/b7oYwR9luCEgh B9hjKubGXbKaJFn2yvrUGUTGn9IWcXLIGV/DgPz8=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=from:to:subject:date:message-id:in-reply-to:references:mime-version:content-type; b=qmCYMaE4Cn0wU/NLKq28QlTE5mEfIm6oGKxJx/aDbhgMhCOBjxMvSbTGYaS1KBwWR8KjE01S9f7k eIYMrvg3HttJQixswf72kt+pGMARic2qhSg9wZB/bTqxM1E/GqV3
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