2D OpenGL ES wrapper with emulation on Windows?

Started by
4 comments, last by Katie 12 years, 1 month ago
Is there an open source 2d framework that is implemented on top of OpenGL ES and supports building on windows with OpenGL ES functionality emulated using regular OpenGL or DirectX?

I searched and didn't really find this. There is a project called Gles2D but looks a little orphaned and looks to be Linux only anyway. Imagination Technologies offers an OpenGL ES on OpenGL wrapper for both Windows and Linux as part of the PowerVR PC Emulation SDK which I am going to download ... do people use this commonly? Do you have to pay for it?

I'm kind of shocked that what I'm looking for here doesn't exist -- am I just searching wrong or something?
Advertisement
Anybody? What about just a 2D framework that sits on OpenGL (not ES). I know it's not hard to set this sort of thing up and I've done it under DirectX, but why re-invent the wheel? To be clear, I'm not looking for a "game engine". I'm looking for a small 2D layer exposing blit functionality, basically, that is written to OpenGL.
To be honest, I just compiled our ES 2.0 code on Windows recently, and except from some naming differences it just worked. All I did was patch up the naming via preprocessor defines.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
SDL or SFML probably do what you want. There are a ton of 2D rendering libraries that can use GL/D3D, but that all have various caveats.

Note that "blitting" over modern graphics APIs is not necessarily what you want to be doing. You're much better off with a simple scene graph that can probably batch draw calls and offer an automatic texture atlas.

Old-style 2D rendering is simply not the right way to get proper use of modern graphics hardware, and in some cases it's just faster to do that kind of rendering completely on the CPU.
By blitting I just mean rendering 2D images i.e. drawing sprites. When I did this on top of DirectX years ago, my "model" was a single two triangle quad that I used to draw everything, if it's faster to use more than one quad like this fine ... I'm not an expert on this stuff, but the idea is the same. I'd just rather not have to set everything up myself.

I don't think SDL or SFML officially support iOS. I do think people have gotten SDL to work on iPhones by compiling it themselves, so this might be an option -- although I've always been confused about the relationship between SDL and OpenGL (if you use SDL, is setting up OpenGl for 2D hidden from you, just taken care of, allowing you to do hardware accelerating draws without doing anything but setting up SDL? ... if not, what am I getting out of SDL?) and also I don't like that SDL doesn't support rendering with subpixel accuracy meaning drawing sprite x to position (20.5, 30.3333) or whatever (as far as I know).

Basically what I'm looking for is a C/C++ library for doing 2D rendering on iOS that is as light-weight as possible. Things like Cocoa2d and Marmalade and so forth are fine except that a lot of them are commercial products, marmalade is anyway, but more importantly they are big frameworks that want you to use their classes for things which makes it hard to port from existing codebases without throwing away a lot of code and re-implementing.
ARM ship a GLES emulation layer which will run on NVidia or AMD cards on Windows and Linux which is free for non-commercial use; see http://www.malideveloper.com/developer-resources/tools/opengl-es-20-emulator.php

The last time I talked to the devs, they were working on a Mac version so it's on the way. It's pretty easy to use -- link against the library, run your application. Shader code should be re-written on the fly, API entry points bounce through and have the right restrictions to match the ES spec.

{Disclaimer; I worked for ARM in the same group which produces this.}

This topic is closed to new replies.

Advertisement