Wildvine Engine
Referencia Doxygen del codigo propio de Wildvine Engine.
Cargando...
Buscando...
Nada coincide
Device.h
Ir a la documentación de este archivo.
1
6#pragma once
7#include "Prerequisites.h"
8
20class
21Device {
22public:
23 Device() = default;
24 ~Device() = default;
25
26 void
28
29 void
31
32 void
34
35 void
36 destroy();
37
46 HRESULT
47 CreateRenderTargetView(ID3D11Resource *pResource,
48 const D3D11_RENDER_TARGET_VIEW_DESC *pDesc,
49 ID3D11RenderTargetView **ppRTView);
50
58 HRESULT
59 CreateTexture2D(const D3D11_TEXTURE2D_DESC* pDesc,
60 const D3D11_SUBRESOURCE_DATA* pInitialData,
61 ID3D11Texture2D** ppTexture2D);
62
70 HRESULT
71 CreateDepthStencilView(ID3D11Resource* pResource,
72 const D3D11_DEPTH_STENCIL_VIEW_DESC* pDesc,
73 ID3D11DepthStencilView** ppDepthStencilView);
74
83 HRESULT
84 CreateVertexShader(const void* pShaderBytecode,
85 unsigned int BytecodeLength,
86 ID3D11ClassLinkage* pClassLinkage,
87 ID3D11VertexShader** ppVertexShader);
88
98 HRESULT
99 CreateInputLayout(const D3D11_INPUT_ELEMENT_DESC* pInputElementDescs,
100 unsigned int NumElements,
101 const void* pShaderBytecodeWithInputSignature,
102 unsigned int BytecodeLength,
103 ID3D11InputLayout** ppInputLayout);
104
113 HRESULT
114 CreatePixelShader(const void* pShaderBytecode,
115 unsigned int BytecodeLength,
116 ID3D11ClassLinkage* pClassLinkage,
117 ID3D11PixelShader** ppPixelShader);
118
126 HRESULT
127 CreateBuffer(const D3D11_BUFFER_DESC* pDesc,
128 const D3D11_SUBRESOURCE_DATA* pInitialData,
129 ID3D11Buffer** ppBuffer);
130
137 HRESULT
138 CreateSamplerState(const D3D11_SAMPLER_DESC *pSamplerDesc,
139 ID3D11SamplerState** ppSamplerState);
140
141public:
146 ID3D11Device* m_device = nullptr;
147};
148
Declara la API de Prerequisites dentro del subsistema Core.
Encapsula un ID3D11Device y facilita la creación de recursos gráficos en Direct3D 11.
Definition Device.h:21
HRESULT CreateBuffer(const D3D11_BUFFER_DESC *pDesc, const D3D11_SUBRESOURCE_DATA *pInitialData, ID3D11Buffer **ppBuffer)
Crea un Buffer genérico (vertex, index, constant, etc.).
Definition Device.cpp:229
void render()
HRESULT CreateInputLayout(const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs, unsigned int NumElements, const void *pShaderBytecodeWithInputSignature, unsigned int BytecodeLength, ID3D11InputLayout **ppInputLayout)
Crea un Input Layout.
Definition Device.cpp:133
HRESULT CreateTexture2D(const D3D11_TEXTURE2D_DESC *pDesc, const D3D11_SUBRESOURCE_DATA *pInitialData, ID3D11Texture2D **ppTexture2D)
Crea una textura 2D.
Definition Device.cpp:42
void update()
HRESULT CreateRenderTargetView(ID3D11Resource *pResource, const D3D11_RENDER_TARGET_VIEW_DESC *pDesc, ID3D11RenderTargetView **ppRTView)
Crea una Render Target View.
Definition Device.cpp:13
ID3D11Device * m_device
Puntero al dispositivo Direct3D 11.
Definition Device.h:146
void init()
HRESULT CreateDepthStencilView(ID3D11Resource *pResource, const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc, ID3D11DepthStencilView **ppDepthStencilView)
Crea una Depth Stencil View.
Definition Device.cpp:71
~Device()=default
HRESULT CreateVertexShader(const void *pShaderBytecode, unsigned int BytecodeLength, ID3D11ClassLinkage *pClassLinkage, ID3D11VertexShader **ppVertexShader)
Crea un Vertex Shader.
Definition Device.cpp:100
HRESULT CreatePixelShader(const void *pShaderBytecode, unsigned int BytecodeLength, ID3D11ClassLinkage *pClassLinkage, ID3D11PixelShader **ppPixelShader)
Crea un Pixel Shader.
Definition Device.cpp:168
HRESULT CreateSamplerState(const D3D11_SAMPLER_DESC *pSamplerDesc, ID3D11SamplerState **ppSamplerState)
Crea un Sampler State.
Definition Device.cpp:201
Device()=default
void destroy()
Definition Device.cpp:8