-
-
Notifications
You must be signed in to change notification settings - Fork 646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bindings for Wingdi.h and Linux/OS X alternatives #105
Comments
These bindings were removed with d9c4a1b. We should re-introduce those that are needed for custom context management. |
Absolutely! Or if you don't want to have it in core LWJGL3, then we can maybe also make a shared library / optional module out of these? |
Having them in core is fine. Creating a context using a foreign window handle should be available out of the box. |
Cool! When those functions are reintroduced, having full SWT support with GL 3.0 contexts is a walk in the park. Just augmenting SWT's GLCanvas to use the additional context attributes. |
Bindings for wingdi.h are in 3.0.0b build 51. I think you're good to go on Linux/OSX with the existing GLX/CGL bindings, but let me know if you need anything else. |
Thank you for reintroducing it! So far only GetDC and ReleaseDC is missing. |
I used GetDC and ReleaseDC so far from SWT and now I have a problem that I think I did stumble on a year ago when creating a custom GL context with LWJGL3. The chicken-egg-problem with LWJGL3 that I cannot use
How would I go about solving this without using GLFW? |
Sorry, I forgot that LWJGL3 even provides more lowlevel facilities to access native functions. I now resort to:
Works like a charm without needing to initialize a full LWJGL3 context. :) |
Better solution:
|
Nice! :D |
Changes in 3.0.0b build 52:
|
Thanks for the quick changes! I think we can close this issue now and track the progress of the new SWT GLCanvas in #107. |
Somehow I was under the impression that LWJGL3 already provides all functionality to create an OpenGL context with platform-specific API, but I think there are some pieces missing.
For example, the functions and structs of Wingdi.h (for Windows), such as the ChoosePixelFormat function and the PIXELFORMATDESCRIPTOR struct.
I am trying to build a custom SWT GLCanvas, since SWT does not support creating OpenGL >= 3.0 contexts.
Can bindings to those be added please?
The text was updated successfully, but these errors were encountered: