21 #ifndef GF_SPRITE_BATCH_H
22 #define GF_SPRITE_BATCH_H
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
121 static constexpr std::size_t MaxSpriteCount = 1024;
122 static constexpr std::size_t VerticesPerSprite = 6;
123 static constexpr std::size_t MaxVertexCount = MaxSpriteCount * VerticesPerSprite;
128 std::array<
Vertex, MaxVertexCount> m_vertices;
131 #ifndef DOXYGEN_SHOULD_SKIP_THIS
A sprite batch.
Definition: SpriteBatch.h:62
SpriteBatch(RenderTarget &target)
Constructor.
Base class for all render targets (window, texture, ...)
Definition: RenderTarget.h:65
Define the states used for drawing to a RenderTarget.
Definition: RenderStates.h:82
A point associated with a color and a texture coordinate.
Definition: Vertex.h:75
A drawable representation of a texture, with its own transformations, color, etc. ...
Definition: Sprite.h:87
void draw(const Texture &texture, Vector2f position, const RenderStates &states=RenderStates())
Add a raw texture to the batch.
void begin()
Begin the batch.
A texture for colored images.
Definition: Texture.h:339
void draw(const Texture &texture, const RectF &textureRect, Vector2f position, const RenderStates &states=RenderStates())
Add a portion of a raw texture to the batch.
The namespace for gf classes.
Definition: Action.h:34
void draw(Sprite &sprite, const RenderStates &states=RenderStates())
Add a sprite to the batch.
#define GF_API
Definition: Portability.h:35