3
\$\begingroup\$

I need to convert code from OpenGL to OpenGL ES 1.1, I found that the GLUT library is missing in that. Can anyone tell me what do I do to replace glRasterPos3f in OpenGL?

\$\endgroup\$
  • 1
    \$\begingroup\$ What do you need glRasterPos3f for? Usually it's not reall needed; if you use it to render bitmaps such as letters, you will need to change your code so that it uses textured quads, for instance. \$\endgroup\$ – sam hocevar Dec 6 '11 at 9:15
3
\$\begingroup\$

You don't just convert from OpenGL to OpenGL ES, as OpenGL takes shortcuts which are not implemented in ES. As Sam points out, glRasterPos* for instance has no equivalent, because it is not very useful. I doubt glRasterPos3f() is the only function missing to port you project from GL to ES, and you won't find function-to-function replacements for most of them.

I'll advise you to learn what is OpenGL ES actually before starting anything. It is easily portable to OpenGL (the other way is NOT true), and will teach you some good habits (do not use glVertex*(), use object buffers, don't change states all the time, etc). But porting bare GL to ES ? Forget it.

|improve this answer|||||
\$\endgroup\$
  • \$\begingroup\$ So how would you recommend porting an OpenGL game to iOs? A rewrite of the engine? \$\endgroup\$ – RSH1 Dec 7 '11 at 16:18
  • 2
    \$\begingroup\$ This is a terrible answer. Of course, it's possible to port from OpenGL to OpenGL ES. A proper answer would list the steps. \$\endgroup\$ – jcoffland Nov 13 '19 at 21:03
1
\$\begingroup\$

This Qt4 example has some information about porting from OpenGL to OpenGL ES:

https://doc.qt.io/archives/qt-4.8/qt-opengl-hellogl-es-example.html

|improve this answer|||||
\$\endgroup\$
  • \$\begingroup\$ Welcome to GDSE & thanks for contributing. As currently written, this is a link only answer. Please consider editing it to include more information. \$\endgroup\$ – Pikalek Nov 18 '19 at 23:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.