Subsections

3.5 OpenGL Mapping to Java

The JNI and data-type mapping (see 3.2.1 on page [*]) is allready specified above.

What still need to be specified is the place of the java OpenGL native function declarations and which OpenGL librarys should be wrapped.

3.5.1 Convinient Placement

Because OpenGL is not an object-orientated API, OpenGL programmers does not use methods. To support the same OpenGL environment, we will use a java class, which contains:

3.5.2 Keeping the OpenGL C-API

3.5.2.1 The Naming Convention

The GL4Java interface supports the OpenGLFrame class, which contains all OpenGL and GLU functions (glut in the near future :-) ! The naming convention of all gl* and glu* functions in the OpenGLFrame class is exactly the same as in the original, so there are no problems in porting C code. Datatypes java does not support will by supported by binary compatible types, e.g. for unsigned byte in glColor4ubv, GL4Java uses a byte-array !

sven goethel 2001-12-11