Exploring the prism es2 land - couple of questions
Lukasz Kostyra
lukasz.kostyra at oracle.com
Tue Oct 24 07:12:56 UTC 2023
Hi,
I don’t have much ES2 experience, so I cannot really answer 1). But I think I can somewhat answer 2) based on Windows OpenGL knowledge.
This might be a situation similar to how Windows handles GL contexts. When you create a context in modern GL (3.0 and onwards, aka. Core) you must acquire some newer GL/WGL calls which can create such context. These calls are GL extensions, so to get them you need to be able to call `wglGetProcAddress()`. To be able to call `wglGetProcAddress()` on Windows you need to first make any GL context current. Core WGL exposes calls to create a 1.1 Context, but they require a window.
As such, usual path to get a 3.0 Context on Windows is as follows:
- Create a dummy/invisible window
- Use a dummy window to create 1.1 Context (aka false context)
- Make 1.1 false context current
- Fetch necessary functions via `wglGetProcAddress()`
- Create a proper 3.0 Context and make It current
For reference, Khronos Wiki mentions this briefly: https://www.khronos.org/opengl/wiki/Creating_an_OpenGL_Context_(WGL)#Create_a_False_Context
I think on Linux and with GLX such behavior is not required (AFAIK glXGetProcAddress could fetch GL/GLX extensions without a current context), but to keep it consistent on all platforms ES2 seems to follow this path regardless.
BRs,
Lukasz
From: openjfx-dev <openjfx-dev-retn at openjdk.org> On Behalf Of Thiago Milczarek Sayão
Sent: Friday, 20 October 2023 22:38
To: openjfx-dev <openjfx-dev at openjdk.org>
Subject: Exploring the prism es2 land - couple of questions
Hi,
I have some questions on prism es2.
1) Why is a Context created on each platform GLFactory if there is a GLContext?
2) What is the use of the Dummy Window?
I'm working on using EGL instead of GLX, so it will work on Wayland.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20231024/db5c6815/attachment-0001.htm>
More information about the openjfx-dev
mailing list