I've been looking at JSR 239, the binding for OpenGL ES on Java. So far it seems like the only way to have a play around with this is via a JavaME or something like the iPhone or Android emulators. Is there anyway to do play around with some desktop ES? something like JOGL ES?

I've been looking at JSR 239, the binding for OpenGL ES on Java. So far it seems like the only way to have a play around with this is via a JavaME or something like the iPhone or Android emulators. Is there anyway to do play around with some desktop ES? something like JOGL ES?

I'm looking for something at the same level as JOGL, M3G sounds like a higher level API and more mobile orientated.

I'm guessing that if a graphics card supports standard OpenGL, it could also run OpenGL ES? So I think I'm just looking for an OpenGL ES binding for a normal Java 1.5 ish JDK. Even nicer if the binding supported 1.0, 1.1 and 2.0...

An emulator might be the only option it seems, although I'm NVidia based so maybe the ATI option isn't an option.

Alternative would be me having a go at creating the binding. But I can't be the only person considering this? And I'd hate to duplicate some other work, especially since my understanding of these bindings is very limited, although from what I understand of JOGL the process is fairly automated now? Scans some c headers and generates the java API? I'm happy to have a try at do-it-yourself if someone can give a few pointers.

I'm looking for something at the same level as JOGL, M3G sounds like a higher level API and more mobile orientated.

I'm guessing that if a graphics card supports standard OpenGL, it could also run OpenGL ES? So I think I'm just looking for an OpenGL ES binding for a normal Java 1.5 ish JDK. Even nicer if the binding supported 1.0, 1.1 and 2.0...

An emulator might be the only option it seems, although I'm NVidia based so maybe the ATI option isn't an option.

Alternative would be me having a go at creating the binding. But I can't be the only person considering this? And I'd hate to duplicate some other work, especially since my understanding of these bindings is very limited, although from what I understand of JOGL the process is fairly automated now? Scans some c headers and generates the java API? I'm happy to have a try at do-it-yourself if someone can give a few pointers.

In the worst case, I advice you to use only a subset of JOGL to simulate the constraints of JOGL-ES. The main differences with the mobile phone will be then the component chosen to contain the canvas (javax.microedition.lcdui.game.GameCanvas for the mobile phone) and the shutdown of OpenGL-ES.

We're behind in more publicly discussing that, but for a few months now a version of JOGL has been under development which allows you to target desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.0. The various OpenGL versions are phrased as different interfaces, so you can target the common subset of OpenGL ES 1.x and desktop OpenGL, for example, and if you do this, you are pretty much guaranteed that your app will run unmodified on a mobile device. If you have a mobile device on which you can put native code, you can get this version of JOGL running on it.

This work has been going on in the open; you can check out the JOGL_2_SANDBOX branch of the gluegen, jogl and jogl-demos workspaces to see the work in progress.

There are some API restructurings we want to do before more broadly advertising the availability of this new version of JOGL, but if you try checking it out and building it, we would certainly appreciate any feedback.

Despite the API finalization and to be able to have a 1st impression,maybe even to participate in the discussion - check out the new JOGL_2_SANDBOX (jogl and jogl-demos) - build it - create the javadoc with targets: - javadoc (std stuff) - javadoc.dev.all (everything) - create the doxygen if you like using the 'jogl/doxygen/doxygen.cfg'

Now it might be a good idea to look at the demos for some use cases,jogl-demos/src: Generic GL interface usage (runs on all GL profiles ES1, ES2 and GL2) - demos/GLInfo.java - demos/es1/RedSquare.java

Checks whether the GL implementation is ES1 at runtime and uses it's features (or a special implementation) if available - demos/es1/cube/Cube.java - demos/es1/angeles/Main.java

There are some API restructurings we want to do before more broadly advertising the availability of this new version of JOGL, but if you try checking it out and building it, we would certainly appreciate any feedback.

Please don't remove GL_MAX_ELEMENTS_VERTICES. I know it disappeared from OpenGL ES 2.0 but I really need it and it is still in OpenGL 1.5.

wow, this is really great news! I'd gotten as far as gluegen and locating the ES headers, but it was starting to look like a lot more work than I thought I like the sound of the interface approach for the different platform targets, and the compatability guarantee that that will give. Will that include 2.0 shaders too do you think? Anyway, I'm keen to have a look at this stuff in more detail, and will get back to you afterwards, although I doubt with my level of understanding I'll be able to give much input apart from a big congratulations and thankyou for working on this

well the afternoon went well, I got myself xcode installed (using leopard osx), antlr configured (needed to replace the default antlr.jar that was part of leopard) and was finally able to build gluegen

jogl and jogl-demos was smoother, but I'm missing some includes for the demos. The CG stuff I finally realised I can't build anyway because I don't have the windows only SDK. The joal and xml stuff I can probably find at some point. But the thing I'm interested in is getting the ES stuff running, which I assume is this missing package.

com.sun.opengl.impl.egl.*

I assume at this point I'm going to have to go back to the gluegen, grab some es header files and start from there?? Or am I missing something here?

Had another look at this and got a bit further... I had some old stuff from the main branches that was causing some of the earlier problems. Building JOGL now generates about 26 .jar files and seems to complete without any errors.

However building the jogl-demos with the default ant script fails. I can fix some of the errors, such as changing the target source from 1.4 to 1.5. But it also seems like a lot of jars are missing. When I add some of the missing jars to the build file, eg trove and jogl I think, then the build gets further but starts to fail with different method signitures for various calls. So either I've missed a step, or possibly the demos are just out of synch with jogl? My tests were based on refreshes from the jogl 2 branch as of yesterday.

I did get a few of the demos compile error free, and running RedSquare for example generates:

Taking the blanket approach of including all natives did the trick! Still lots of compile errors, but I finally have some ES2 stuff to play with, thanks all.

In terms of the API, I haven't had a good look yet, but it's quite different from what I was expecting. I've been reading through 'OpenGL ES 2.0 Programming Guide' which is constantly refering to EGL libraries. I'm just interested to know if JOGL plans to support this, if it's even a recognised widley used standard, or if I should create myself a EGL wrapper around the jogl approach We'll I have a lot to learn about all this first. I'm just happy now I have something running that I can experiment some more with.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org