deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.rendering.r3d.opengl.rendering.dem.manager
Class RenderFragmentManager

java.lang.Object
  extended by org.deegree.rendering.r3d.opengl.rendering.dem.manager.RenderFragmentManager

public class RenderFragmentManager
extends Object

Manages the loading, unloading and caching of RenderMeshFragment data and the enabling/disabling in a certain GL context.

Version:
$Revision: $, $Date: $
Author:
Markus Schneider, last edited by: $Author: schneider $

Field Summary
(package private)  int inMemory
           
(package private) static org.slf4j.Logger LOG
           
(package private)  RenderMeshFragment[] renderFragments
           
 
Constructor Summary
RenderFragmentManager(MultiresolutionMesh mrModel, int maxCached)
          Initialize the Manager with a multiresolution model.
 
Method Summary
 MultiresolutionMesh getMultiresolutionMesh()
           
(package private)  void release(Collection<RenderMeshFragment> fragments, javax.media.opengl.GL gl)
          Notifies the manager that the specified fragments are not needed for rendering anymore.
(package private)  void require(Set<RenderMeshFragment> fragments)
          Ensures that the data of the specified fragments is available in main memory or in GPU memory.
(package private)  void requireOnGPU(Collection<RenderMeshFragment> fragments, javax.media.opengl.GL gl)
          Ensures that the data of the specified fragments is available in GPU memory (ready for rendering).
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOG

static final org.slf4j.Logger LOG

renderFragments

final RenderMeshFragment[] renderFragments

inMemory

int inMemory
Constructor Detail

RenderFragmentManager

public RenderFragmentManager(MultiresolutionMesh mrModel,
                             int maxCached)
Initialize the Manager with a multiresolution model.

Parameters:
mrModel -
maxCached -
Method Detail

require

void require(Set<RenderMeshFragment> fragments)
       throws IOException
Ensures that the data of the specified fragments is available in main memory or in GPU memory.

Parameters:
fragments -
Throws:
IOException

requireOnGPU

void requireOnGPU(Collection<RenderMeshFragment> fragments,
                  javax.media.opengl.GL gl)
            throws IOException
Ensures that the data of the specified fragments is available in GPU memory (ready for rendering).

Parameters:
fragments -
gl -
Throws:
IOException

release

void release(Collection<RenderMeshFragment> fragments,
             javax.media.opengl.GL gl)
Notifies the manager that the specified fragments are not needed for rendering anymore.

It's up to the manager to decide to unload them from GPU and/or memory or to keep them cached.

Parameters:
fragments -
gl -

toString

public String toString()
Overrides:
toString in class Object

getMultiresolutionMesh

public MultiresolutionMesh getMultiresolutionMesh()
Returns:
the current mesh.

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>