Is it possible to use the GLES1 profile on Windows?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it possible to use the GLES1 profile on Windows?

Matt
Hi all.  I am making a game for the Android platform, which uses OpenGL ES 1.1 (javax.microedition.khronos.opengles.GL11Ext).  During development, I'm using the same game engine to run on Windows because it's much easier to develop and debug that way.  For Android, I have an OpenGL renderer class, and in Windows I had a JPanel class which draws to a Canvas, but all of the game code comes from a shared source tree.

I'm not very familiar with OpenGL, and have been learning it recently.  I've just figured out about what the profiles mean.  Essentially I am mostly copying and pasting samples to draw the 2D graphics.  I decided that it would be better if I used OpenGL on Windows to be able to develop with the OpenGL methods much more efficiently.  I am using JOGL now, but I just recently ran into a problem... the profiles.

It turns out glDrawTexfOES is the way you draw 2D graphics in OpenGL ES 1.1, which is a method that only exists in the GLES1 profile and not the others.  But when I run the app on Windows, I get Exception in thread "main" javax.media.opengl.GLException: No implementation for profile GLES1 available when I call GLProfile.get(GLProfile.GLES1).

Does anyone know of a way to get this profile working in Windows?  I thought all the profiles ended up calling the same underlying methods internally.  I can see a com.jogamp.opengl.impl.es1.GLES1Impl in the libraries, although I understand that doesn't mean the drivers support it.  Perhaps someone can offer a workaround?
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to use the GLES1 profile on Windows?

gouessej
Administrator
Hi!

This is the expected behavior. On a desktop environment, you can only call the methods that are available in the desktop profiles. However, some methods are both in the desktop profiles and in the embedded profiles. Of course, when a method is only available in embedded profiles, you cannot use it in desktop profiles.

If you want to use the same source code on Android and in a desktop environment, rather call GLContext.getCurrentGL().getGL2ES1().
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to use the GLES1 profile on Windows?

Matt
Yes, thank you, there is the GL2ES1 profile on Windows.  Unfortunately, glDrawTexfOES is only available in GLES1.  I will have to try a new approach.