I am just learning about OpenGL ES. I was wondering if it’s possible to write an application that would work both on the desktop and on mobile devices just by switching out headers and recompiling. I realize there are some differences in OpenGL vs. ES APIs, but if you just used the ES subset and switched out the headers, is it possible? It seems it wouldn’t be possible ( or at least not easy ) to do this with JOGL-ES, since they use different package names and even different class names, but it looks like the C implementation used all the same names and namespaces. Any thoughts on this?
You can compile your OpenGL ES on Desktop but, you need use an implementation of the OpenGL ES for Desktop, you cant use OpenGL.
OpenGL ES is based on OpenGL. OpenGL ES functionalities can be considered a subset of the OpenGL functionalities but that doesnt mean that you will compile the OpenGL ES using OpenGL.
If you wanna use the OpenGL on desktop, you can change the function calls. Since the functionalities is a subset, you may change one OpenGL ES method for one with equal functionality in OpenGL.
My current implementation using OpenGL ES is compiled to Nokia S60 and PocketPC… but both used OpenGL ES implemenations.
Hmmmm… maybe I’m not being clear. I understand you cannot use OpenGL to build for OpenGL ES. That’s not what I’m asking.
Let’s say I build an app for a mobile device using OpenGL ES. Now I want to run this same app on the desktop. Can I simply switch out the headers ( to OpenGL ) and rebuild it? It seems the function calls are the same ( a subset I know ). Does it make sense?
Yeah… that’s what I was wondering. You have answered my question!
That’s pretty cool. As I said, that’s something you really can’t do with JOGL/JOGL - ES if you’re going the Java route. This is a pretty nice advantage I think.