Cross-Platform and OpenGL ES

Started by
4 comments, last by clb 11 years, 9 months ago
I have been using C# and XNA for a while, but I'm looking to make a totally new approach on game development; cross-platform using C++.

Doing some research, I have come across OpenGL ES, which seems to be a very portable API for game development. However, I don't know the first thing about this stuff! Every tutorial or book I find seems to be focused on iOS development OR Android development.

My target systems would be:
Windows, Android, iOS and MacOSX, but would love to also support Linux as well as Google Chrome using Google's Native Client.

My application that I would like to create will be very simple and will not technically require any 3D, but it will be a game. I don't mind and actually expect to individually write the core code, such as WinAPI or cocoatouch for input, etc. However, I'd really like to write as much as possible commonly in C++.

I own a Windows 7 Desktop, a Windows XP laptop, a Macbook Pro, an iPod Touch, and an Android phone. All suggestions are welcome to which approach I should go with as well as IDEs, but I would love to write the common code on the Windows systems.
Advertisement
http://code.google.com/p/libgdx/

Mabye that's useful?
OpenGL GL 2.0 is somehow a subset of normal OpenGL. Well, not exactly but if you write openGL ES 2.0 code it will work also on Windows, Linux and OSX unless you use some extensions that are only found on mobile.
Any good tutorials on how to properly set up/link to OpenGL ES 2.0?

I'm also looking for a good IDE to use with this as well.
I think what you want is to use the common subset of OpenGL ES 2.0 and OpenGL 4.0. Most platforms do not support both OpenGL and OpenGL ES except maybe if you're using the Mesa software renderer on GNU/Linux desktops (as opposed to Andoid/Linux devices).

GL context creation is entirely platform-specific. OpenGL ES was designed to work hand-in-hand with EGL (another Khronos group standard) for that purpose. Most desktop platforms use some native library to obtain a context. There are also cross-platform libraries like Qt and SDL 1.3/2.0 that will wrap and hide all that for you.

Stephen M. Webb
Professional Free Software Developer

I am developing a cross-platform graphics API abstraction that runs against D3D11, OpenGL3, GLES2 and WebGL (gfxapi, and its platform coverage matrix). OpenGL3, GLES2 and WebGL are so close to each other, that one can comfortably share the codebase for each. In my codebase there are minimal #ifdef cases for GLES2, mostly related to added checks for potentially unsupported features (e.g. non-pow2 mipmapping).

NaCl, iOS and Android all use GLES2, so you can get to a lot of platforms with the same API.

This topic is closed to new replies.

Advertisement