opengl to es

  • Follow


Is there an easy way to convert opengl code to opengl es?

Thanks.

0
Reply bob 3/21/2011 7:18:35 PM

On Mar 21, 2:18=A0pm, bob <b...@coolgroups.com> wrote:
> Is there an easy way to convert opengl code to opengl es?
>
> Thanks.

First, which version of OpenGL ES? Version 1 is a fixed-functionality
pipeline with no shader support. Version 2 is fully programmable with
most fixed functionality removed. If your code is a blend of fixed and
programmable functionality you'll have some work ahead of you. None of
it is terribly daunting and there are numerous documents to help sort
out what is and isn't in each spec. Probably the best place to start
is:

http://www.khronos.org/opengles/

So, in general the answer is likely to be "no". However, the answer
may be yes if you target OpenGL ES2 and in your current code you:

* use only vertex buffers for geometry and not glBegin() and glEnd()
* set up your projections manually, without using glOrtho, etc.
* use the lowest common denominator when reading pixels out of a
texture and not something like glGetTexImage()
* and many more...

In OpenGL, as you may well know, there are many ways to do the same
thing. In OpenGL ES most of the duplicity has been stripped away.
Typically the newest and most flexible (or best performing) "way" has
been preserved and the others removed. There's a good chance your
existing code will be using something that doesn't exist is ES and
must be modified to accomplish the same thing in a different way.

HTH,
Mike
0
Reply moosh (1) 3/29/2011 2:31:51 PM


1 Replies
208 Views

(page loaded in 0.054 seconds)


Reply: