21#ifndef GF_SPRITE_BATCH_H
22#define GF_SPRITE_BATCH_H
27#include "GraphicsApi.h"
28#include "RenderStates.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
Base class for all render targets (window, texture, ...)
Definition: RenderTarget.h:102
A sprite batch.
Definition: SpriteBatch.h:62
void begin()
Begin the batch.
void draw(const Texture &texture, Vector2f position, const RenderStates &states=RenderStates())
Add a raw texture to the batch.
void draw(Sprite &sprite, const RenderStates &states=RenderStates())
Add a sprite to the batch.
void draw(const Texture &texture, const RectF &textureRect, Vector2f position, const RenderStates &states=RenderStates())
Add a portion of a raw texture to the batch.
SpriteBatch(RenderTarget &target)
Constructor.
A drawable representation of a texture, with its own transformations, color, etc.
Definition: Sprite.h:75
A texture for colored images.
Definition: Texture.h:313
The namespace for gf classes.
Define the states used for drawing to a RenderTarget.
Definition: RenderStates.h:82