opengl es 2.0, sdl, and python


BookTracker

Still Fresh
Joined
Oct 14, 2008
Messages
21
Im beginning game dev after a few years of understanding programing languages, at first i thought SDL was a clear way to go for great compat. across many systems, but that soon became impossible...
i wanted to used svg with good looking graphics and some interesting lighting effects. Although there isnt much info out there explaining this specifically, it seems to me that sdl cant handle the kind of effects i want.
Plus opengl would give me room for cel shading, and all of the fun stuff the world can possibly be made of. :D(also learning opengl is a gateway to a lot of other doors, in many ways).

so basically i decided to choose python+opengl, i thought about sticking with c or whatnot, but i really enjoy everything about python.

that leads me to opengl ES for our beloved pandy, i wanted to know the differences between es 2.0 and the regular GL so that i could use functions that would be usable in both, thus reducing the 'porting' needed to 0 or nearly so.(from embedded devices to pcs)

also, im assuming a few things:
first that functions in ogl ES are the same(it just doesnt have all of the complete ones).
also, that ogl ES 'runs' on hardware that can do opengl 1.5(in order to reach a greater number of hardwares).
And finally, that there is nothing extra special about the pandy's ogl es 2.0.(as in pandy specific).

I'm also wondering if i could scrap using sdl altogether, in favor of anything else to control sound/input/everything else... but i haven't found a clear alternative yet.

anyhow, i may have said some none sense here, and i consider my self a newbie in the game/graphics dev area.
However i grew up with more math then most programmers will ever see, and i dont fear long hours of coding.

so if anyone could give me some answers to the questions above and/or hint/clues to learning ogl ES 2.0 i would greatly appreciate it.

cheers, and thanks for any response

Andy.
 
- The behaviour of some functions changed.
When I ported my emulator from OpenGL to OpenGL ES a lot of work was required in some regions.
You should take a look at the GDC talk or the specification which is relative to the OpenGL one.
- You have no fixed function pipeline anymore.
Thats probably where most of the work is spend as you have to learn GLSL for ES. Check out rendermonkey, it was a huge help for me
- ES needs an emulator to run on hardware which was not designed for it.
And as far as I know the emulator by PVR requires OpenGL 2.0, I m not sure though.
- SDL has nothing to do with this, its up to you after all.
Personally I try to stick with OpenAL and raw input device + tslib for now because I never liked the idea behind SDL.

//Edit: Cel-Shading is one of the most basic effects I have seen and can easily be done in software if you have enough cpu time to waste.
 
JayFoxRox said:
- The behaviour of some functions changed.
When I ported my emulator from OpenGL to OpenGL ES a lot of work was required in some regions.
You should take a look at the GDC talk or the specification which is relative to the OpenGL one.
- You have no fixed function pipeline anymore.
Thats probably where most of the work is spend as you have to learn GLSL for ES. Check out rendermonkey, it was a huge help for me
- ES needs an emulator to run on hardware which was not designed for it.
And as far as I know the emulator by PVR requires OpenGL 2.0, I m not sure though.
- SDL has nothing to do with this, its up to you after all.
Personally I try to stick with OpenAL and raw input device + tslib for now because I never liked the idea behind SDL.

//Edit: Cel-Shading is one of the most basic effects I have seen and can easily be done in software if you have enough cpu time to waste.

thats all very interesting, ill check it out when i get home...
but im still not clear on one subject:
is ES just a stripped down version of ogl, as in i can write code for ES then use it for ogl(without any further rewrite).
or do equivalent functions have different names, or behave differently altogether.

also, about openal, yeah i had my eye on that, but will it be available on the pandy?
thats the major question. and also about cel-shading, yeah but considering embedded devices i want to leave everything i can in hardware so the cpu can be free to run the game.

thanks for the reply,

cheers :wink:
 
http://www.khronos.org/registry/gles/

Look where it says, "OpenGL ES 2 specific"
There's a full specification that lists everything about ES 2, a difference specification that shows what they removed from OpenGL 2 to make ES 2, and a full + difference that shows all the ES 2 functions and also mentions what OGL 2 functions were left out.

Yeah, I believe it's defined relative to OpenGL ES 2.0, not 1.5. It has shaders, anyway.

The function names are pretty much the same, but there's a few key differences:
OpenGL ES does not support the glVertex / glColor functions.
It DOES support vertex arrays and vertex buffer objects.
OpenGL ES does not provide a matrix stack. You have to manage your own matrices or find an external library to help you manage them. I believe GLUT|ES does this, but I'm not sure how good it is.
OpenGL ES does not provide some of the more obscure functions such as line stipple, pixel operations... Things you don't really use anyway

OpenGL 2 supports shaders. OpenGL ES 2 enforces shaders.
There are no default shading schemes. You have to write your own vertex and pixel shaders and use those for coloring, lighting, fog, everything.
 
just to share what i've learned with anyone:
yes OGL ES 2.0 should be used in most cases and you can directly use many features in other gls, without 'adapting'.(check the specifications)
sdl has its many limitations, but to draw a screen you can also use gtkglext(gtk+) and many others out there.(you need something like that for OGL to run on anyways)
openal is a good alternative for sound.
when using SVGs like me, cairo graphics is your best cross plat/lib friend and it plays with OGL.

and finally, python works great with all of these.

cheers
 
Back
Top