GFXResource
Engine/source/gfx/gfxResource.h
Mixin for the purpose of tracking GFX resources owned by a GFXDevice.
Public Friends
class
Private Attributes
bool
Helper flag to check new resource allocations.
Public Functions
The resource should put a description of itself (number of vertices, size/width of texture, etc.) in buffer.
bool
registerResourceWithDevice(GFXDevice * device)
Registers this resource with the given device.
Detailed Description
Mixin for the purpose of tracking GFX resources owned by a GFXDevice.
There are many types of resource that are allocated from a GFXDevice that must be participatory in device resets. For instance, all default pool DirectX resources have to be involved when the device resets. Render targets in all APIs need to unbind themselves when resets happen.
This system is also handy for accounting purposes. For instance, we may want to traverse all registered VBs, IBs, Textures, or RTs in order to determine what, if any, items are still allocated. This can be used in leak reports, memory usage reports, etc.
Public Friends
Private Attributes
bool mFlagged
Helper flag to check new resource allocations.
GFXResource * mNextResource
GFXDevice * mOwningDevice
GFXResource * mPrevResource
Public Functions
GFXResource()
~GFXResource()
clearFlag()
describeSelf()
The resource should put a description of itself (number of vertices, size/width of texture, etc.) in buffer.
Reimplemented by: GFXD3D11OcclusionQuery, GFXD3D11QueryFence, GFXD3D11ShaderConstBuffer, GFXCubemap, GFXCubemapArray, GFXGeneralFence, GFXPrimitiveBuffer, GFXShader, GFXStateBlock, GFXTarget, GFXTextureArray, GFXTextureObject, GFXVertexBuffer, GFXGLAppleFence, GFXGLOcclusionQuery, GFXGLShader, GFXGLShaderConstBuffer, GFXGLTextureObject, GFXGLTextureTarget, GFXOcclusionQuery
getNextResource()
getOwningDevice()
getPrevResource()
isFlagged()
registerResourceWithDevice(GFXDevice * device)
Registers this resource with the given device.
resurrect()
When called the resource should restore all device sensitive information destroyed by zombify()
Reimplemented by: GFXD3D11Cubemap, GFXD3D11CubemapArray, GFXD3D11OcclusionQuery, GFXD3D11PrimitiveBuffer, GFXD3D11QueryFence, GFXD3D11ShaderConstBuffer, GFXD3D11Shader, GFXD3D11StateBlock, GFXD3D11TextureTarget, GFXD3D11WindowTarget, GFXD3D11TextureObject, GFXD3D11VertexBuffer, GFXGeneralFence, GFXGLAppleFence, GFXGLCubemap, GFXGLCubemapArray, GFXGLOcclusionQuery, GFXGLPrimitiveBuffer, GFXGLShader, GFXGLShaderConstBuffer, GFXGLStateBlock, GFXGLTextureObject, GFXGLTextureTarget, GFXGLVertexBuffer, GFXGLWindowTarget, GFXNullTextureObject, GFXNullCubemap, GFXNullCubemapArray, GFXNullVertexBuffer, GFXNullPrimitiveBuffer, GFXNullStateBlock, GFXNullWindowTarget, GFXD3D11TextureArray, GFXGLTextureArray, GFXNullTextureArray, GFXOcclusionQuery, GFXTextureArray
setFlag()
zombify()
When called the resource should destroy all device sensitive information (e.g. D3D resources in D3DPOOL_DEFAULT.
Reimplemented by: GFXD3D11Cubemap, GFXD3D11CubemapArray, GFXD3D11OcclusionQuery, GFXD3D11PrimitiveBuffer, GFXD3D11QueryFence, GFXD3D11ShaderConstBuffer, GFXD3D11Shader, GFXD3D11StateBlock, GFXD3D11TextureTarget, GFXD3D11WindowTarget, GFXD3D11TextureObject, GFXD3D11VertexBuffer, GFXGeneralFence, GFXGLAppleFence, GFXGLCubemap, GFXGLCubemapArray, GFXGLOcclusionQuery, GFXGLPrimitiveBuffer, GFXGLShader, GFXGLShaderConstBuffer, GFXGLStateBlock, GFXGLTextureObject, GFXGLTextureTarget, GFXGLVertexBuffer, GFXGLWindowTarget, GFXNullTextureObject, GFXNullCubemap, GFXNullCubemapArray, GFXNullVertexBuffer, GFXNullPrimitiveBuffer, GFXNullStateBlock, GFXNullWindowTarget, GFXD3D11TextureArray, GFXGLTextureArray, GFXNullTextureArray, GFXOcclusionQuery, GFXTextureArray