External texture data, allowing to inject low-level constructs within the renderers. More...
Public Member Functions | |
| ~TextureExternalData () | |
| void * | getResource () const |
| RESOURCE_STATE | getState () const |
| unsigned int | getId () const |
| TEXTURE_RENDER_FLAG | getRenderFlag () const |
| RENDERING_API | getTargetApi () const |
| bool | getGammaCorrect () const |
| void | setRenderFlag (TEXTURE_RENDER_FLAG value) |
| void | setGammaCorrect (bool value) |
Static Public Member Functions | |
| static TextureExternalData | forDx11 (void *resource) |
| static TextureExternalData | forDx12 (void *resource, RESOURCE_STATE state) |
| static TextureExternalData | forGles (unsigned int id) |
External texture data, allowing to inject low-level constructs within the renderers.
This structure has to be built for the target renderer using the right static construction method. Each renderer has its specificities that needs to be taken into account when feeding an external resource.
Injected resources need to be available within the device / context internal to the target renderer. To access these, check Renderer::getInternalData().
Such injection should be limited to the strict minimum, as it can lead to incorrect internal rendering state if wrongly managed. However, they can be necessary to integrate external libraries within the rendering pipeline.
| nkGraphics::TextureExternalData::~TextureExternalData | ( | ) |
Destructor.
| void* nkGraphics::TextureExternalData::getResource | ( | ) | const |
| RESOURCE_STATE nkGraphics::TextureExternalData::getState | ( | ) | const |
| unsigned int nkGraphics::TextureExternalData::getId | ( | ) | const |
| TEXTURE_RENDER_FLAG nkGraphics::TextureExternalData::getRenderFlag | ( | ) | const |
| RENDERING_API nkGraphics::TextureExternalData::getTargetApi | ( | ) | const |
| bool nkGraphics::TextureExternalData::getGammaCorrect | ( | ) | const |
| void nkGraphics::TextureExternalData::setRenderFlag | ( | TEXTURE_RENDER_FLAG | value | ) |
Sets the render flag the resource given is expected to be compatible with.
| value | The render flag to assign to the resource. |
| void nkGraphics::TextureExternalData::setGammaCorrect | ( | bool | value | ) |
Sets whether the resource should be gamma corrected or not. This will drive the final views formats, SRGB or not.
| value | If it should be gamma corrected (true) or not (false). |
|
static |
Creates an instance of external data ready for the Dx11Renderer. Use this version when feeding data to the system when initialized using RENDERING_API::D3D11.
| resource | The ID3D11Resource to use. |
|
static |
Creates an instance of external data ready for the Dx12Renderer. Use this version when feeding data to the system when initialized using RENDERING_API::D3D12.
| resource | The ID3D12Resource to use. |
| state | The state the resource is in. |
|
static |
Creates an instance of external data ready for the GlesRenderer. Use this version when feeding data to the system when initialized using RENDERING_API::GLES.
| id | The resource id to use. |