Convert OpenGL to OpenGL-ES

Is there any software program that can automatically translate desktop OpenGL to OpenGL-ES 1 or 2 ?
If not, is there an online reference that lists all OpenGL-ES equivalents of OpenGL? For example, the OpenGL-ES 1 equivalent of gltexgen(), because I am trying to port a 3d engine to Android and I know little about OpenGL and also the engine I am trying to port is quite big.

If you’re porting an OpenGL application, you kinda need to know how OpenGL works.

And for your specific request, no there is no tool that’s going to be able to automatically convert from compatibility OpenGL stuff like glTexGen to OpenGL ES 2.0. The latter is shader only, so shaders would have to be written for all of the non-shader stuff in the ancient GL code you’re porting. It would be exceedingly difficult to automate that process.

You have to generate texture coordinates from vertex positions in the client. For eye-relative texgen modes, that means you have to transform the vertices via the model-view matrix in the client. So there’s likely to be a performance hit relative to either legacy desktop OpenGL or any shader-based version.

For ES 2 or modern desktop OpenGL, you’d generate the texture coordinates in the vertex shader.

There isn’t a tool which will do any of this automatically. In many cases, a program written for desktop OpenGL either simply can’t be ported to an ES implementation or can’t be made to run at anything close to an acceptable frame rate.

What you could do.

  1. Is divide OpenGl call work from other work(camera , picking object exct … calculation)
  2. try to implement basic OpenGL es using java. In android GLSurfaceView and GLRenderer. Then you can move the openGL to openGL es. But you may nit find all the same GL function implemented. and OpenGL es may be slower
  3. Implement JNI call to be able to get the Conputed pard from C++.

When this basic work would be done it will be easyer for you to procces the rest.
But i can be a lot of work ;))