Panda3D
Public Member Functions | List of all members
PreparedGraphicsObjects Class Reference

A table of objects that are saved within the graphics context for reference by handle later. More...

Inheritance diagram for PreparedGraphicsObjects:
ReferenceCount

Public Member Functions

bool dequeueGeom (Geom geom)
 Removes a geom from the queued list of geoms to be prepared. More...
 
bool dequeueIndexBuffer (GeomPrimitive data)
 Removes a buffer from the queued list of data arrays to be prepared. More...
 
bool dequeueSampler (const SamplerState sampler)
 Removes a sampler from the queued list of samplers to be prepared. More...
 
bool dequeueShader (Shader shader)
 Removes a shader from the queued list of shaders to be prepared. More...
 
bool dequeueShaderBuffer (ShaderBuffer data)
 Removes a buffer from the queued list of data arrays to be prepared. More...
 
bool dequeueTexture (Texture tex)
 Removes a texture from the queued list of textures to be prepared. More...
 
bool dequeueVertexBuffer (GeomVertexArrayData data)
 Removes a buffer from the queued list of data arrays to be prepared. More...
 
 enqueueGeom (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). More...
 
 enqueueIndexBuffer (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). More...
 
 enqueueSampler (const SamplerState sampler)
 Indicates that a sampler 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). More...
 
 enqueueShader (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). More...
 
 enqueueShaderBuffer (ShaderBuffer 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). More...
 
 enqueueTexture (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). More...
 
 enqueueVertexBuffer (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). More...
 
int getGraphicsMemoryLimit ()
 Returns the artificial cap on graphics memory that will be imposed on this GSG. More...
 
str getName ()
 Returns the name of the PreparedGraphicsObjects structure. More...
 
int getNumPrepared ()
 Returns the number of objects of any kind that have already been prepared on this GSG. More...
 
int getNumPreparedGeoms ()
 Returns the number of geoms that have already been prepared on this GSG. More...
 
int getNumPreparedIndexBuffers ()
 Returns the number of index buffers that have already been prepared on this GSG. More...
 
int getNumPreparedSamplers ()
 Returns the number of samplers that have already been prepared on this GSG. More...
 
int getNumPreparedShaderBuffers ()
 Returns the number of index buffers that have already been prepared on this GSG. More...
 
int getNumPreparedShaders ()
 Returns the number of shaders that have already been prepared on this GSG. More...
 
int getNumPreparedTextures ()
 Returns the number of textures that have already been prepared on this GSG. More...
 
int getNumPreparedVertexBuffers ()
 Returns the number of vertex buffers that have already been prepared on this GSG. More...
 
int getNumQueued ()
 Returns the number of objects of any kind that have been enqueued to be prepared on this GSG. More...
 
int getNumQueuedGeoms ()
 Returns the number of geoms that have been enqueued to be prepared on this GSG. More...
 
int getNumQueuedIndexBuffers ()
 Returns the number of index buffers that have been enqueued to be prepared on this GSG. More...
 
int getNumQueuedSamplers ()
 Returns the number of samplers that have been enqueued to be prepared on this GSG. More...
 
int getNumQueuedShaderBuffers ()
 Returns the number of index buffers that have been enqueued to be prepared on this GSG. More...
 
int getNumQueuedShaders ()
 Returns the number of shaders that have been enqueued to be prepared on this GSG. More...
 
int getNumQueuedTextures ()
 Returns the number of textures that have been enqueued to be prepared on this GSG. More...
 
int getNumQueuedVertexBuffers ()
 Returns the number of vertex buffers that have been enqueued to be prepared on this GSG. More...
 
bool isGeomPrepared (const Geom geom)
 Returns true if the vertex buffer has been prepared on this GSG, false otherwise. More...
 
bool isGeomQueued (const Geom geom)
 Returns true if the geom has been queued on this GSG, false otherwise. More...
 
bool isIndexBufferPrepared (const GeomPrimitive data)
 Returns true if the index buffer has been prepared on this GSG, false otherwise. More...
 
bool isIndexBufferQueued (const GeomPrimitive data)
 Returns true if the index buffer has been queued on this GSG, false otherwise. More...
 
bool isSamplerPrepared (const SamplerState sampler)
 Returns true if the sampler has been prepared on this GSG, false otherwise. More...
 
bool isSamplerQueued (const SamplerState sampler)
 Returns true if the sampler has been queued on this GSG, false otherwise. More...
 
bool isShaderBufferPrepared (const ShaderBuffer data)
 Returns true if the index buffer has been prepared on this GSG, false otherwise. More...
 
bool isShaderBufferQueued (const ShaderBuffer data)
 Returns true if the index buffer has been queued on this GSG, false otherwise. More...
 
bool isShaderPrepared (const Shader shader)
 Returns true if the shader has been prepared on this GSG, false otherwise. More...
 
bool isShaderQueued (const Shader shader)
 Returns true if the shader has been queued on this GSG, false otherwise. More...
 
bool isTexturePrepared (const Texture tex)
 Returns true if the texture has been prepared on this GSG, false otherwise. More...
 
bool isTextureQueued (const Texture tex)
 Returns true if the texture has been queued on this GSG, false otherwise. More...
 
bool isVertexBufferPrepared (const GeomVertexArrayData data)
 Returns true if the vertex buffer has been prepared on this GSG, false otherwise. More...
 
bool isVertexBufferQueued (const GeomVertexArrayData data)
 Returns true if the vertex buffer has been queued on this GSG, false otherwise. More...
 
GeomContext prepareGeomNow (Geom geom, GraphicsStateGuardianBase gsg)
 Immediately creates a new GeomContext for the indicated geom and returns it. More...
 
IndexBufferContext prepareIndexBufferNow (GeomPrimitive data, GraphicsStateGuardianBase gsg)
 Immediately creates a new IndexBufferContext for the indicated data and returns it. More...
 
SamplerContext prepareSamplerNow (const SamplerState sampler, GraphicsStateGuardianBase gsg)
 Immediately creates a new SamplerContext for the indicated sampler and returns it. More...
 
BufferContext prepareShaderBufferNow (ShaderBuffer data, GraphicsStateGuardianBase gsg)
 Immediately creates a new BufferContext for the indicated data and returns it. More...
 
ShaderContext prepareShaderNow (Shader shader, GraphicsStateGuardianBase gsg)
 Immediately creates a new ShaderContext for the indicated shader and returns it. More...
 
TextureContext prepareTextureNow (Texture tex, int view, GraphicsStateGuardianBase gsg)
 Immediately creates a new TextureContext for the indicated texture and returns it. More...
 
VertexBufferContext prepareVertexBufferNow (GeomVertexArrayData data, GraphicsStateGuardianBase gsg)
 Immediately creates a new VertexBufferContext for the indicated data and returns it. More...
 
 releaseAll ()
 Releases all prepared objects of all kinds at once. More...
 
int releaseAllGeoms ()
 Releases all geoms at once. More...
 
int releaseAllIndexBuffers ()
 Releases all datas at once. More...
 
int releaseAllSamplers ()
 Releases all samplers at once. More...
 
int releaseAllShaderBuffers ()
 Releases all datas at once. More...
 
int releaseAllShaders ()
 Releases all shaders at once. More...
 
int releaseAllTextures ()
 Releases all textures at once. More...
 
int releaseAllVertexBuffers ()
 Releases all datas at once. More...
 
 releaseGeom (GeomContext gc)
 Indicates that a geom context, created by a previous call to prepare_geom(), is no longer needed. More...
 
 releaseIndexBuffer (IndexBufferContext ibc)
 Indicates that a data context, created by a previous call to prepare_index_buffer(), is no longer needed. More...
 
 releaseSampler (SamplerContext sc)
 Indicates that a sampler context, created by a previous call to prepare_sampler(), is no longer needed. More...
 
 releaseSampler (const SamplerState sampler)
 Releases a sampler if it has already been prepared, or removes it from the preparation queue. More...
 
 releaseShader (ShaderContext sc)
 Indicates that a shader context, created by a previous call to prepare_shader(), is no longer needed. More...
 
 releaseShaderBuffer (BufferContext bc)
 Indicates that a data context, created by a previous call to prepare_shader_buffer(), is no longer needed. More...
 
 releaseTexture (Texture tex)
 Releases a texture if it has already been prepared, or removes it from the preparation queue. More...
 
 releaseTexture (TextureContext tc)
 Indicates that a texture context, created by a previous call to prepare_texture(), is no longer needed. More...
 
 releaseVertexBuffer (VertexBufferContext vbc)
 Indicates that a data context, created by a previous call to prepare_vertex_buffer(), is no longer needed. More...
 
 setGraphicsMemoryLimit (int limit)
 Sets an artificial cap on graphics memory that will be imposed on this GSG. More...
 
 showGraphicsMemoryLru (Ostream out)
 Writes to the indicated ostream a report of how the various textures and vertex buffers are allocated in the LRU. More...
 
 showResidencyTrackers (Ostream out)
 Writes to the indicated ostream a report of how the various textures and vertex buffers are allocated in the LRU. More...
 
- Public Member Functions inherited from ReferenceCount
int getRefCount ()
 Returns the current reference count. More...
 
 ref ()
 Explicitly increments the reference count. More...
 
bool testRefCountIntegrity ()
 Does some easy checks to make sure that the reference count isn't completely bogus. More...
 
bool testRefCountNonzero ()
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More...
 
bool unref ()
 Explicitly decrements the reference count. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ReferenceCount
static TypeHandle getClassType ()
 
- Public Attributes inherited from ReferenceCount
int ref_count
 The current reference count. More...
 

Detailed Description

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.

Member Function Documentation

◆ dequeueGeom()

bool dequeueGeom ( Geom  geom)

Removes a geom from the queued list of geoms to be prepared.

Normally it is not necessary to call this, unless you change your mind about preparing it at the last minute, since the geom will automatically be dequeued and prepared at the next frame.

The return value is true if the geom is successfully dequeued, false if it had not been queued.

◆ dequeueIndexBuffer()

bool dequeueIndexBuffer ( GeomPrimitive  data)

Removes a buffer from the queued list of data arrays to be prepared.

Normally it is not necessary to call this, unless you change your mind about preparing it at the last minute, since the data will automatically be dequeued and prepared at the next frame.

The return value is true if the buffer is successfully dequeued, false if it had not been queued.

◆ dequeueSampler()

bool dequeueSampler ( const SamplerState  sampler)

Removes a sampler from the queued list of samplers to be prepared.

Normally it is not necessary to call this, unless you change your mind about preparing it at the last minute, since the sampler will automatically be dequeued and prepared at the next frame.

The return value is true if the sampler is successfully dequeued, false if it had not been queued.

◆ dequeueShader()

bool dequeueShader ( Shader  shader)

Removes a shader from the queued list of shaders to be prepared.

Normally it is not necessary to call this, unless you change your mind about preparing it at the last minute, since the shader will automatically be dequeued and prepared at the next frame.

The return value is true if the shader is successfully dequeued, false if it had not been queued.

◆ dequeueShaderBuffer()

bool dequeueShaderBuffer ( ShaderBuffer  data)

Removes a buffer from the queued list of data arrays to be prepared.

Normally it is not necessary to call this, unless you change your mind about preparing it at the last minute, since the data will automatically be dequeued and prepared at the next frame.

The return value is true if the buffer is successfully dequeued, false if it had not been queued.

◆ dequeueTexture()

bool dequeueTexture ( Texture  tex)

Removes a texture from the queued list of textures to be prepared.

Normally it is not necessary to call this, unless you change your mind about preparing it at the last minute, since the texture will automatically be dequeued and prepared at the next frame.

The return value is true if the texture is successfully dequeued, false if it had not been queued.

◆ dequeueVertexBuffer()

bool dequeueVertexBuffer ( GeomVertexArrayData  data)

Removes a buffer from the queued list of data arrays to be prepared.

Normally it is not necessary to call this, unless you change your mind about preparing it at the last minute, since the data will automatically be dequeued and prepared at the next frame.

The return value is true if the buffer is successfully dequeued, false if it had not been queued.

◆ enqueueGeom()

enqueueGeom ( 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).

◆ enqueueIndexBuffer()

enqueueIndexBuffer ( 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).

◆ enqueueSampler()

enqueueSampler ( const SamplerState  sampler)

Indicates that a sampler 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).

◆ enqueueShader()

enqueueShader ( 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).

◆ enqueueShaderBuffer()

enqueueShaderBuffer ( ShaderBuffer  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).

◆ enqueueTexture()

enqueueTexture ( 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).

◆ enqueueVertexBuffer()

enqueueVertexBuffer ( 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).

◆ getGraphicsMemoryLimit()

int getGraphicsMemoryLimit ( )

Returns the artificial cap on graphics memory that will be imposed on this GSG.

See set_graphics_memory_limit().

◆ getName()

str getName ( )

Returns the name of the PreparedGraphicsObjects structure.

This is an arbitrary name that serves mainly to uniquify the context for PStats reporting.

◆ getNumPrepared()

int getNumPrepared ( )

Returns the number of objects of any kind that have already been prepared on this GSG.

◆ getNumPreparedGeoms()

int getNumPreparedGeoms ( )

Returns the number of geoms that have already been prepared on this GSG.

◆ getNumPreparedIndexBuffers()

int getNumPreparedIndexBuffers ( )

Returns the number of index buffers that have already been prepared on this GSG.

◆ getNumPreparedSamplers()

int getNumPreparedSamplers ( )

Returns the number of samplers that have already been prepared on this GSG.

◆ getNumPreparedShaderBuffers()

int getNumPreparedShaderBuffers ( )

Returns the number of index buffers that have already been prepared on this GSG.

◆ getNumPreparedShaders()

int getNumPreparedShaders ( )

Returns the number of shaders that have already been prepared on this GSG.

◆ getNumPreparedTextures()

int getNumPreparedTextures ( )

Returns the number of textures that have already been prepared on this GSG.

◆ getNumPreparedVertexBuffers()

int getNumPreparedVertexBuffers ( )

Returns the number of vertex buffers that have already been prepared on this GSG.

◆ getNumQueued()

int getNumQueued ( )

Returns the number of objects of any kind that have been enqueued to be prepared on this GSG.

◆ getNumQueuedGeoms()

int getNumQueuedGeoms ( )

Returns the number of geoms that have been enqueued to be prepared on this GSG.

◆ getNumQueuedIndexBuffers()

int getNumQueuedIndexBuffers ( )

Returns the number of index buffers that have been enqueued to be prepared on this GSG.

◆ getNumQueuedSamplers()

int getNumQueuedSamplers ( )

Returns the number of samplers that have been enqueued to be prepared on this GSG.

◆ getNumQueuedShaderBuffers()

int getNumQueuedShaderBuffers ( )

Returns the number of index buffers that have been enqueued to be prepared on this GSG.

◆ getNumQueuedShaders()

int getNumQueuedShaders ( )

Returns the number of shaders that have been enqueued to be prepared on this GSG.

◆ getNumQueuedTextures()

int getNumQueuedTextures ( )

Returns the number of textures that have been enqueued to be prepared on this GSG.

◆ getNumQueuedVertexBuffers()

int getNumQueuedVertexBuffers ( )

Returns the number of vertex buffers that have been enqueued to be prepared on this GSG.

◆ isGeomPrepared()

bool isGeomPrepared ( const Geom  geom)

Returns true if the vertex buffer has been prepared on this GSG, false otherwise.

◆ isGeomQueued()

bool isGeomQueued ( const Geom  geom)

Returns true if the geom has been queued on this GSG, false otherwise.

◆ isIndexBufferPrepared()

bool isIndexBufferPrepared ( const GeomPrimitive  data)

Returns true if the index buffer has been prepared on this GSG, false otherwise.

◆ isIndexBufferQueued()

bool isIndexBufferQueued ( const GeomPrimitive  data)

