waffle-gl / waffle

A C library for selecting an OpenGL API and window system at runtime
https://waffle.freedesktop.org
BSD 2-Clause "Simplified" License
35 stars 16 forks source link

WGL_EXT_create_context_es_profile is sufficient for creating an ES2 context #23

Closed linyaa-kiwi closed 9 years ago

linyaa-kiwi commented 9 years ago

WGL_EXT_create_context_es_profile is sufficient for creating an ES2 context. WGL_EXT_create_context_es2_profile is not required, as WGL_EXT_create_context_es_profile supercedes it.

Reported by Jose. Archived at (http://www.mail-archive.com/waffle@lists.freedesktop.org/msg00695.html).

From: Jose Fonseca jfonseca@vmware.com To: Emil Velikov emil.l.velikov@gmail.com, "waffle@lists.freedesktop.org" waffle@lists.freedesktop.org Date: Wed, 12 Nov 2014 16:28:42 +0000 Message-ID: 5fa2bed46ff84ee5a314c86944f81f02@EX13-MBX-017.vmware.com In-Reply-To: 1415573938-28484-1-git-send-email-emil.l.velikov@gmail.com Subject: Re: [waffle] [PULL] WGL support

Hi Emil,

I went through the new patches and they look good AFAICT. Thanks for doing this.

While going through "wgl: fully support ARB_create_context and EXT_create_context_es_profile." again I noticed a couple of issues with the usage of WGL_EXT_create_context_es2_profile that I hadn't noticed before because I wasn't familiar with the extension:

  • WGL_EXT_create_context_es_profile ignored the opengl version, but WGL_EXT_create_context_es2_profile will create any version requested in.
  • I believe one must set WGL_CONTEXT_MAJOR_VERSION_ARB/WGL_CONTEXT_MINOR_VERSION_ARB when requesting ES contexts or one will always get a ES 1.0 > context.
  • It's OK to assume that WGL_EXT_create_context_es2_profile then WGL_EXT_create_context_es_profile is supported, but not the other way around.

    This is because WGL_EXT_create_context_es_profile ignored the version

See "Revision History" at the bottom of https://www.opengl.org/registry/specs/EXT/wgl_create_context_es2_profile.txt for details.

Anyway, this is nor urgent -- it can be fixed in a follow on patch.

linyaa-kiwi commented 9 years ago

Issue #24 is the equivalent bug for GLX.

jrfonseca commented 9 years ago

I actually understand the other way around:

FWIW, you can see how glretrace now does it for GLX on https://github.com/apitrace/apitrace/blob/master/retrace/glws_glx.cpp#L251

linyaa-kiwi commented 9 years ago

@jrfonseca I just checked the Subversion history of file registry/extensions/EXT/wgl_create_context_es2_profile.txt. According to the diff that added Issue 5 (Subversion rev 12201 → 18789):

jrfonseca commented 9 years ago

Thanks @chadversary . I was totally wrong then.