[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: Sat, 23 Oct 2021 10:18:30 -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=1634998714; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=r22UqrV+KBErtCltHKD/72UrhwlJDVbeHkEt77k2k7M=; b=EXkxkDLBi8c6N2wKctW+YbEpThZCjmj7Ty7zj5j+pa4kw/SzuI48TnONxXqE8doxvWpTfNdqs3Z6oHV/CrKSR93HpugcM43FMD3ELYfjFMDWmxLp1dKciceO2C3QjN6N66Qqnq5Ml1cW7VmSTudAhLdyYhNtQ7cui+XGjlaw+Oo=
- Arc-seal: i=1; a=rsa-sha256; t=1634998714; cv=none; d=zohomail.com; s=zohoarc; b=CpD216WjRc/zXFgPgY3/ODYARu9/81nKNcA882UwglSBWlwfAXSSKOeoeni2Kk1L1/WrtDY55oKdnvLHzI0r8r4QLD1i2KzkXdWR4LsimfB1hg6DyeahcjtxMqhdE898xbC4l4SSytTSijCeHsBymkCKYYo2dNIEfRKH6ylRyJY=
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1634998714; 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=jVn5xPcwgx08E7hZQZ/y2ye41ntBgmUkq+p1ahA2RKu1Isrg/XLmHtTy7vut8Icy q8KVNfnQ0Azzxhbbpz9tLjQ+vDEfir7mri99EBJvAj/yk1SLE46v2sV6NOzk+YB1uW6 mf9CUMc/Di1a0i7QhyD6LoD0Fyjrnf4Dtwky/5O4=
- 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=VRWInbJUOZnzwgoYZQi+uQDTscnQ3xsVLMcMz6cgablbsfcjkpVWDAlBUdMZuQCwvqOkQZlROx9U Lup1gSMf3BBGSuZlAnaulv4sIqAOFOvVA4jJVUZn7wpeG072MUim
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