Skip to content
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

Lwjgl with regal? #138

Open
FabbiX opened this issue Jun 24, 2016 · 4 comments
Open

Lwjgl with regal? #138

FabbiX opened this issue Jun 24, 2016 · 4 comments

Comments

@FabbiX
Copy link

FabbiX commented Jun 24, 2016

Its possible? I'm not an expert of low level programming but I've read that Regal Api is the same of Opengl, so I was thinking that in this way lwjgl could easyly work with device that supports only OpenglES.

@Spasi
Copy link
Member

Spasi commented Jun 24, 2016

This is easy with LWJGL 3 by setting the Configuration.OPENGL_LIBRARY_NAME option (or running the JVM with -Dorg.lwjgl.opengl.libname=<regal library name>.

Unfortunately you cannot use it with GLFW yet, since it always loads the standard OpenGL library internally. There's planned support for externally managed contexts though, see glfw/glfw#25.

Your other options for now are JAWT and SWT.

@FabbiX
Copy link
Author

FabbiX commented Jun 24, 2016

Mmm... that's obviously a big problem.
Sorry if I'm asking you elementary things but how exactly does lwjgl use glfw?
I'll explain you the point: most of actual android devices running opengl es (including the one I'm using now) can use an old mesa driver for running opengl; the problem is that those drivers are ancient and even if they work they have got thousand of problems like color bugs and so on.
I was thinking about using the old drivers for glfw if as I understood it is used only for marginal thing like application menubar.
I repeat I'm not an expert developer, so sorry if I'm only make you waste time.

@Spasi
Copy link
Member

Spasi commented Jun 24, 2016

LWJGL 3 doesn't use GLFW exactly, it simply exposes its API with Java bindings. GLFW is loaded as a shared library (.dll/.so/.dylib), which is built from source without any modifications.

A workaround for your problem would be to create a custom GLFW build that loads Regal instead of OpenGL. You can replace the one that comes with LWJGL and it will work fine (assuming you also set OPENGL_LIBRARY_NAME accordingly).

@FabbiX
Copy link
Author

FabbiX commented Jun 25, 2016

Thanks you for the answer !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants