SIO2 est un moteur basé sur OpenGL ES 1.1 et la plupart du code a été écrit en C. D’autres technologies comme OpenAL (son), LUA (script) ou Bullet (Physique) sont aussi utilisés.
Voici par exemple la routine d’initialisation SIO2 :
void sio2InitGL( void )
{
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glEnable(GL_CULL_FACE);
glCullFace(GL_BACK);
glFrontFace(GL_CCW);
glShadeModel(GL_SMOOTH);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glHint(GL_GENERATE_MIPMAP_HINT, GL_NICEST);
glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
glHint(GL_FOG_HINT, GL_NICEST);
glTexEnvi(GL_POINT_SPRITE_OES, GL_COORD_REPLACE_OES,
GL_TRUE);
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT,
&sio2->maniso);
glEnableClientState(GL_VERTEX_ARRAY);
printf("\nGL_VENDOR: %s\n",
(char *)glGetString(GL_VENDOR));
printf("GL_RENDERER: %s\n" ,
(char *)glGetString(GL_RENDERER));
printf("GL_VERSION: %s\n" ,
(char *)glGetString(GL_VERSION));
printf("GL_EXTENSIONS: %s\n" ,
(char *)glGetString(GL_EXTENSIONS));
#ifdef SIO2_DEBUG_GL
sio2ErrorGL( __FILE__, __FUNCTION__, __LINE__ );
#endif
}
{
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glEnable(GL_CULL_FACE);
glCullFace(GL_BACK);
glFrontFace(GL_CCW);
glShadeModel(GL_SMOOTH);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glHint(GL_GENERATE_MIPMAP_HINT, GL_NICEST);
glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
glHint(GL_FOG_HINT, GL_NICEST);
glTexEnvi(GL_POINT_SPRITE_OES, GL_COORD_REPLACE_OES,
GL_TRUE);
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT,
&sio2->maniso);
glEnableClientState(GL_VERTEX_ARRAY);
printf("\nGL_VENDOR: %s\n",
(char *)glGetString(GL_VENDOR));
printf("GL_RENDERER: %s\n" ,
(char *)glGetString(GL_RENDERER));
printf("GL_VERSION: %s\n" ,
(char *)glGetString(GL_VERSION));
printf("GL_EXTENSIONS: %s\n" ,
(char *)glGetString(GL_EXTENSIONS));
#ifdef SIO2_DEBUG_GL
sio2ErrorGL( __FILE__, __FUNCTION__, __LINE__ );
#endif
}