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

#include <Sprite11.h>

Collaboration diagram for Rendering::Sprite11:
[legend]

Classes

struct  Entry

Public Types

using Vector = DirectX::XMFLOAT3
using Matrix = DirectX::XMFLOAT4X4

Public Member Functions

HRESULT Initialize (ID3D11Device *device, const std::filesystem::path &shaderDirectory={})
HRESULT Begin (ID3D11DeviceContext *context, const SpriteOptions11 &options={})
HRESULT Draw (ID3D11ShaderResourceView *texture, const RECT *source=nullptr, const Vector *center=nullptr, const Vector *position=nullptr, uint32_t color=0xffffffff)
HRESULT Flush ()
HRESULT End ()
HRESULT SetScissor (bool enabled, const RECT &rectangle)
D3D11_SAMPLER_DESC & Sampler ()
void SetTransform (const Matrix &value)
const Matrix & Transform () const
void Reset ()
 ~Sprite11 ()
const std::string & Status () const

Private Member Functions

void Restore ()

Private Attributes

Microsoft::WRL::ComPtr< ID3D11Device > device
Microsoft::WRL::ComPtr< ID3D11DeviceContext1 > context
Microsoft::WRL::ComPtr< ID3DDeviceContextState > isolated
Microsoft::WRL::ComPtr< ID3DDeviceContextState > previous
Microsoft::WRL::ComPtr< ID3D11Buffer > vertices
Microsoft::WRL::ComPtr< ID3D11Buffer > indices
Microsoft::WRL::ComPtr< ID3D11RasterizerState > batchRaster
Microsoft::WRL::ComPtr< ID3D11DepthStencilState > batchDepth
Microsoft::WRL::ComPtr< ID3D11BlendState > batchBlend
FLOAT batchBlendFactor [4] {}
UINT batchSampleMask =UINT_MAX
UINT batchStencilReference =0
FixedFunction11 fixed
FixedState11 state
SpriteOptions11 options
Matrix transform {}
std::vector< Entry > queue
std::vector< size_t > order
Microsoft::WRL::ComPtr< ID3D11ShaderResourceView > sizeTexture
UINT textureWidth =0
UINT textureHeight =0
std::string status

Static Private Attributes

static constexpr UINT Capacity =1024

Detailed Description

Definition at line 8 of file Sprite11.h.

Member Typedef Documentation

◆ Matrix

using Rendering::Sprite11::Matrix = DirectX::XMFLOAT4X4

Definition at line 12 of file Sprite11.h.

◆ Vector

using Rendering::Sprite11::Vector = DirectX::XMFLOAT3

Definition at line 11 of file Sprite11.h.

Constructor & Destructor Documentation

◆ ~Sprite11()

Rendering::Sprite11::~Sprite11 ( )
inline

Definition at line 24 of file Sprite11.h.

Here is the call graph for this function:

Member Function Documentation

◆ Begin()

HRESULT Rendering::Sprite11::Begin ( ID3D11DeviceContext * context,
const SpriteOptions11 & options = {} )

Definition at line 47 of file Sprite11.cpp.

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

◆ Draw()

HRESULT Rendering::Sprite11::Draw ( ID3D11ShaderResourceView * texture,
const RECT * source = nullptr,
const Vector * center = nullptr,
const Vector * position = nullptr,
uint32_t color = 0xffffffff )

Definition at line 100 of file Sprite11.cpp.

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

◆ End()

HRESULT Rendering::Sprite11::End ( )

Definition at line 206 of file Sprite11.cpp.

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

◆ Flush()

HRESULT Rendering::Sprite11::Flush ( )

Definition at line 146 of file Sprite11.cpp.

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

◆ Initialize()

HRESULT Rendering::Sprite11::Initialize ( ID3D11Device * device,
const std::filesystem::path & shaderDirectory = {} )

Definition at line 26 of file Sprite11.cpp.

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

◆ Reset()

void Rendering::Sprite11::Reset ( )

Definition at line 21 of file Sprite11.cpp.

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

◆ Restore()

void Rendering::Sprite11::Restore ( )
private

Definition at line 10 of file Sprite11.cpp.

◆ Sampler()

D3D11_SAMPLER_DESC & Rendering::Sprite11::Sampler ( )
inline

Definition at line 20 of file Sprite11.h.

Here is the caller graph for this function:

◆ SetScissor()

HRESULT Rendering::Sprite11::SetScissor ( bool enabled,
const RECT & rectangle )

Definition at line 135 of file Sprite11.cpp.

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

◆ SetTransform()

void Rendering::Sprite11::SetTransform ( const Matrix & value)
inline

Definition at line 21 of file Sprite11.h.

Here is the caller graph for this function:

◆ Status()

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

Definition at line 25 of file Sprite11.h.

◆ Transform()

const Matrix & Rendering::Sprite11::Transform ( ) const
inline

Definition at line 22 of file Sprite11.h.

Here is the caller graph for this function:

Member Data Documentation

◆ batchBlend

Microsoft::WRL::ComPtr<ID3D11BlendState> Rendering::Sprite11::batchBlend
private

Definition at line 41 of file Sprite11.h.

◆ batchBlendFactor

FLOAT Rendering::Sprite11::batchBlendFactor[4] {}
private

Definition at line 42 of file Sprite11.h.

◆ batchDepth

Microsoft::WRL::ComPtr<ID3D11DepthStencilState> Rendering::Sprite11::batchDepth
private

Definition at line 40 of file Sprite11.h.

◆ batchRaster

Microsoft::WRL::ComPtr<ID3D11RasterizerState> Rendering::Sprite11::batchRaster
private

Definition at line 39 of file Sprite11.h.

◆ batchSampleMask

UINT Rendering::Sprite11::batchSampleMask =UINT_MAX
private

Definition at line 43 of file Sprite11.h.

◆ batchStencilReference

UINT Rendering::Sprite11::batchStencilReference =0
private

Definition at line 43 of file Sprite11.h.

◆ Capacity

UINT Rendering::Sprite11::Capacity =1024
staticconstexprprivate

Definition at line 27 of file Sprite11.h.

◆ context

Microsoft::WRL::ComPtr<ID3D11DeviceContext1> Rendering::Sprite11::context
private

Definition at line 36 of file Sprite11.h.

◆ device

Microsoft::WRL::ComPtr<ID3D11Device> Rendering::Sprite11::device
private

Definition at line 35 of file Sprite11.h.

◆ fixed

FixedFunction11 Rendering::Sprite11::fixed
private

Definition at line 44 of file Sprite11.h.

◆ indices

Microsoft::WRL::ComPtr<ID3D11Buffer> Rendering::Sprite11::indices
private

Definition at line 38 of file Sprite11.h.

◆ isolated

Microsoft::WRL::ComPtr<ID3DDeviceContextState> Rendering::Sprite11::isolated
private

Definition at line 37 of file Sprite11.h.

◆ options

SpriteOptions11 Rendering::Sprite11::options
private

Definition at line 46 of file Sprite11.h.

◆ order

std::vector<size_t> Rendering::Sprite11::order
private

Definition at line 50 of file Sprite11.h.

◆ previous

Microsoft::WRL::ComPtr<ID3DDeviceContextState> Rendering::Sprite11::previous
private

Definition at line 37 of file Sprite11.h.

◆ queue

std::vector<Entry> Rendering::Sprite11::queue
private

Definition at line 48 of file Sprite11.h.

◆ sizeTexture

Microsoft::WRL::ComPtr<ID3D11ShaderResourceView> Rendering::Sprite11::sizeTexture
private

Definition at line 53 of file Sprite11.h.

◆ state

FixedState11 Rendering::Sprite11::state
private

Definition at line 45 of file Sprite11.h.

◆ status

std::string Rendering::Sprite11::status
private

Definition at line 55 of file Sprite11.h.

◆ textureHeight

UINT Rendering::Sprite11::textureHeight =0
private

Definition at line 54 of file Sprite11.h.

◆ textureWidth

UINT Rendering::Sprite11::textureWidth =0
private

Definition at line 54 of file Sprite11.h.

◆ transform

Matrix Rendering::Sprite11::transform {}
private

Definition at line 47 of file Sprite11.h.

◆ vertices

Microsoft::WRL::ComPtr<ID3D11Buffer> Rendering::Sprite11::vertices
private

Definition at line 38 of file Sprite11.h.


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