public class TLspViewServices extends Object
ILspView
provides a number of useful services that can be
leveraged by its layers, for performance or other reasons:
ILspRenderTarget
.
Rendering in the view is always directed into the topmost render target on
the stack.ILspVertexArrayRenderer
is used to perform efficient
management and rendering of vertex array data.ILspGLResourceCache
is available to
keep track of OpenGL
resources such as texture objects. By using this mechanism, applications can
monitor and restrict the amount of memory used for such resources.ILcdMultiKeyCache
provides a centralized cache for storing
the results of expensive computations. Painters can use this cache, for
instance, to save discretized and transformed representations of vector
shapes, so as to avoid having to recompute these for every repaint of the
view.ILspTaskExecutor
provides support for the asynchronous
execution of processing tasks. Painters can use this mechanism to avoid
overloading the event dispatch thread with expensive computations (such as
discretization and transformation of geometry). The task executor also
allows multiple painters to share a common thread pool, thus avoiding
excessive thread spawning in applications with many different painters.ILspTerrainSupport
adds terrain support to the view. This enables
terrain of flat 2D vector shapes and raster data on 3D terrains. Similar to
transparency, the provided TLspPaintPass
notifies painters
whether or not objects are being draped.
Modifier and Type | Method and Description |
---|---|
ILspGLResourceCache |
getGLResourceCache()
Gets the resource cache that can be used to store and retrieve
OpenGL resources from.
|
TLspGraphicsEffects |
getGraphicsEffects()
Returns the central registry for global graphics effects such as fog and lighting.
|
ILcdMultiKeyCache |
getMultiKeyCache()
Gets the cache that can be used to store and retrieve data
for layers and painters used in this view.
|
Stack<ILspRenderTarget> |
getRenderTargetStack()
Returns the stack of render targets for the view.
|
ILspTaskExecutor |
getTaskExecutor()
Returns the
ILspTaskExecutor
that is used to execute asynchronous tasks. |
ILspTaskExecutor |
getTaskExecutor(ILspLayer aLayer)
Returns the
ILspTaskExecutor
that is used to execute (asynchronous) tasks for the given layer. |
ILspTerrainSupport |
getTerrainSupport()
Support object for view's 3D terrain.
|
ILspVertexArrayRenderer |
getVertexArrayRenderer()
Returns the vertex array renderer which is associated with this view and
which can be used by painters to draw into this view.
|
public Stack<ILspRenderTarget> getRenderTargetStack()
ILspRenderTarget
objectspublic ILspVertexArrayRenderer getVertexArrayRenderer()
ILspVertexArrayRenderer
for this viewpublic ILspGLResourceCache getGLResourceCache()
public ILcdMultiKeyCache getMultiKeyCache()
public ILspTaskExecutor getTaskExecutor(ILspLayer aLayer)
ILspTaskExecutor
that is used to execute (asynchronous) tasks for the given layer.
If the layer is an ALspLayer
which is configured as synchronous,
a non-threaded executor is returned.aLayer
- the layer that is requesting the executorpublic ILspTaskExecutor getTaskExecutor()
ILspTaskExecutor
that is used to execute asynchronous tasks.
The task executor is intended for tasks related to the visualization of data. For example
operations that require a write lock on the model should not be executed on the task executor.public ILspTerrainSupport getTerrainSupport()
ILspWorldElevationStyle.ElevationMode
on the style
.public TLspGraphicsEffects getGraphicsEffects()