A 3-D Rendering Library for
Mobile Devices

SourceForge.net Logo
Home Getting Started Documentation References Legal

Architecture Guide

Library Structure

The 3-D Rendering Library is distributed as a Windows DLL named libGLES_CM.DLL in accordance with the Open GL ES API specification. The public interface of this DLL is defined in the header files GLES/egl.h, GLES/gl.h and GLES/egltypes.h. An import library libGLES_CM.LIB can be used to link your executable against this DLL.

Even the OpenGL ES API is specified as a C language API, this 3-D Rendering Library as actually implemented using C++. Therefore, a corresponding set of functions is provided that maps the C language API into calls of the underlying C++ implementation.


Runtime Code Generation

A key differentiator of the current project from other, similar open source efforts is the runtime code generation approach that is used to create optimized versions of scan conversion functions at runtime based on the current rasterization settings.

Each call into glDrawArrays or glDrawElements causes the rasterizer to re-validate and initialize its internal settings before the corresponding sequence of geometric primitives is sent down the graphics pipeline. As part of this re-initialization, the rasterizer employs a code generator to compile an optimized function for the scanline conversion using a JIT compiler that is part of the library. A function cache capturing the most recently used versions of scanline functions ensures that recompilation of function code is kept at a minimum. As input to the JIT the code generator  uses a variant of Johnson's triVM intermediate language, an intermediate language specifically designed for code optimization targeting the ARM architecture.

To be extended...