PDA

View Full Version : Going from OpenGL to OpenGL ES



mhoemann
06-13-2008, 02:03 PM
I'm having a somewhat hard time here. I've never used ES, (and I'm not magnificent at GL, but I'm learning) and now I've got a few lines of OpenGL code that's supposed to be used by ES. Of course, some of the lines don't work and I honestly don't have a clue what to do!

For reference's sake, the lines are:
glClearDepth
glLoadMatrixD

I've also got some GLUT code that I haven't the foggiest what to do with. Any point in the right direction would be extremely helpful.

I looked in the docs and found glClearDepthf and glClearDepthh in ES, but no reference to the original glClearDepth, and I'm not sure if it's the same thing, or even what the difference between f and x is!

Thanks a lot for any help anybody.

arekkusu
06-13-2008, 03:02 PM
ES does not support double precision, so those APIs are replaced by single precision (f) variants.

Read the difference spec (http://www.khronos.org/registry/gles/specs/1.1/es_cm_spec_1.1.12.pdf) for a comprehensive summary of the changes between GL and ES.

mhoemann
06-16-2008, 07:43 AM
Awesome! Thanks! I've only got on elittle problem cnverting a double to a GLFloat, but I'm sure I can get that knocked out.

And the other problem... this may be a dumb question, but I'm just having a lot of trouble finding information on the topic! In the scope of GLUT and GL ES, I'm still completely lost on what to do there. I can't use the glut framework, only GL ES. Are there any resources for help with this? Thanks so much!

arekkusu
06-16-2008, 10:10 AM
Windowing system setup will be platform-specific. Check your platform's documentation.