The Dirtchamber
A mixed reality testing environment for real-time global illumination algorithms
Public Member Functions | List of all members
dune::render_target Class Reference

A render target wrapper. More...

#include <render_target.h>

Inheritance diagram for dune::render_target:
dune::texture dune::shader_resource

Public Member Functions

virtual void destroy ()
 Destroy the shader_resource and free all memory.
 
void update (ID3D11DeviceContext *context)
 If this texture is cached, this method will copy the CPU side cache to the render_target texture.
 
void copy (const BYTE *data, size_t num_bytes)
 Copy a data array of num_bytes size into the internal CPU cache.
 
template<typename T >
data ()
 Returns a pointer to the internal CPU texture cache.
 
void enable_cached (bool c)
 Enable caching. If this is true, creating this object will copy the initial subresource to a cache.
 
bool cached ()
 Enable caching. If this is true, creating this object will copy the initial subresource to a cache.
 
- Public Member Functions inherited from dune::texture
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.
 
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.
 

Detailed Description

A render target wrapper.

A render target is a texture that can be "written" to from the outside, whether it be from the GPU or the CPU. A render_target object can be created in several different manners (from manuel specification to supplying common descriptors) and provides functions to query views later used to read from or render to it. Furthermore, depending on the parameters supplied to create(), render_target objects can also be CPU mapped to read or write from/to them.


The documentation for this class was generated from the following files: