The Dirtchamber
A mixed reality testing environment for real-time global illumination algorithms
|
Wrapper for a Direct3D texture object. More...
#include <texture.h>
Public Member Functions | |
void | to_vs (ID3D11DeviceContext *context, UINT slot) |
Upload the shader resource to register slot of a vertex shader. | |
void | to_ps (ID3D11DeviceContext *context, UINT slot) |
Upload the shader resource to register slot of a pixel shader. | |
virtual void | destroy () |
Destroy the shader_resource and free all memory. | |
void * | map (ID3D11DeviceContext *context) |
Map the texture to a pointer. More... | |
void | create (ID3D11Device *device, D3D11_TEXTURE2D_DESC desc, D3D11_SUBRESOURCE_DATA *subresource=nullptr) |
Create an empty texture from given descriptor, other resource or single parameters. | |
void | create (ID3D11Device *device, const DXGI_SURFACE_DESC &desc, UINT num_mipmaps=1) |
Create an empty texture from given descriptor, other resource or single parameters. | |
void | create (ID3D11Device *device, UINT width, UINT height, DXGI_FORMAT format, const DXGI_SAMPLE_DESC &msaa, UINT num_mipmaps=1) |
Create an empty texture from given descriptor, other resource or single parameters. | |
Public Member Functions inherited from dune::shader_resource | |
virtual void | to_gs (ID3D11DeviceContext *context, UINT slot) |
Upload the shader resource to register slot of a geometry shader. | |
virtual void | to_cs (ID3D11DeviceContext *context, UINT slot) |
Upload the shader resource to register slot of a compute shader. | |
Wrapper for a Direct3D texture object.
Wraps up a Direct3D texture object with its own shader resource view.
void * dune::texture::map | ( | ID3D11DeviceContext * | context | ) |
Map the texture to a pointer.
Maps the texture to a pointer. If the texture is CPU accessible, this pointer can be read from and/or written to.
context | A Direct3D context. |
Referenced by dune::render_target::update().