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

Wrapper for a Direct3D texture object. More...

#include <texture.h>

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

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.
 

Detailed Description

Wrapper for a Direct3D texture object.

Wraps up a Direct3D texture object with its own shader resource view.

Member Function Documentation

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.

Parameters
contextA Direct3D context.
Returns
A pointer to the texture buffer.

Referenced by dune::render_target::update().


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