OpenGLES on iPhone... possible?

Previous topic - Next topic

bigsofty

Is it possible to access OpenGLES (in a similar fashion to the way GL.BAS does) from using INLINE on the iPhone?

If so, can anyone provide and example that I can expand upon please?
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

trucidare

i think you can access all OGLES functions like GL.gbas - try it but think about limitation of GL ES.
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

bigsofty

I would stick in some INLINE OpenGLES but the headers for OpenGL and OpenGLES are different, OpenGLES is not just a reduced version (well it is kinda :P) but it has its own unique commands.

I think I need to access the same OpenGLES.h header file as GLBasic to remain compliant with GLBasics official rendering context?

If so, is there any chance of Gernot pointing me in the direction of OpenGLES.h that GLBasic uses?
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kitty Hello

hum. Internally I have a set of macros that "wrap" the non existing function to the EGL equivalent. Just use the GL header and remove parts that do not work. Then add the 2 functions you might need individually. ES is just a bunch of say 10 functions or so anyway.

bigsofty

OK, sounds quite simple, so I add the EGL stuff that I want to the OpenGL headers and ignore the non OpenGLES stuff.

Something like...

Code (glbasic) Select

INLINE
#ifdef CENTERLINE_CLPP
#define signed
#endif
#define OGL ::
typedef unsigned char   EGLBoolean;
ENDINLINE

INLINE
} extern "C" { EGLBoolean __stdcall eglWaitGL( void );; }; namespace __GLBASIC__ {
ENDINLINE
FUNCTION eglWaitGL:
INLINE
OGL eglWaitGL();
ENDINLINE
ENDFUNCTION
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kitty Hello

use IMPORT wherever possible.

bigsofty

Thanks Gernot and thanks  Trucidare(you were absolutely correct!  :good:)
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)