A table of objects that are saved within the graphics context for reference by handle later.
More...
Classes |
| class | BufferCacheKey |
Public Member Functions |
| void | begin_frame (GraphicsStateGuardianBase *gsg, Thread *current_thread) |
| | This is called by the GraphicsStateGuardian to indicate that it is about to begin processing of the frame.
|
| bool | dequeue_geom (Geom *geom) |
| | Removes a geom from the queued list of geoms to be prepared.
|
| bool | dequeue_index_buffer (GeomPrimitive *data) |
| | Removes a buffer from the queued list of data arrays to be prepared.
|
| bool | dequeue_shader (Shader *shader) |
| | Removes a shader from the queued list of shaders to be prepared.
|
| bool | dequeue_texture (Texture *tex) |
| | Removes a texture from the queued list of textures to be prepared.
|
| bool | dequeue_vertex_buffer (GeomVertexArrayData *data) |
| | Removes a buffer from the queued list of data arrays to be prepared.
|
| void | end_frame (Thread *current_thread) |
| | This is called by the GraphicsStateGuardian to indicate that it has finished processing of the frame.
|
| void | enqueue_geom (Geom *geom) |
| | Indicates that a geom would like to be put on the list to be prepared when the GSG is next ready to do this (presumably at the next frame).
|
| void | enqueue_index_buffer (GeomPrimitive *data) |
| | Indicates that a buffer would like to be put on the list to be prepared when the GSG is next ready to do this (presumably at the next frame).
|
| void | enqueue_shader (Shader *shader) |
| | Indicates that a shader would like to be put on the list to be prepared when the GSG is next ready to do this (presumably at the next frame).
|
| void | enqueue_texture (Texture *tex) |
| | Indicates that a texture would like to be put on the list to be prepared when the GSG is next ready to do this (presumably at the next frame).
|
| void | enqueue_vertex_buffer (GeomVertexArrayData *data) |
| | Indicates that a buffer would like to be put on the list to be prepared when the GSG is next ready to do this (presumably at the next frame).
|
| size_t | get_graphics_memory_limit () const |
| | Returns the artificial cap on graphics memory that will be imposed on this GSG.
|
| const string & | get_name () const |
| | Returns the name of the PreparedGraphicsObjects structure.
|
| int | get_num_prepared () const |
| | Returns the number of objects of any kind that have already been prepared on this GSG.
|
| int | get_num_prepared_geoms () const |
| | Returns the number of geoms that have already been prepared on this GSG.
|
| int | get_num_prepared_index_buffers () const |
| | Returns the number of index buffers that have already been prepared on this GSG.
|
| int | get_num_prepared_shaders () const |
| | Returns the number of shaders that have already been prepared on this GSG.
|
| int | get_num_prepared_textures () const |
| | Returns the number of textures that have already been prepared on this GSG.
|
| int | get_num_prepared_vertex_buffers () const |
| | Returns the number of vertex buffers that have already been prepared on this GSG.
|
| int | get_num_queued () const |
| | Returns the number of objects of any kind that have been enqueued to be prepared on this GSG.
|
| int | get_num_queued_geoms () const |
| | Returns the number of geoms that have been enqueued to be prepared on this GSG.
|
| int | get_num_queued_index_buffers () const |
| | Returns the number of index buffers that have been enqueued to be prepared on this GSG.
|
| int | get_num_queued_shaders () const |
| | Returns the number of shaders that have been enqueued to be prepared on this GSG.
|
| int | get_num_queued_textures () const |
| | Returns the number of textures that have been enqueued to be prepared on this GSG.
|
| int | get_num_queued_vertex_buffers () const |
| | Returns the number of vertex buffers that have been enqueued to be prepared on this GSG.
|
| bool | is_geom_prepared (const Geom *geom) const |
| | Returns true if the vertex buffer has been prepared on this GSG, false otherwise.
|
| bool | is_geom_queued (const Geom *geom) const |
| | Returns true if the geom has been queued on this GSG, false otherwise.
|
| bool | is_index_buffer_prepared (const GeomPrimitive *data) const |
| | Returns true if the index buffer has been prepared on this GSG, false otherwise.
|
| bool | is_index_buffer_queued (const GeomPrimitive *data) const |
| | Returns true if the index buffer has been queued on this GSG, false otherwise.
|
| bool | is_shader_prepared (const Shader *shader) const |
| | Returns true if the shader has been prepared on this GSG, false otherwise.
|
| bool | is_shader_queued (const Shader *shader) const |
| | Returns true if the shader has been queued on this GSG, false otherwise.
|
| bool | is_texture_prepared (const Texture *tex) const |
| | Returns true if the texture has been prepared on this GSG, false otherwise.
|
| bool | is_texture_queued (const Texture *tex) const |
| | Returns true if the texture has been queued on this GSG, false otherwise.
|
| bool | is_vertex_buffer_prepared (const GeomVertexArrayData *data) const |
| | Returns true if the vertex buffer has been prepared on this GSG, false otherwise.
|
| bool | is_vertex_buffer_queued (const GeomVertexArrayData *data) const |
| | Returns true if the vertex buffer has been queued on this GSG, false otherwise.
|
| GeomContext * | prepare_geom_now (Geom *geom, GraphicsStateGuardianBase *gsg) |
| | Immediately creates a new GeomContext for the indicated geom and returns it.
|
| IndexBufferContext * | prepare_index_buffer_now (GeomPrimitive *data, GraphicsStateGuardianBase *gsg) |
| | Immediately creates a new IndexBufferContext for the indicated data and returns it.
|
| ShaderContext * | prepare_shader_now (Shader *shader, GraphicsStateGuardianBase *gsg) |
| | Immediately creates a new ShaderContext for the indicated shader and returns it.
|
| TextureContext * | prepare_texture_now (Texture *tex, int view, GraphicsStateGuardianBase *gsg) |
| | Immediately creates a new TextureContext for the indicated texture and returns it.
|
| VertexBufferContext * | prepare_vertex_buffer_now (GeomVertexArrayData *data, GraphicsStateGuardianBase *gsg) |
| | Immediately creates a new VertexBufferContext for the indicated data and returns it.
|
| void | release_all () |
| | Releases all prepared objects of all kinds at once.
|
| int | release_all_geoms () |
| | Releases all geoms at once.
|
| int | release_all_index_buffers () |
| | Releases all datas at once.
|
| int | release_all_shaders () |
| | Releases all shaders at once.
|
| int | release_all_textures () |
| | Releases all textures at once.
|
| int | release_all_vertex_buffers () |
| | Releases all datas at once.
|
| void | release_geom (GeomContext *gc) |
| | Indicates that a geom context, created by a previous call to prepare_geom(), is no longer needed.
|
| void | release_index_buffer (IndexBufferContext *ibc) |
| | Indicates that a data context, created by a previous call to prepare_index_buffer(), is no longer needed.
|
| void | release_shader (ShaderContext *sc) |
| | Indicates that a shader context, created by a previous call to prepare_shader(), is no longer needed.
|
| void | release_texture (TextureContext *tc) |
| | Indicates that a texture context, created by a previous call to prepare_texture(), is no longer needed.
|
| void | release_texture (Texture *tex) |
| | Releases a texture if it has already been prepared, or removes it from the preparation queue.
|
| void | release_vertex_buffer (VertexBufferContext *vbc) |
| | Indicates that a data context, created by a previous call to prepare_vertex_buffer(), is no longer needed.
|
| void | set_graphics_memory_limit (size_t limit) |
| | Sets an artificial cap on graphics memory that will be imposed on this GSG.
|
| void | show_graphics_memory_lru (ostream &out) const |
| | Writes to the indicated ostream a report of how the various textures and vertex buffers are allocated in the LRU.
|
| void | show_residency_trackers (ostream &out) const |
| | Writes to the indicated ostream a report of how the various textures and vertex buffers are allocated in the LRU.
|
Public Attributes |
|
AdaptiveLru | _graphics_memory_lru |
|
BufferResidencyTracker | _ibuffer_residency |
|
bool | _support_released_buffer_cache |
|
BufferResidencyTracker | _texture_residency |
|
BufferResidencyTracker | _vbuffer_residency |
Friends |
|
class | GraphicsStateGuardian |
A table of objects that are saved within the graphics context for reference by handle later.
Generally, this represents things like OpenGL texture objects or display lists (or their equivalent on other platforms).
This object simply records the pointers to the context objects created by the individual GSG's; these context objects will contain enough information to reference or release the actual object stored within the graphics context.
These tables may potentially be shared between related graphics contexts, hence their storage here in a separate object rather than as a part of the GraphicsStateGuardian.
Definition at line 58 of file preparedGraphicsObjects.h.