Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


2D OpenGL ES wrapper with emulation on Windows?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 jwezorek   Crossbones+   -  Reputation: 1906

Like
0Likes
Like

Posted 09 March 2012 - 03:04 PM

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?

Sponsor:

#2 jwezorek   Crossbones+   -  Reputation: 1906

Like
0Likes
Like

Posted 10 March 2012 - 12:30 PM

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.

#3 Promit   Moderators   -  Reputation: 7336

Like
0Likes
Like

Posted 10 March 2012 - 02:57 PM

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.

#4 elanthis   Members   -  Reputation: 126

Like
0Likes
Like

Posted 10 March 2012 - 05:49 PM

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.

#5 jwezorek   Crossbones+   -  Reputation: 1906

Like
0Likes
Like

Posted 10 March 2012 - 07:26 PM

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.

#6 Katie   Members   -  Reputation: 1360

Like
1Likes
Like

Posted 11 March 2012 - 01:37 AM

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.}




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS