org.osm2world.core.target.jogl
Class JOGLRendererVBO

Object
  extended by JOGLRendererVBO

public class JOGLRendererVBO
extends Object

renders the contents of a PrimitiveBuffer using JOGL. Uses vertex buffer objects (VBO) to speed up the process. If you don't need the renderer anymore, it's recommended to manually call freeResources() to delete the VBOs and other resources.


Field Summary
protected  GL2 gl
           
protected  JOGLTextureManager textureManager
           
 
Method Summary
protected  void finalize()
           
 void freeResources()
          frees all OpenGL resources associated with this object.
static int getValuesPerVertex(Material material)
          returns the number of values for each vertex in the vertex buffer layout appropriate for a given material.
 void render(Camera camera, Projection projection)
           
 
Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gl

protected GL2 gl

textureManager

protected JOGLTextureManager textureManager
Method Detail

getValuesPerVertex

public static int getValuesPerVertex(Material material)
returns the number of values for each vertex in the vertex buffer layout appropriate for a given material.


render

public void render(Camera camera,
                   Projection projection)

freeResources

public void freeResources()
frees all OpenGL resources associated with this object. Rendering will no longer be possible afterwards!


finalize

protected void finalize()
Overrides:
finalize in class Object