Wildvine Engine
Referencia Doxygen del codigo propio de Wildvine Engine.
Cargando...
Buscando...
Nada coincide
Referencia de la clase DeviceContext

#include <DeviceContext.h>

Métodos públicos

void ClearDepthStencilView (ID3D11DepthStencilView *pDepthStencilView, unsigned int ClearFlags, float Depth, UINT8 Stencil)
 Limpia un Depth Stencil View.
 
void ClearRenderTargetView (ID3D11RenderTargetView *pRenderTargetView, const float ColorRGBA[4])
 Limpia un Render Target con un color dado.
 
void destroy ()
 Libera el recurso ID3D11DeviceContext.
 
 DeviceContext ()=default
 
void DrawIndexed (unsigned int IndexCount, unsigned int StartIndexLocation, int BaseVertexLocation)
 Envía un comando de dibujado de primitivas indexadas.
 
void IASetIndexBuffer (ID3D11Buffer *pIndexBuffer, DXGI_FORMAT Format, unsigned int Offset)
 Asigna un Index Buffer a la etapa de ensamblado de entrada.
 
void IASetInputLayout (ID3D11InputLayout *pInputLayout)
 Define el Input Layout activo en la etapa de ensamblado de entrada.
 
void IASetPrimitiveTopology (D3D11_PRIMITIVE_TOPOLOGY Topology)
 Define la topología de primitivas a renderizar.
 
void IASetVertexBuffers (unsigned int StartSlot, unsigned int NumBuffers, ID3D11Buffer *const *ppVertexBuffers, const unsigned int *pStrides, const unsigned int *pOffsets)
 Asigna buffers de vértices a la etapa de ensamblado de entrada.
 
void init ()
 Inicializa el contexto del dispositivo.
 
void OMSetBlendState (ID3D11BlendState *pBlendState, const float BlendFactor[4], unsigned int SampleMask)
 Asigna un Blend State al Output Merger.
 
void OMSetRenderTargets (unsigned int NumViews, ID3D11RenderTargetView *const *ppRenderTargetViews, ID3D11DepthStencilView *pDepthStencilView)
 Asigna Render Targets y Depth Stencil al Output Merger.
 
void PSSetConstantBuffers (unsigned int StartSlot, unsigned int NumBuffers, ID3D11Buffer *const *ppConstantBuffers)
 Asigna constant buffers a la etapa de Pixel Shader.
 
void PSSetSamplers (unsigned int StartSlot, unsigned int NumSamplers, ID3D11SamplerState *const *ppSamplers)
 Asigna Sampler States a la etapa de Pixel Shader.
 
void PSSetShader (ID3D11PixelShader *pPixelShader, ID3D11ClassInstance *const *ppClassInstances, unsigned int NumClassInstances)
 Asigna un Pixel Shader al pipeline.
 
void PSSetShaderResources (unsigned int StartSlot, unsigned int NumViews, ID3D11ShaderResourceView *const *ppShaderResourceViews)
 Asigna Shader Resource Views a la etapa de Pixel Shader.
 
void render ()
 Ejecuta operaciones relacionadas con render.
 
void RSSetState (ID3D11RasterizerState *pRasterizerState)
 Configura el Rasterizer State actual.
 
void RSSetViewports (unsigned int NumViewports, const D3D11_VIEWPORT *pViewports)
 Configura los viewports en la etapa de rasterización.
 
void update ()
 Actualiza parámetros internos del contexto.
 
void UpdateSubresource (ID3D11Resource *pDstResource, unsigned int DstSubresource, const D3D11_BOX *pDstBox, const void *pSrcData, unsigned int SrcRowPitch, unsigned int SrcDepthPitch)
 Copia datos desde CPU hacia un recurso en GPU.
 
void VSSetConstantBuffers (unsigned int StartSlot, unsigned int NumBuffers, ID3D11Buffer *const *ppConstantBuffers)
 Asigna constant buffers a la etapa de Vertex Shader.
 
void VSSetShader (ID3D11VertexShader *pVertexShader, ID3D11ClassInstance *const *ppClassInstances, unsigned int NumClassInstances)
 Asigna un Vertex Shader al pipeline.
 
 ~DeviceContext ()=default
 

Atributos públicos

ID3D11DeviceContext * m_deviceContext = nullptr
 Puntero al contexto inmediato de Direct3D 11.
 

Descripción detallada

Definición en la línea 9 del archivo DeviceContext.h.

Documentación de constructores y destructores

◆ DeviceContext()

DeviceContext::DeviceContext ( )
default

◆ ~DeviceContext()

DeviceContext::~DeviceContext ( )
default

Documentación de funciones miembro

◆ ClearDepthStencilView()

void DeviceContext::ClearDepthStencilView ( ID3D11DepthStencilView *  pDepthStencilView,
unsigned int  ClearFlags,
float  Depth,
UINT8  Stencil 
)
Parámetros
pDepthStencilViewVista a limpiar.
ClearFlagsFlags de limpieza (D3D11_CLEAR_DEPTH / D3D11_CLEAR_STENCIL).
DepthValor de profundidad (0.0 - 1.0).
StencilValor de esténcil.