Returns true if the index buffer has been queued on this GSG, false otherwise.

◆ isSamplerPrepared()

bool isSamplerPrepared ( const SamplerState  sampler)

Returns true if the sampler has been prepared on this GSG, false otherwise.

◆ isSamplerQueued()

bool isSamplerQueued ( const SamplerState  sampler)

Returns true if the sampler has been queued on this GSG, false otherwise.

◆ isShaderBufferPrepared()

bool isShaderBufferPrepared ( const ShaderBuffer  data)

Returns true if the index buffer has been prepared on this GSG, false otherwise.

◆ isShaderBufferQueued()

bool isShaderBufferQueued ( const ShaderBuffer  data)

Returns true if the index buffer has been queued on this GSG, false otherwise.

◆ isShaderPrepared()

bool isShaderPrepared ( const Shader  shader)

Returns true if the shader has been prepared on this GSG, false otherwise.

◆ isShaderQueued()

bool isShaderQueued ( const Shader  shader)

Returns true if the shader has been queued on this GSG, false otherwise.

◆ isTexturePrepared()

bool isTexturePrepared ( const Texture  tex)

Returns true if the texture has been prepared on this GSG, false otherwise.

◆ isTextureQueued()

bool isTextureQueued ( const Texture  tex)

Returns true if the texture has been queued on this GSG, false otherwise.

◆ isVertexBufferPrepared()

bool isVertexBufferPrepared ( const GeomVertexArrayData  data)

Returns true if the vertex buffer has been prepared on this GSG, false otherwise.

◆ isVertexBufferQueued()

bool isVertexBufferQueued ( const GeomVertexArrayData  data)

Returns true if the vertex buffer has been queued on this GSG, false otherwise.

◆ prepareGeomNow()

GeomContext prepareGeomNow ( Geom  geom,
GraphicsStateGuardianBase  gsg 
)

Immediately creates a new GeomContext for the indicated geom and returns it.

This assumes that the GraphicsStateGuardian is the currently active rendering context and that it is ready to accept new geoms. If this is not necessarily the case, you should use enqueue_geom() instead.

Normally, this function is not called directly. Call Geom::prepare_now() instead.

The GeomContext contains all of the pertinent information needed by the GSG to keep track of this one particular geom, and will exist as long as the geom is ready to be rendered.

When either the Geom or the PreparedGraphicsObjects object destructs, the GeomContext will be deleted.

◆ prepareIndexBufferNow()

IndexBufferContext prepareIndexBufferNow ( GeomPrimitive  data,
GraphicsStateGuardianBase  gsg 
)

Immediately creates a new IndexBufferContext for the indicated data and returns it.

This assumes that the GraphicsStateGuardian is the currently active rendering context and that it is ready to accept new datas. If this is not necessarily the case, you should use enqueue_index_buffer() instead.

Normally, this function is not called directly. Call Data::prepare_now() instead.

The IndexBufferContext contains all of the pertinent information needed by the GSG to keep track of this one particular data, and will exist as long as the data is ready to be rendered.

When either the Data or the PreparedGraphicsObjects object destructs, the IndexBufferContext will be deleted.

◆ prepareSamplerNow()

SamplerContext prepareSamplerNow ( const SamplerState  sampler,
GraphicsStateGuardianBase  gsg 
)

Immediately creates a new SamplerContext for the indicated sampler and returns it.

This assumes that the GraphicsStateGuardian is the currently active rendering context and that it is ready to accept new samplers. If this is not necessarily the case, you should use enqueue_sampler() instead.

Normally, this function is not called directly. Call Sampler::prepare_now() instead.

The SamplerContext contains all of the pertinent information needed by the GSG to keep track of this one particular sampler, and will exist as long as the sampler is ready to be rendered.

When either the Sampler or the PreparedGraphicsObjects object destructs, the SamplerContext will be deleted.

◆ prepareShaderBufferNow()

BufferContext prepareShaderBufferNow ( ShaderBuffer  data,
GraphicsStateGuardianBase  gsg 
)

Immediately creates a new BufferContext for the indicated data and returns it.

This assumes that the GraphicsStateGuardian is the currently active rendering context and that it is ready to accept new datas. If this is not necessarily the case, you should use enqueue_shader_buffer() instead.

Normally, this function is not called directly. Call Data::prepare_now() instead.

The BufferContext contains all of the pertinent information needed by the GSG to keep track of this one particular data, and will exist as long as the data is ready to be rendered.

When either the Data or the PreparedGraphicsObjects object destructs, the BufferContext will be deleted.

◆ prepareShaderNow()

ShaderContext prepareShaderNow ( Shader  shader,
GraphicsStateGuardianBase  gsg 
)

Immediately creates a new ShaderContext for the indicated shader and returns it.

This assumes that the GraphicsStateGuardian is the currently active rendering context and that it is ready to accept new shaders. If this is not necessarily the case, you should use enqueue_shader() instead.

Normally, this function is not called directly. Call Shader::prepare_now() instead.

The ShaderContext contains all of the pertinent information needed by the GSG to keep track of this one particular shader, and will exist as long as the shader is ready to be rendered.

When either the Shader or the PreparedGraphicsObjects object destructs, the ShaderContext will be deleted.

◆ prepareTextureNow()

TextureContext prepareTextureNow ( Texture  tex,
int  view,
GraphicsStateGuardianBase  gsg 
)

Immediately creates a new TextureContext for the indicated texture and returns it.

This assumes that the GraphicsStateGuardian is the currently active rendering context and that it is ready to accept new textures. If this is not necessarily the case, you should use enqueue_texture() instead.

Normally, this function is not called directly. Call Texture::prepare_now() instead.

The TextureContext contains all of the pertinent information needed by the GSG to keep track of this one particular texture, and will exist as long as the texture is ready to be rendered.

When either the Texture or the PreparedGraphicsObjects object destructs, the TextureContext will be deleted.

◆ prepareVertexBufferNow()

VertexBufferContext prepareVertexBufferNow ( GeomVertexArrayData  data,
GraphicsStateGuardianBase  gsg 
)

Immediately creates a new VertexBufferContext for the indicated data and returns it.

This assumes that the GraphicsStateGuardian is the currently active rendering context and that it is ready to accept new datas. If this is not necessarily the case, you should use enqueue_vertex_buffer() instead.

Normally, this function is not called directly. Call Data::prepare_now() instead.

The VertexBufferContext contains all of the pertinent information needed by the GSG to keep track of this one particular data, and will exist as long as the data is ready to be rendered.

When either the Data or the PreparedGraphicsObjects object destructs, the VertexBufferContext will be deleted.

◆ releaseAll()

releaseAll ( )

Releases all prepared objects of all kinds at once.

◆ releaseAllGeoms()

int releaseAllGeoms ( )

Releases all geoms at once.

This will force them to be reloaded into geom memory for all GSG's that share this object. Returns the number of geoms released.

◆ releaseAllIndexBuffers()

int releaseAllIndexBuffers ( )

Releases all datas at once.

This will force them to be reloaded into data memory for all GSG's that share this object. Returns the number of datas released.

◆ releaseAllSamplers()

int releaseAllSamplers ( )

Releases all samplers at once.

This will force them to be reloaded for all GSG's that share this object. Returns the number of samplers released.

◆ releaseAllShaderBuffers()

int releaseAllShaderBuffers ( )

Releases all datas at once.

This will force them to be reloaded into data memory for all GSG's that share this object. Returns the number of datas released.

◆ releaseAllShaders()

int releaseAllShaders ( )

Releases all shaders at once.

This will force them to be reloaded into shader memory for all GSG's that share this object. Returns the number of shaders released.

◆ releaseAllTextures()

int releaseAllTextures ( )

Releases all textures at once.

This will force them to be reloaded into texture memory for all GSG's that share this object. Returns the number of textures released.

◆ releaseAllVertexBuffers()

int releaseAllVertexBuffers ( )

Releases all datas at once.

This will force them to be reloaded into data memory for all GSG's that share this object. Returns the number of datas released.

◆ releaseGeom()

releaseGeom ( GeomContext  gc)

Indicates that a geom context, created by a previous call to prepare_geom(), is no longer needed.

The driver resources will not be freed until some GSG calls update(), indicating it is at a stage where it is ready to release geoms–this prevents conflicts from threading or multiple GSG's sharing geoms (we have no way of knowing which graphics context is currently active, or what state it's in, at the time release_geom is called).

◆ releaseIndexBuffer()

releaseIndexBuffer ( IndexBufferContext  ibc)

Indicates that a data context, created by a previous call to prepare_index_buffer(), is no longer needed.

The driver resources will not be freed until some GSG calls update(), indicating it is at a stage where it is ready to release datas–this prevents conflicts from threading or multiple GSG's sharing datas (we have no way of knowing which graphics context is currently active, or what state it's in, at the time release_index_buffer is called).

◆ releaseSampler() [1/2]

releaseSampler ( SamplerContext  sc)

Indicates that a sampler context, created by a previous call to prepare_sampler(), is no longer needed.

The driver resources will not be freed until some GSG calls update(), indicating it is at a stage where it is ready to release samplers.

◆ releaseSampler() [2/2]

releaseSampler ( const SamplerState  sampler)

Releases a sampler if it has already been prepared, or removes it from the preparation queue.

◆ releaseShader()

releaseShader ( ShaderContext  sc)

Indicates that a shader context, created by a previous call to prepare_shader(), is no longer needed.

The driver resources will not be freed until some GSG calls update(), indicating it is at a stage where it is ready to release shaders–this prevents conflicts from threading or multiple GSG's sharing shaders (we have no way of knowing which graphics context is currently active, or what state it's in, at the time release_shader is called).

◆ releaseShaderBuffer()

releaseShaderBuffer ( BufferContext  bc)

Indicates that a data context, created by a previous call to prepare_shader_buffer(), is no longer needed.

The driver resources will not be freed until some GSG calls update(), indicating it is at a stage where it is ready to release datas–this prevents conflicts from threading or multiple GSG's sharing datas (we have no way of knowing which graphics context is currently active, or what state it's in, at the time release_shader_buffer is called).

◆ releaseTexture() [1/2]

releaseTexture ( Texture  tex)

Releases a texture if it has already been prepared, or removes it from the preparation queue.

◆ releaseTexture() [2/2]

releaseTexture ( TextureContext  tc)

Indicates that a texture context, created by a previous call to prepare_texture(), is no longer needed.

The driver resources will not be freed until some GSG calls update(), indicating it is at a stage where it is ready to release textures–this prevents conflicts from threading or multiple GSG's sharing textures (we have no way of knowing which graphics context is currently active, or what state it's in, at the time release_texture is called).

◆ releaseVertexBuffer()

releaseVertexBuffer ( VertexBufferContext  vbc)

Indicates that a data context, created by a previous call to prepare_vertex_buffer(), is no longer needed.

The driver resources will not be freed until some GSG calls update(), indicating it is at a stage where it is ready to release datas–this prevents conflicts from threading or multiple GSG's sharing datas (we have no way of knowing which graphics context is currently active, or what state it's in, at the time release_vertex_buffer is called).

◆ setGraphicsMemoryLimit()

setGraphicsMemoryLimit ( int  limit)

Sets an artificial cap on graphics memory that will be imposed on this GSG.

This limits the total amount of graphics memory, including texture memory and vertex buffer memory, that will be consumed by the GSG, regardless of whether the hardware claims to provide more graphics memory than this. It is useful to put a ceiling on graphics memory consumed, since some drivers seem to allow the application to consume more memory than the hardware can realistically support.

◆ showGraphicsMemoryLru()

showGraphicsMemoryLru ( Ostream  out)

Writes to the indicated ostream a report of how the various textures and vertex buffers are allocated in the LRU.

◆ showResidencyTrackers()

showResidencyTrackers ( Ostream  out)

Writes to the indicated ostream a report of how the various textures and vertex buffers are allocated in the LRU.