A class representing a static batch of bidimensional graphical elements.
More...
#include <StaticSpriteBatch.hpp>
|
| StaticSpriteBatch () |
|
LUMS_EXPORTED void | draw (const Texture &texture, int atlas=0, Vector2f pos={0.f, 0.f}, Vector2f scale={1.f, 1.f}, Vector4f color={1.f, 1.f, 1.f, 1.f}, Vector2b flip={false, false}) |
|
LUMS_EXPORTED void | draw (const Sprite &sprite) |
|
LUMS_EXPORTED void | draw (const Font &font, const char *text, Vector2f pos={0.f, 0.f}, Vector4f color={1.f, 1.f, 1.f, 1.f}) |
|
LUMS_EXPORTED void | setTexture (const Texture *texture) |
|
LUMS_EXPORTED void | send () |
|
LUMS_EXPORTED void | flush () |
|
LUMS_EXPORTED void | render () |
|
| ~StaticSpriteBatch () |
|
A class representing a static batch of bidimensional graphical elements.
lm::StaticSpriteBatch::StaticSpriteBatch |
( |
| ) |
|
Create a static sprite batch
lm::StaticSpriteBatch::~StaticSpriteBatch |
( |
| ) |
|
LUMS_EXPORTED void lm::StaticSpriteBatch::draw |
( |
const Texture & |
texture, |
|
|
int |
atlas = 0 , |
|
|
Vector2f |
pos = {0.f, 0.f} , |
|
|
Vector2f |
scale = {1.f, 1.f} , |
|
|
Vector4f |
color = {1.f, 1.f, 1.f, 1.f} , |
|
|
Vector2b |
flip = {false, false} |
|
) |
| |
Draw a texture into the batch
- Parameters
-
texture | The texture to be drawn |
atlas | The atlas |
pos | The screen position |
scale | The scale |
color | The color |
flip | The flip values |
LUMS_EXPORTED void lm::StaticSpriteBatch::draw |
( |
const Sprite & |
sprite | ) |
|
Draw a sprite into the batch
- Parameters
-
LUMS_EXPORTED void lm::StaticSpriteBatch::draw |
( |
const Font & |
font, |
|
|
const char * |
text, |
|
|
Vector2f |
pos = {0.f, 0.f} , |
|
|
Vector4f |
color = {1.f, 1.f, 1.f, 1.f} |
|
) |
| |
Draw text into the batch
- Parameters
-
font | The font |
text | The text to be rendererd |
pos | The text position |
color | The text color |
LUMS_EXPORTED void lm::StaticSpriteBatch::flush |
( |
| ) |
|
LUMS_EXPORTED void lm::StaticSpriteBatch::render |
( |
| ) |
|
LUMS_EXPORTED void lm::StaticSpriteBatch::send |
( |
| ) |
|
Send the batch to the GPU
LUMS_EXPORTED void lm::StaticSpriteBatch::setTexture |
( |
const Texture * |
texture | ) |
|
Set the batch texture
- Parameters
-
const Texture* lm::StaticSpriteBatch::texture |
|
protected |
The documentation for this class was generated from the following file: