|
Wildvine Engine
Referencia Doxygen del codigo propio de Wildvine Engine.
|
Encapsula un ID3D11Device y facilita la creación de recursos gráficos en Direct3D 11.
Más...
#include <Device.h>
Métodos públicos | |
| HRESULT | CreateBuffer (const D3D11_BUFFER_DESC *pDesc, const D3D11_SUBRESOURCE_DATA *pInitialData, ID3D11Buffer **ppBuffer) |
| Crea un Buffer genérico (vertex, index, constant, etc.). | |
| HRESULT | CreateDepthStencilView (ID3D11Resource *pResource, const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc, ID3D11DepthStencilView **ppDepthStencilView) |
| Crea una Depth Stencil View. | |
| HRESULT | CreateInputLayout (const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs, unsigned int NumElements, const void *pShaderBytecodeWithInputSignature, unsigned int BytecodeLength, ID3D11InputLayout **ppInputLayout) |
| Crea un Input Layout. | |
| HRESULT | CreatePixelShader (const void *pShaderBytecode, unsigned int BytecodeLength, ID3D11ClassLinkage *pClassLinkage, ID3D11PixelShader **ppPixelShader) |
| Crea un Pixel Shader. | |
| HRESULT | CreateRenderTargetView (ID3D11Resource *pResource, const D3D11_RENDER_TARGET_VIEW_DESC *pDesc, ID3D11RenderTargetView **ppRTView) |
| Crea una Render Target View. | |
| HRESULT | CreateSamplerState (const D3D11_SAMPLER_DESC *pSamplerDesc, ID3D11SamplerState **ppSamplerState) |
| Crea un Sampler State. | |
| HRESULT | CreateTexture2D (const D3D11_TEXTURE2D_DESC *pDesc, const D3D11_SUBRESOURCE_DATA *pInitialData, ID3D11Texture2D **ppTexture2D) |
| Crea una textura 2D. | |
| HRESULT | CreateVertexShader (const void *pShaderBytecode, unsigned int BytecodeLength, ID3D11ClassLinkage *pClassLinkage, ID3D11VertexShader **ppVertexShader) |
| Crea un Vertex Shader. | |
| void | destroy () |
| Device ()=default | |
| void | init () |
| void | render () |
| void | update () |
| ~Device ()=default | |
Atributos públicos | |
| ID3D11Device * | m_device = nullptr |
| Puntero al dispositivo Direct3D 11. | |
Esta clase actúa como un contenedor del objeto ID3D11Device. Expone métodos que encapsulan la creación de vistas, texturas, shaders, estados y buffers para simplificar el manejo del ciclo de vida de los recursos gráficos.
ID3D11DeviceContext.
|
default |
|
default |
| HRESULT Device::CreateBuffer | ( | const D3D11_BUFFER_DESC * | pDesc, |
| const D3D11_SUBRESOURCE_DATA * | pInitialData, | ||
| ID3D11Buffer ** | ppBuffer | ||
| ) |
| pDesc | Descriptor del buffer. |
| pInitialData | Datos iniciales opcionales (puede ser nullptr). |
| ppBuffer | Puntero de salida al buffer creado. |
Definición en la lÃnea 229 del archivo Device.cpp.
Hace referencia a ERROR, m_device y MESSAGE.
Referenciado por Buffer::createBuffer().
| HRESULT Device::CreateDepthStencilView | ( | ID3D11Resource * | pResource, |
| const D3D11_DEPTH_STENCIL_VIEW_DESC * | pDesc, | ||
| ID3D11DepthStencilView ** | ppDepthStencilView | ||
| ) |
| pResource | Recurso asociado (textura con flag D3D11_BIND_DEPTH_STENCIL). |
| pDesc | Descriptor de la DSV (puede ser nullptr). |
| ppDepthStencilView | Puntero de salida. |
Definición en la lÃnea 71 del archivo Device.cpp.
| HRESULT Device::CreateInputLayout | ( | const D3D11_INPUT_ELEMENT_DESC * | pInputElementDescs, |
| unsigned int | NumElements, | ||
| const void * | pShaderBytecodeWithInputSignature, | ||
| unsigned int | BytecodeLength, | ||
| ID3D11InputLayout ** | ppInputLayout | ||
| ) |
| pInputElementDescs | Descriptores de entrada. |
| NumElements | Número de elementos en el arreglo. |
| pShaderBytecodeWithInputSignature | Bytecode del shader que define la firma. |
| BytecodeLength | Tamaño del bytecode. |
| ppInputLayout | Puntero de salida al input layout. |
Definición en la lÃnea 133 del archivo Device.cpp.
Hace referencia a ERROR, m_device y MESSAGE.
Referenciado por InputLayout::init().
| HRESULT Device::CreatePixelShader | ( | const void * | pShaderBytecode, |
| unsigned int | BytecodeLength, | ||
| ID3D11ClassLinkage * | pClassLinkage, | ||
| ID3D11PixelShader ** | ppPixelShader | ||
| ) |
| pShaderBytecode | Bytecode compilado del shader. |
| BytecodeLength | Tamaño del bytecode. |
| pClassLinkage | Enlace de clases (opcional). |
| ppPixelShader | Puntero de salida al pixel shader. |
Definición en la lÃnea 168 del archivo Device.cpp.
Hace referencia a ERROR, m_device y MESSAGE.
Referenciado por ShaderProgram::CreateShader().
| HRESULT Device::CreateRenderTargetView | ( | ID3D11Resource * | pResource, |
| const D3D11_RENDER_TARGET_VIEW_DESC * | pDesc, | ||
| ID3D11RenderTargetView ** | ppRTView | ||
| ) |
| pResource | Recurso de origen (usualmente una textura). |
| pDesc | Descriptor de la RTV (puede ser nullptr para usar valores por defecto). |
| ppRTView | Puntero de salida donde se guarda la RTV creada. |
S_OK si fue exitoso; código HRESULT en caso de error. Definición en la lÃnea 13 del archivo Device.cpp.
| HRESULT Device::CreateSamplerState | ( | const D3D11_SAMPLER_DESC * | pSamplerDesc, |
| ID3D11SamplerState ** | ppSamplerState | ||
| ) |
| pSamplerDesc | Descriptor del sampler. |
| ppSamplerState | Puntero de salida al estado de muestreo. |
Definición en la lÃnea 201 del archivo Device.cpp.
Hace referencia a ERROR, m_device y MESSAGE.
Referenciado por SamplerState::init().
| HRESULT Device::CreateTexture2D | ( | const D3D11_TEXTURE2D_DESC * | pDesc, |
| const D3D11_SUBRESOURCE_DATA * | pInitialData, | ||
| ID3D11Texture2D ** | ppTexture2D | ||
| ) |
| pDesc | Descriptor de la textura. |
| pInitialData | Datos iniciales opcionales (puede ser nullptr). |
| ppTexture2D | Puntero de salida a la textura creada. |
Definición en la lÃnea 42 del archivo Device.cpp.
Hace referencia a ERROR, m_device y MESSAGE.
Referenciado por Texture::CreateCubemap(), anonymous_namespace{Texture.cpp}::CreateTextureFromRGBA() y Texture::init().
| HRESULT Device::CreateVertexShader | ( | const void * | pShaderBytecode, |
| unsigned int | BytecodeLength, | ||
| ID3D11ClassLinkage * | pClassLinkage, | ||
| ID3D11VertexShader ** | ppVertexShader | ||
| ) |
| pShaderBytecode | Bytecode compilado del shader. |
| BytecodeLength | Tamaño del bytecode. |
| pClassLinkage | Enlace de clases (opcional). |
| ppVertexShader | Puntero de salida al vertex shader. |
Definición en la lÃnea 100 del archivo Device.cpp.
Hace referencia a ERROR, m_device y MESSAGE.
Referenciado por ShaderProgram::CreateShader().
| void Device::destroy | ( | ) |
Definición en la lÃnea 8 del archivo Device.cpp.
Hace referencia a m_device y SAFE_RELEASE.
Referenciado por BaseApp::destroy().
| void Device::init | ( | ) |
| void Device::render | ( | ) |
| void Device::update | ( | ) |
| ID3D11Device* Device::m_device = nullptr |
Creado en init(), liberado en destroy().
Definición en la lÃnea 146 del archivo Device.h.
Referenciado por ForwardRenderer::createBlendStates(), CreateBuffer(), Buffer::createBuffer(), Texture::CreateCubemap(), CreateDepthStencilView(), CreateInputLayout(), ShaderProgram::CreateInputLayout(), CreatePixelShader(), CreateRenderTargetView(), CreateSamplerState(), ShaderProgram::CreateShader(), ShaderProgram::CreateShader(), CreateTexture2D(), anonymous_namespace{Texture.cpp}::CreateTextureFromRGBA(), CreateVertexShader(), destroy(), SamplerState::init(), DepthStencilState::init(), Buffer::init(), ShaderProgram::init(), Texture::init(), RasterizerState::init(), SwapChain::init(), RenderTargetView::init(), DepthStencilView::init(), DepthStencilView::init(), RenderTargetView::init(), Texture::init(), Buffer::init(), Texture::init(), RasterizerState::init() y GUI::init().