n3to93838 / iphone-glu

Automatically exported from code.google.com/p/iphone-glu
0 stars 0 forks source link

glu.h should not #include <OpenGLES/ES1/glext.h> #1

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It seems incorrect to #include <OpenGLES/ES1/glext.h> through glu.h

With iPhone OS 3.0, it is possible to develop applications using OpenGL ES
2.0, which requires only #include <OpenGLES/ES2/glext.h>

While one could #include both headers, doing so has two drawbacks:
1) <OpenGLES/ES2/glext.h> is not present in iPhone OS 2.X
2) When developing purely for OpenGL ES 2.0, there are many ES 1.1
functions that are invalid.  If <OpenGLES/ES1/glext.h> is included, this
won't be known until runtime, whereas if it is not included, attempting to
use 1.1-only functions will result in a compile-time error (making it
easier to detect invalid code).  A similar situation pertains when
developing code pure ES 1.1 code (i.e. ES 2.0 headers are unnecessary and
possibly harmful)

Original issue reported on code.google.com by davidkn...@gmail.com on 30 Jun 2009 at 9:28

GoogleCodeExporter commented 8 years ago
Note also that some of the source makes use of code which is invalid under 
OpenGL ES 2.0.
I believe that this is limited to the functions gluPerspective, gluLookat, and
gluOrtho2D in project.c.  However, since OpenGL ES 2.0 lacks a fixed function
pipeline, these functions should in any case never be invoked within an ES 2.0 
context.

Original comment by davidkn...@gmail.com on 30 Jun 2009 at 11:40