Jump to content
  • Advertisement
Sign in to follow this  
crynas

OpenGL Cross-platform renderer in OpenGL ES

This topic is 2521 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

[color=#000000][font=Arial,]
I'm writing an cross-platform renderer. I want to use it on Windows, Linux, Android, iOS.[/font][color=#000000][font=Arial,]
Do you think that it is a good idea to avoid absolute abstraction and write it directly in OpenGL ES 2.0?[/font][color=#000000][font=Arial,]
As far as I know I should be able to compile it on PC against standard OpenGL, with only a small changes in code that handles context and connection to windowing system.[/font]

Share this post


Link to post
Share on other sites
Advertisement
I am doing exactly this with my 'barebones' skeleton for my Ludum Dare entries. That'll be on github this weekend.

I am using only that subset of OpenGL that is OpenGLES compatible, i.e. all shaders and attribute arrays. My utility code to compile a shader, for example, sometimes puts a "precision lowp float;" on the front before compiling etc; that kind of platform adaption. The game code is 100% and portable.

Because I'm keen to compile for Google Native Client too, I'm having to abstract file io and make it all async; that's the biggest deal.

http://williamedwardscoder.tumblr.com/post/16108484818/competition-mini-ludum-dare-21st-22nd-jan-2012
http://www.ludumdare.com/compo/2012/01/19/an-excited-first-time-jam-team-cant-wait-for-the-weekend-minild31/

Share this post


Link to post
Share on other sites
Imgtek PowerVR SDK has a pretty good ES 2.0 abstraction layer for Windows, and it is fast because it literally piggybacks on the actual OpenGL driver provided by the system. There is also linux port of the SDK, but I haven't tried that myself. Anyway, if you want make sure that your project complies with the ES 2.0 spec, PowerVR SDK is a good way to go. Bonus, the SDK will actually load textures in PVR compression format, the same used on iOS devices. Which means you can implement a large part of your game engine core under Windows then cross compile to iOS, if needed. Also, debugging is faster too.

Share this post


Link to post
Share on other sites
You can use standard OpenGL on desktop. But to be better sure that your application will run on mobile devices you can use OpenGL ES API as Tachikoma suggests.
There are quite a fewdifferent OpenGL ES 2.0 abstraction layers/emulators for Windows from different vendors of mobile GPUs:

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!