![]() |
MAGE
v0.171.0
Matthias Advanced Game Engine
|
#include <sprite_batch.hpp>
Classes | |
class | Impl |
Public Member Functions | |
SpriteBatch (ID3D11Device &device, ID3D11DeviceContext &device_context) | |
SpriteBatch (const SpriteBatch &sprite_batch)=delete | |
SpriteBatch (SpriteBatch &&sprite_batch) noexcept | |
~SpriteBatch () | |
SpriteBatch & | operator= (const SpriteBatch &sprite_batch)=delete |
SpriteBatch & | operator= (SpriteBatch &&sprite_batch) noexcept |
void | Begin (SpriteSortMode sort_mode=SpriteSortMode::Deferred) |
void XM_CALLCONV | Draw (ID3D11ShaderResourceView *texture, FXMVECTOR color, SpriteEffect effects, const SpriteTransform2D &transform, const RECT *source=nullptr) |
void | End () |
Private Attributes | |
UniquePtr< Impl > | m_impl |
A class of sprite batches.
mage::rendering::SpriteBatch::SpriteBatch | ( | ID3D11Device & | device, |
ID3D11DeviceContext & | device_context | ||
) |
Constructs a sprite batch.
[in,out] | device | A reference to the device. |
[in,out] | device_context | A reference to the device context. |
|
delete |
Constructs a sprite batch from the given sprite batch.
[in] | sprite_batch | A reference to the sprite batch to copy. |
|
defaultnoexcept |
Constructs a sprite batch by moving the given sprite batch.
[in] | sprite_batch | A reference to the sprite batch to move. |
|
default |
Destructs this sprite batch.
void mage::rendering::SpriteBatch::Begin | ( | SpriteSortMode | sort_mode = SpriteSortMode::Deferred | ) |
Begins the processing of a batch of sprites.
[in] | sort_mode | A reference to the sprite sorting mode for the whole batch of sprites. |
void XM_CALLCONV mage::rendering::SpriteBatch::Draw | ( | ID3D11ShaderResourceView * | texture, |
FXMVECTOR | color, | ||
SpriteEffect | effects, | ||
const SpriteTransform2D & | transform, | ||
const RECT * | source = nullptr |
||
) |
Draws a sprite.
[in] | texture | A pointer to the shader resource view of the texture to draw. |
[in] | color | The (linear) RGBA color. |
[in] | effects | The sprite effects to apply. |
[in] | transform | A reference to the sprite transform. |
[in] | source | A pointer the rectangular subregion of the texture. |
void mage::rendering::SpriteBatch::End | ( | ) |
Ends the processing of a batch of sprites.
|
delete |
Copies the given sprite batch to this sprite batch.
[in] | sprite_batch | A reference to the sprite batch to copy. |
|
defaultnoexcept |
Moves the given sprite batch to this sprite batch.
[in] | sprite_batch | A reference to the sprite batch to move. |