exlib and OpenGL-ES

exlib contains a lot of code to play with OpenGL-ES. Here we show simple examples on how to start with OpenGL on most platforms : UNIX/X11, Mac/Cocoa, Windows, iPhone, Android.

UNIX / X11

On a UNIX with X11 you can build the GL_X11 example with :

    cd <path to exlib>
    cd examples/cpp
    ./build GL_X11.cpp

You should see :



On a Windows, build GL_win32 with :

    DOS> <setup VisualC++>
    DOS> cd <path to exlib>
    DOS> cd examples\cpp
    DOS> build.bat  # it builds GL_win32.exe and plotter_win32.exe
    DOS> .\exlib_example_GL_win32.exe

Cocoa / iPhone

Under exlib/examples/[Cocoa,iPhone]/gl there is the material to build the equivalent of GL_X11 but for Cocoa and iPhone. For Cocoa, open with Xcode the Cocoa/gl/gl.xcodeproj and then do a "Build and Run" from the Build pulldown menu. For iPhone, you have first to install an iOS SDK. When done, open with Xcode the iPhone/gl/gl.xcodeproj and then do "Build and Run". In principle it is ready for "Debug / Simulator". At end you should see :



For Android, you have first to install an NDK. When done follow the README under Android/gl/REAMDE (the build is not done by using Eclipse, but by the using the Android makefiles).

The gl example is a good entry point to start some OpenGL-ES for the "smart devices". There is also the sg example to show how to to do some graphics with the exlib/sg scene graph classes.