4
\$\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
  • 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\$ Dec 6, 2011 at 9:15

2 Answers 2

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.

\$\endgroup\$
2
  • \$\begingroup\$ So how would you recommend porting an OpenGL game to iOs? A rewrite of the engine? \$\endgroup\$ Dec 7, 2011 at 16:18
  • 4
    \$\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, 2019 at 21:03
2
\$\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

\$\endgroup\$
1
  • 1
    \$\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, 2019 at 23:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .