|
3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
|
A SpriteBatch renders 2D sprites with a specified order. More...
#include <SpriteBatch.hpp>
Public Member Functions | |
| SpriteBatch (IntPtr handle) | |
| SpriteBatch (IGraphicsDevice device) | |
| void | Begin (SpriteBatchSortMode mode) |
| unsafe void | DrawNormalized (ITexture2D texture, RectangleF coords, RectangleF source, Math.Color color, float rotation, FlipMode flipMode, float depth) |
| unsafe void | DrawNormalized (ITexture2D texture, RectangleF coords, Rectangle source, Math.Color color, float rotation, FlipMode flipMode, float depth) |
| unsafe void | Draw (ITexture2D texture, Rectangle coords, Rectangle source, Math.Color color, float rotation, FlipMode flipMode, float depth) |
| unsafe void | Draw (ITexture2D texture, Rectangle coords, Math.Color color, float rotation, FlipMode flipMode, float depth) |
| unsafe void | DrawString (Font font, string text, Point pos, float size, Math.Color color, float rotation, FlipMode flipMode, float depth) |
| unsafe void | DrawString (Font font, string text, System.Numerics.Vector2 pos, float size, Math.Color color, float rotation, FlipMode flipMode, float depth) |
| void | End () |
| SpriteBatch (IGraphicsDevice *device) | |
| Constructs a sprite batch. | |
| SpriteBatch (SpriteBatch &)=delete | |
| SpriteBatch (SpriteBatch &&) noexcept=default | |
| SpriteBatch & | operator= (SpriteBatch &)=delete |
| SpriteBatch & | operator= (SpriteBatch &&) noexcept=default |
| void | Begin (SpriteBatchSortMode sortingMode=SpriteBatchSortMode::Immediate) |
| Begins a sprite batch with the specified sorting mode. | |
| void | Begin (SpriteBatchSortMode sortingMode, std::unique_ptr< ISamplerState > &&samplerState) |
| Begins a sprite batch with the specified sorting mode and sampler state. | |
| void | DrawNormalized (ITexture2D *texture, const Math::RectangleF &coords, const Math::RectangleF &source=Math::RectangleF(0.0f, 0.0f, 1.0f, 1.0f), const Math::Color &tintColor=Math::Colors::White, float rotation=0.0f, FlipMode flipMode=FlipMode::None, float depth=0) |
| Draws a sprite with normalized coordinates and source rectangle. | |
| void | DrawNormalized (ITexture2D *texture, const Math::RectangleF &coords, const Math::Rectangle &source, const Math::Color &tintColor=Math::Colors::White, float rotation=0.0f, FlipMode flipMode=FlipMode::None, float depth=0) |
| Draws a sprite with normalized coordinates and source rectangle. | |
| void | Draw (ITexture2D *texture, const Math::Rectangle &coords, const Math::Rectangle &source, const Math::Color &tintColor=Math::Colors::White, float rotation=0.0f, FlipMode flipMode=FlipMode::None, float depth=0) |
| Draws a sprite with pixel screen coordinates and source rectangle. | |
| void | Draw (ITexture2D *texture, const Math::Rectangle &coords, const Math::Color &tintColor=Math::Colors::White, float rotation=0.0f, FlipMode flipMode=FlipMode::None, float depth=0) |
| Draws a sprite with pixel screen coordinates and no source rectangle. | |
| void | DrawString (Font *font, const std::string &text, const Math::Vector2 &pos, float size, const Math::Color &tintColor=Math::Colors::White, float rotation=0.0f, FlipMode flipMode=FlipMode::None, float depth=0) |
| Draws a string using the specified font, position, size, and other parameters. | |
| void | DrawString (Font *font, const std::string &text, const Math::Point &pos, float size, const Math::Color &tintColor=Math::Colors::White, float rotation=0.0f, FlipMode flipMode=FlipMode::None, float depth=0) |
| Draws a string using the specified font, position, size, and other parameters. | |
| void | End () |
| Stop receiving draw commands, submit all data to the GPU then flush the internal data of this instance. | |
| ~SpriteBatch () override=default | |
| Public Member Functions inherited from Engine3DRadSpace.NatPtrWrapper | |
| virtual void | Dispose () |
| Public Member Functions inherited from Engine3DRadSpace.IService | |
| IGame * | GetOwner () const noexcept |
| Gets the owner of this instance. | |
| virtual | ~IService ()=default |
Additional Inherited Members | |
| Protected Member Functions inherited from Engine3DRadSpace.NatPtrWrapper | |
| NatPtrWrapper (IntPtr handle, Action< IntPtr > fnDestroy) | |
| NatPtrWrapper (Action< IntPtr > fnDestroy) | |
| void | Reset (IntPtr newObj) |
| void | Dispose (bool disposing) |
| Protected Member Functions inherited from Engine3DRadSpace.IService | |
| IService () | |
| IService (IGame *owner) | |
| IService (const IService &)=delete | |
| IService & | operator= (const IService &)=delete |
| IService (IService &&) noexcept=default | |
| IService & | operator= (IService &&) noexcept=default |
| Protected Attributes inherited from Engine3DRadSpace.NatPtrWrapper | |
| IntPtr | _handle |
| bool | _disposed |
| Protected Attributes inherited from Engine3DRadSpace.IService | |
| IGame * | _owner = nullptr |
| Properties inherited from Engine3DRadSpace.NatPtrWrapper | |
| IntPtr | Handle [get] |
| Properties inherited from Engine3DRadSpace.IService | |
| IGame | Owner [get] |
A SpriteBatch renders 2D sprites with a specified order.
|
inline |
|
inline |
| SpriteBatch::SpriteBatch | ( | IGraphicsDevice * | device | ) |
Constructs a sprite batch.
| device | Graphics device |
|
defaultnoexcept |
|
overridedefault |
|
inline |
| void SpriteBatch::Begin | ( | SpriteBatchSortMode | sortingMode, |
| std::unique_ptr< ISamplerState > && | samplerState ) |
Begins a sprite batch with the specified sorting mode and sampler state.
| sortingMode | The sorting mode to use for the sprite batch. |
| samplerState | The sampler state to use for the sprite batch. |
| void Engine3DRadSpace.Graphics.SpriteBatch.Begin | ( | SpriteBatchSortMode | sortingMode = SpriteBatchSortMode::Immediate | ) |
Begins a sprite batch with the specified sorting mode.
| sortingMode | The sorting mode to use for the sprite batch. |
|
inline |
|
inline |
| void Engine3DRadSpace.Graphics.SpriteBatch.Draw | ( | ITexture2D * | texture, |
| const Math::Rectangle & | coords, | ||
| const Math::Color & | tintColor = Math::Colors::White, | ||
| float | rotation = 0.0f, | ||
| FlipMode | flipMode = FlipMode::None, | ||
| float | depth = 0 ) |
Draws a sprite with pixel screen coordinates and no source rectangle.
| texture | The texture to draw. |
| coords | The pixel screen coordinates of the sprite. |
| tintColor | The tint color to apply to the sprite. |
| rotation | The rotation of the sprite in radians. |
| flipMode | The flip mode to apply to the sprite. |
| depth | The depth of the sprite. |
| void Engine3DRadSpace.Graphics.SpriteBatch.Draw | ( | ITexture2D * | texture, |
| const Math::Rectangle & | coords, | ||
| const Math::Rectangle & | source, | ||
| const Math::Color & | tintColor = Math::Colors::White, | ||
| float | rotation = 0.0f, | ||
| FlipMode | flipMode = FlipMode::None, | ||
| float | depth = 0 ) |
Draws a sprite with pixel screen coordinates and source rectangle.
| texture | The texture to draw. |
| coords | The pixel screen coordinates of the sprite. |
| source | The source rectangle of the texture. |
| tintColor | The tint color to apply to the sprite. |
| rotation | The rotation of the sprite in radians. |
| flipMode | The flip mode to apply to the sprite. |
| depth | The depth of the sprite. |
|
inline |
|
inline |
| void Engine3DRadSpace.Graphics.SpriteBatch.DrawNormalized | ( | ITexture2D * | texture, |
| const Math::RectangleF & | coords, | ||
| const Math::Rectangle & | source, | ||
| const Math::Color & | tintColor = Math::Colors::White, | ||
| float | rotation = 0.0f, | ||
| FlipMode | flipMode = FlipMode::None, | ||
| float | depth = 0 ) |
Draws a sprite with normalized coordinates and source rectangle.
| texture | The texture to draw. |
| coords | The normalized coordinates of the sprite. |
| source | The source rectangle of the texture. |
| tintColor | The tint color to apply to the sprite. |
| rotation | The rotation of the sprite in radians. |
| flipMode | The flip mode to apply to the sprite. |
| depth | The depth of the sprite. |
| void Engine3DRadSpace.Graphics.SpriteBatch.DrawNormalized | ( | ITexture2D * | texture, |
| const Math::RectangleF & | coords, | ||
| const Math::RectangleF & | source = Math::RectangleF(0.0f, 0.0f, 1.0f, 1.0f), | ||
| const Math::Color & | tintColor = Math::Colors::White, | ||
| float | rotation = 0.0f, | ||
| FlipMode | flipMode = FlipMode::None, | ||
| float | depth = 0 ) |
Draws a sprite with normalized coordinates and source rectangle.
| texture | The texture to draw. |
| coords | The normalized coordinates of the sprite. |
| source | The source rectangle of the texture. |
| tintColor | The tint color to apply to the sprite. |
| rotation | The rotation of the sprite in radians. |
| flipMode | The flip mode to apply to the sprite. |
| depth | The depth of the sprite. |
|
inline |
|
inline |
| void Engine3DRadSpace.Graphics.SpriteBatch.DrawString | ( | Font * | font, |
| const std::string & | text, | ||
| const Math::Point & | pos, | ||
| float | size, | ||
| const Math::Color & | tintColor = Math::Colors::White, | ||
| float | rotation = 0.0f, | ||
| FlipMode | flipMode = FlipMode::None, | ||
| float | depth = 0 ) |
Draws a string using the specified font, position, size, and other parameters.
| font | The font to use for drawing the text. |
| text | The text to draw. |
| pos | The position to draw the text. |
| size | The size of the text. |
| tintColor | The tint color to apply to the text. |
| rotation | The rotation of the text in radians. |
| flipMode | The flip mode to apply to the text. |
| depth | The depth of the text. |
| void Engine3DRadSpace.Graphics.SpriteBatch.DrawString | ( | Font * | font, |
| const std::string & | text, | ||
| const Math::Vector2 & | pos, | ||
| float | size, | ||
| const Math::Color & | tintColor = Math::Colors::White, | ||
| float | rotation = 0.0f, | ||
| FlipMode | flipMode = FlipMode::None, | ||
| float | depth = 0 ) |
Draws a string using the specified font, position, size, and other parameters.
| font | The font to use for drawing the text. |
| text | The text to draw. |
| pos | The position to draw the text. |
| size | The size of the text. |
| tintColor | The tint color to apply to the text. |
| rotation | The rotation of the text in radians. |
| flipMode | The flip mode to apply to the text. |
| depth | The depth of the text. |
|
inline |
Stop receiving draw commands, submit all data to the GPU then flush the internal data of this instance.
|
defaultnoexcept |
|
delete |