Definición en la línea 197 del archivo DeviceContext.cpp.

Hace referencia a ERROR y m_deviceContext.

Referenciado por ForwardRenderer::renderShadowPass().

◆ ClearRenderTargetView()

void DeviceContext::ClearRenderTargetView ( ID3D11RenderTargetView *  pRenderTargetView,
const float  ColorRGBA[4] 
)
Parámetros
pRenderTargetViewRender target a limpiar.
ColorRGBAColor en formato RGBA.

Definición en la línea 180 del archivo DeviceContext.cpp.

Hace referencia a ERROR y m_deviceContext.

◆ destroy()

void DeviceContext::destroy ( )
Postcondición
m_deviceContext == nullptr.

Definición en la línea 9 del archivo DeviceContext.cpp.

Hace referencia a m_deviceContext y SAFE_RELEASE.

Referenciado por BaseApp::destroy().

◆ DrawIndexed()

void DeviceContext::DrawIndexed ( unsigned int  IndexCount,
unsigned int  StartIndexLocation,
int  BaseVertexLocation 
)
Parámetros
IndexCountNúmero de índices a renderizar.
StartIndexLocationPosición inicial en el buffer de índices.
BaseVertexLocationOffset aplicado a los vértices.

Definición en la línea 248 del archivo DeviceContext.cpp.

Hace referencia a ERROR y m_deviceContext.

Referenciado por Actor::render(), Actor::renderForSkybox(), ForwardRenderer::renderObject() y ForwardRenderer::renderShadowObject().

◆ IASetIndexBuffer()

void DeviceContext::IASetIndexBuffer ( ID3D11Buffer *  pIndexBuffer,
DXGI_FORMAT  Format,
unsigned int  Offset 
)
Parámetros
pIndexBufferBuffer de índices.
FormatFormato de índice (ej. DXGI_FORMAT_R16_UINT).
OffsetOffset inicial en bytes.

Definición en la línea 104 del archivo DeviceContext.cpp.

Hace referencia a ERROR y m_deviceContext.

◆ IASetInputLayout()

void DeviceContext::IASetInputLayout ( ID3D11InputLayout *  pInputLayout)
Parámetros
pInputLayoutInput layout a asignar.

Definición en la línea 35 del archivo DeviceContext.cpp.

Hace referencia a ERROR y m_deviceContext.

◆ IASetPrimitiveTopology()

void DeviceContext::IASetPrimitiveTopology ( D3D11_PRIMITIVE_TOPOLOGY  Topology)
Parámetros
TopologyTipo de topología (ej. D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST).

Definición en la línea 167 del archivo DeviceContext.cpp.

Hace referencia a ERROR y m_deviceContext.

Referenciado por Actor::render(), Actor::renderForSkybox(), ForwardRenderer::renderObject() y ForwardRenderer::renderShadowObject().

◆ IASetVertexBuffers()

void DeviceContext::IASetVertexBuffers ( unsigned int  StartSlot,
unsigned int  NumBuffers,
ID3D11Buffer *const *  ppVertexBuffers,
const unsigned int *  pStrides,
const unsigned int *  pOffsets 
)
Parámetros
StartSlotSlot inicial.
NumBuffersNúmero de buffers.
ppVertexBuffersArreglo de punteros a vertex buffers.
pStridesArreglo con tamaños de cada vértice.
pOffsetsArreglo con offsets iniciales.

Definición en la línea 86 del archivo DeviceContext.cpp.

Hace referencia a ERROR y m_deviceContext.

◆ init()

void DeviceContext::init ( )

Este método se utiliza como punto de inicialización; la implementación puede asociar el contexto inmediato creado junto con ID3D11Device.

◆ OMSetBlendState()

void DeviceContext::OMSetBlendState ( ID3D11BlendState *  pBlendState,
const float  BlendFactor[4],
unsigned int  SampleMask 
)
Parámetros
pBlendStateEstado de blending.
BlendFactorFactor de mezcla (RGBA).
SampleMaskMáscara de muestras.

Definición en la línea 135 del archivo DeviceContext.cpp.

Hace referencia a ERROR y m_deviceContext.

Referenciado por ForwardRenderer::renderOpaquePass() y ForwardRenderer::renderTransparentPass().

◆ OMSetRenderTargets()

void DeviceContext::OMSetRenderTargets ( unsigned int  NumViews,
ID3D11RenderTargetView *const *  ppRenderTargetViews,
ID3D11DepthStencilView *  pDepthStencilView 
)
Parámetros
NumViewsNúmero de render targets.
ppRenderTargetViewsArreglo de render target views.
pDepthStencilViewVista de profundidad/esténcil.

Definición en la línea 146 del archivo DeviceContext.cpp.

Hace referencia a ERROR y m_deviceContext.

Referenciado por ForwardRenderer::renderShadowPass().

◆ PSSetConstantBuffers()

void DeviceContext::PSSetConstantBuffers ( unsigned int  StartSlot,
unsigned int  NumBuffers,
ID3D11Buffer *const *  ppConstantBuffers 
)
Parámetros
StartSlotSlot inicial.
NumBuffersNúmero de buffers.
ppConstantBuffersArreglo de constant buffers.

Definición en la línea 234 del archivo DeviceContext.cpp.

Hace referencia a ERROR y m_deviceContext.

◆ PSSetSamplers()

void DeviceContext::PSSetSamplers ( unsigned int  StartSlot,
unsigned int  NumSamplers,
ID3D11SamplerState *const *  ppSamplers 
)
Parámetros
StartSlotSlot inicial.
NumSamplersNúmero de samplers.
ppSamplersArreglo de sampler states.

Definición en la línea 115 del archivo DeviceContext.cpp.

Hace referencia a ERROR y m_deviceContext.

Referenciado por SamplerState::render().

◆ PSSetShader()

void DeviceContext::PSSetShader ( ID3D11PixelShader *  pPixelShader,
ID3D11ClassInstance *const *  ppClassInstances,
unsigned int  NumClassInstances 
)
Parámetros
pPixelShaderPuntero al pixel shader.
ppClassInstancesInstancias de clase (opcional).
NumClassInstancesNúmero de instancias de clase.

Definición en la línea 55 del archivo DeviceContext.cpp.

Hace referencia a ERROR y m_deviceContext.

◆ PSSetShaderResources()

void DeviceContext::PSSetShaderResources ( unsigned int  StartSlot,
unsigned int  NumViews,
ID3D11ShaderResourceView *const *  ppShaderResourceViews 
)
Parámetros
StartSlotSlot inicial.
NumViewsNúmero de vistas a asignar.
ppShaderResourceViewsArreglo de vistas de recurso de shader.

Definición en la línea 24 del archivo DeviceContext.cpp.

Hace referencia a ERROR y m_deviceContext.

Referenciado por MaterialInstance::bindTextures(), Texture::render(), ForwardRenderer::renderOpaquePass(), ForwardRenderer::renderPreShadowDebugPass(), ForwardRenderer::renderShadowPass() y ForwardRenderer::renderTransparentPass().

◆ render()

void DeviceContext::render ( )
Nota
Método placeholder; puede ser usado para depuración.

◆ RSSetState()

void DeviceContext::RSSetState ( ID3D11RasterizerState *  pRasterizerState)
Parámetros
pRasterizerStateEstado de rasterización.

Definición en la línea 126 del archivo DeviceContext.cpp.

Hace referencia a ERROR y m_deviceContext.

Referenciado por RasterizerState::render().

◆ RSSetViewports()

void DeviceContext::RSSetViewports ( unsigned int  NumViewports,
const D3D11_VIEWPORT *  pViewports 
)
Parámetros
NumViewportsNúmero de viewports.
pViewportsPuntero a un arreglo de descriptores de viewport.

Definición en la línea 14 del archivo DeviceContext.cpp.

Hace referencia a ERROR y m_deviceContext.

Referenciado por Viewport::render() y ForwardRenderer::renderShadowPass().

◆ update()

void DeviceContext::update ( )
Nota
Método placeholder, útil para extender funcionalidades.

◆ UpdateSubresource()

void DeviceContext::UpdateSubresource ( ID3D11Resource *  pDstResource,
unsigned int  DstSubresource,
const D3D11_BOX *  pDstBox,
const void *  pSrcData,
unsigned int  SrcRowPitch,
unsigned int  SrcDepthPitch 
)
Parámetros
pDstResourceRecurso destino.
DstSubresourceÍndice de subrecurso.
pDstBoxRegión destino (puede ser nullptr).
pSrcDataDatos fuente.
SrcRowPitchTamaño por fila.
SrcDepthPitchTamaño por capa de profundidad.

Definición en la línea 66 del archivo DeviceContext.cpp.

Hace referencia a ERROR y m_deviceContext.

Referenciado por Texture::CreateCubemap().

◆ VSSetConstantBuffers()

void DeviceContext::VSSetConstantBuffers ( unsigned int  StartSlot,
unsigned int  NumBuffers,
ID3D11Buffer *const *  ppConstantBuffers 
)
Parámetros
StartSlotSlot inicial.
NumBuffersNúmero de buffers.
ppConstantBuffersArreglo de constant buffers.

Definición en la línea 220 del archivo DeviceContext.cpp.

Hace referencia a ERROR y m_deviceContext.

◆ VSSetShader()

void DeviceContext::VSSetShader ( ID3D11VertexShader *  pVertexShader,
ID3D11ClassInstance *const *  ppClassInstances,
unsigned int  NumClassInstances 
)
Parámetros
pVertexShaderPuntero al vertex shader.
ppClassInstancesInstancias de clase (opcional).
NumClassInstancesNúmero de instancias de clase.

Definición en la línea 44 del archivo DeviceContext.cpp.

Hace referencia a ERROR y m_deviceContext.

Documentación de datos miembro

◆ m_deviceContext


La documentación de esta clase está generada de los siguientes archivos: