Rise
The Vieneo Province
Loading...
Searching...
No Matches
Rendering::DrawContext11 Class Reference

#include <DrawContext11.h>

Collaboration diagram for Rendering::DrawContext11:
[legend]

Classes

struct  Saved

Public Member Functions

HRESULT Initialize (Device11 &device, const std::filesystem::path &shaderDirectory={})
void Reset ()
void BindScene ()
void ReleaseTargets ()
HRESULT Target (ID3D11RenderTargetView *color, ID3D11DepthStencilView *depth, const D3D11_VIEWPORT &viewport)
HRESULT Draw (Geometry11 &vertices, const VertexLayout11 &layout, Primitive11 primitive, UINT first, UINT primitiveCount, Geometry11 *indices=nullptr, INT baseVertex=0, UINT streamOffset=0)
HRESULT DrawImmediate (const void *vertices, UINT bytes, const VertexLayout11 &layout, Primitive11 primitive, UINT primitiveCount)
HRESULT ApplyPipeline (bool fixedPoints=false)
Pipeline11 & Pipeline ()
FixedState11 & Fixed ()
Materials11 & Materials ()
void Material (int pass)
int Material () const
void Scissor (const RECT &value)
const RECT & Scissor () const
const D3D11_VIEWPORT & Viewport () const
Device11 * Owner () const
const std::string & Status () const
Saved Capture () const
HRESULT Restore (const Saved &saved)

Private Types

template<class Description>
using Key = std::array<unsigned char,sizeof(Description)>

Static Private Member Functions

template<class Description>
static Key< Description > Bytes (const Description &value)

Private Attributes

std::map< Key< D3D11_RASTERIZER_DESC >, Microsoft::WRL::ComPtr< ID3D11RasterizerState > > rasterStates
std::map< Key< D3D11_DEPTH_STENCIL_DESC >, Microsoft::WRL::ComPtr< ID3D11DepthStencilState > > depthStates
std::map< Key< D3D11_BLEND_DESC >, Microsoft::WRL::ComPtr< ID3D11BlendState > > blendStates
Device11 * owner =nullptr
FixedFunction11 fixed
FixedState11 fixedState
Materials11 materials
Pipeline11 pipeline
Pipeline11 cachedPipeline
ID3D11RasterizerState * cachedRaster =nullptr
ID3D11DepthStencilState * cachedDepth =nullptr
ID3D11BlendState * cachedBlend =nullptr
int material =-1
RECT scissor {}
D3D11_VIEWPORT viewport {}
Microsoft::WRL::ComPtr< ID3D11RenderTargetView > color
Microsoft::WRL::ComPtr< ID3D11DepthStencilView > depth
Geometry11 immediate
Geometry11 fanIndices
UINT immediateCapacity =0
UINT fanCapacity =0
std::string status

Detailed Description

Definition at line 22 of file DrawContext11.h.

Member Typedef Documentation

◆ Key

template<class Description>
using Rendering::DrawContext11::Key = std::array<unsigned char,sizeof(Description)>
private

Definition at line 57 of file DrawContext11.h.

Member Function Documentation

◆ ApplyPipeline()

HRESULT Rendering::DrawContext11::ApplyPipeline ( bool fixedPoints = false)

Definition at line 67 of file DrawContext11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BindScene()

void Rendering::DrawContext11::BindScene ( )

Definition at line 33 of file DrawContext11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Bytes()

template<class Description>
Key< Description > Rendering::DrawContext11::Bytes ( const Description & value)
inlinestaticprivate

Definition at line 58 of file DrawContext11.h.

Here is the caller graph for this function:

◆ Capture()

DrawContext11::Saved Rendering::DrawContext11::Capture ( ) const

Definition at line 61 of file DrawContext11.cpp.

Here is the caller graph for this function:

◆ Draw()

HRESULT Rendering::DrawContext11::Draw ( Geometry11 & vertices,
const VertexLayout11 & layout,
Primitive11 primitive,
UINT first,
UINT primitiveCount,
Geometry11 * indices = nullptr,
INT baseVertex = 0,
UINT streamOffset = 0 )

Definition at line 111 of file DrawContext11.cpp.

Here is the caller graph for this function:

◆ DrawImmediate()

HRESULT Rendering::DrawContext11::DrawImmediate ( const void * vertices,
UINT bytes,
const VertexLayout11 & layout,
Primitive11 primitive,
UINT primitiveCount )

Definition at line 171 of file DrawContext11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Fixed()

FixedState11 & Rendering::DrawContext11::Fixed ( )
inline

Definition at line 35 of file DrawContext11.h.

◆ Initialize()

HRESULT Rendering::DrawContext11::Initialize ( Device11 & device,
const std::filesystem::path & shaderDirectory = {} )

Definition at line 26 of file DrawContext11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Material() [1/2]

int Rendering::DrawContext11::Material ( ) const
inline

Definition at line 38 of file DrawContext11.h.

◆ Material() [2/2]

void Rendering::DrawContext11::Material ( int pass)
inline

Definition at line 37 of file DrawContext11.h.

Here is the caller graph for this function:

◆ Materials()

Materials11 & Rendering::DrawContext11::Materials ( )
inline

Definition at line 36 of file DrawContext11.h.

Here is the caller graph for this function:

◆ Owner()

Device11 * Rendering::DrawContext11::Owner ( ) const
inline

Definition at line 42 of file DrawContext11.h.

Here is the caller graph for this function:

◆ Pipeline()

Pipeline11 & Rendering::DrawContext11::Pipeline ( )
inline

Definition at line 34 of file DrawContext11.h.

Here is the caller graph for this function:

◆ ReleaseTargets()

void Rendering::DrawContext11::ReleaseTargets ( )

Definition at line 40 of file DrawContext11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Reset()

void Rendering::DrawContext11::Reset ( )

Definition at line 18 of file DrawContext11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Restore()

HRESULT Rendering::DrawContext11::Restore ( const Saved & saved)

Definition at line 62 of file DrawContext11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Scissor() [1/2]

const RECT & Rendering::DrawContext11::Scissor ( ) const
inline

Definition at line 40 of file DrawContext11.h.

◆ Scissor() [2/2]

void Rendering::DrawContext11::Scissor ( const RECT & value)

Definition at line 57 of file DrawContext11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Status()

const std::string & Rendering::DrawContext11::Status ( ) const
inline

Definition at line 43 of file DrawContext11.h.

Here is the caller graph for this function:

◆ Target()

HRESULT Rendering::DrawContext11::Target ( ID3D11RenderTargetView * color,
ID3D11DepthStencilView * depth,
const D3D11_VIEWPORT & viewport )

Definition at line 45 of file DrawContext11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Viewport()

const D3D11_VIEWPORT & Rendering::DrawContext11::Viewport ( ) const
inline

Definition at line 41 of file DrawContext11.h.

Here is the caller graph for this function:

Member Data Documentation

◆ blendStates

std::map<Key<D3D11_BLEND_DESC>,Microsoft::WRL::ComPtr<ID3D11BlendState> > Rendering::DrawContext11::blendStates
private

Definition at line 62 of file DrawContext11.h.

◆ cachedBlend

ID3D11BlendState* Rendering::DrawContext11::cachedBlend =nullptr
private

Definition at line 72 of file DrawContext11.h.

◆ cachedDepth

ID3D11DepthStencilState* Rendering::DrawContext11::cachedDepth =nullptr
private

Definition at line 71 of file DrawContext11.h.

◆ cachedPipeline

Pipeline11 Rendering::DrawContext11::cachedPipeline
private

Definition at line 68 of file DrawContext11.h.

◆ cachedRaster

ID3D11RasterizerState* Rendering::DrawContext11::cachedRaster =nullptr
private

Definition at line 70 of file DrawContext11.h.

◆ color

Microsoft::WRL::ComPtr<ID3D11RenderTargetView> Rendering::DrawContext11::color
private

Definition at line 76 of file DrawContext11.h.

◆ depth

Microsoft::WRL::ComPtr<ID3D11DepthStencilView> Rendering::DrawContext11::depth
private

Definition at line 77 of file DrawContext11.h.

◆ depthStates

std::map<Key<D3D11_DEPTH_STENCIL_DESC>,Microsoft::WRL::ComPtr<ID3D11DepthStencilState> > Rendering::DrawContext11::depthStates
private

Definition at line 61 of file DrawContext11.h.

◆ fanCapacity

UINT Rendering::DrawContext11::fanCapacity =0
private

Definition at line 79 of file DrawContext11.h.

◆ fanIndices

Geometry11 Rendering::DrawContext11::fanIndices
private

Definition at line 78 of file DrawContext11.h.

◆ fixed

FixedFunction11 Rendering::DrawContext11::fixed
private

Definition at line 64 of file DrawContext11.h.

◆ fixedState

FixedState11 Rendering::DrawContext11::fixedState
private

Definition at line 65 of file DrawContext11.h.

◆ immediate

Geometry11 Rendering::DrawContext11::immediate
private

Definition at line 78 of file DrawContext11.h.

◆ immediateCapacity

UINT Rendering::DrawContext11::immediateCapacity =0
private

Definition at line 79 of file DrawContext11.h.

◆ material

int Rendering::DrawContext11::material =-1
private

Definition at line 73 of file DrawContext11.h.

◆ materials

Materials11 Rendering::DrawContext11::materials
private

Definition at line 66 of file DrawContext11.h.

◆ owner

Device11* Rendering::DrawContext11::owner =nullptr
private

Definition at line 63 of file DrawContext11.h.

◆ pipeline

Pipeline11 Rendering::DrawContext11::pipeline
private

Definition at line 67 of file DrawContext11.h.

◆ rasterStates

std::map<Key<D3D11_RASTERIZER_DESC>,Microsoft::WRL::ComPtr<ID3D11RasterizerState> > Rendering::DrawContext11::rasterStates
private

Definition at line 60 of file DrawContext11.h.

◆ scissor

RECT Rendering::DrawContext11::scissor {}
private

Definition at line 74 of file DrawContext11.h.

◆ status

std::string Rendering::DrawContext11::status
private

Definition at line 80 of file DrawContext11.h.

◆ viewport

D3D11_VIEWPORT Rendering::DrawContext11::viewport {}
private

Definition at line 75 of file DrawContext11.h.


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