Posted by
Sven Gothel on
Feb 10, 2012; 9:09am
URL: https://forum.jogamp.org/How-do-I-interface-JOGL-with-PowerVR-OpenGL-ES-2-0-dlls-and-libs-on-windows-tp3731608p3731928.html
On 02/10/2012 04:51 AM, sarvesh [via jogamp] wrote:
>
>
> How do I interface JOGL with PowerVR OpenGL ES 2.0 dlls and libs on windows?
> PowerVR i.e. Imagination technologies provide an OpenGL ES 2.0 Emulator
> called libglesv2.lib and libGLESv2.dll along with libegl.lib and libegl.dll.
> How do I connect JOGL to these?
>
Hmm .. I did that in the past using with some success using NEWT.
Last time I tried it still worked on Linux/X11.
All you have to do is to add the libraries to the PATH (Windows) /
LD_LIBRARY_PATH (X11).
The difficulty is to connect the native windowing id-s to EGL,
which may differ from platform to platform in case we emulate them.
In EGLDrawable line 145 Ihave added a hack to allow using the
Windows surface handle (DC) as the native display to derive the EGL display handle:
if( NativeWindowFactory.TYPE_WINDOWS.equals(NativeWindowFactory.getNativeWindowType(false)) ) {
nDisplay = surface.getSurfaceHandle(); // don't even ask ..
} else {
nDisplay = aDevice.getHandle(); // 0 == EGL.EGL_DEFAULT_DISPLAY
}
However, since nothing is guaranteed to be stable (API/Impl.) in those emulations
your mileage may vary.
If the profile test (etc/test.bat) exposes ES2, you are lucky then.
There is also the ANGLE emulation (from Google?) included in Chrome (at least on Windows).
Just checked .. we don't pick up ES2 with this emulation.
I will go through these scenarios while working on mobile within the next 2 weeks,
until then you may just use the GL2ES2 profile (common subset).
Sure you can also attempt to fix it yourself and we can discuss the changes while I pull them.
~Sven