25 #ifndef SFML_RENDERTARGET_HPP
26 #define SFML_RENDERTARGET_HPP
31 #include <SFML/Graphics/Export.hpp>
32 #include <SFML/Graphics/Color.hpp>
33 #include <SFML/Graphics/Rect.hpp>
34 #include <SFML/Graphics/View.hpp>
35 #include <SFML/Graphics/Transform.hpp>
36 #include <SFML/Graphics/BlendMode.hpp>
37 #include <SFML/Graphics/RenderStates.hpp>
38 #include <SFML/Graphics/PrimitiveType.hpp>
39 #include <SFML/Graphics/Vertex.hpp>
40 #include <SFML/System/NonCopyable.hpp>
71 void clear(
const Color& color =
Color(0, 0, 0, 255));
92 void setView(
const View& view);
102 const View& getView()
const;
115 const View& getDefaultView()
const;
248 void draw(
const Vertex* vertices, std::size_t vertexCount,
277 virtual Vector2u getSize()
const = 0;
299 virtual bool setActive(
bool active =
true);
367 void resetGLStates();
392 void applyCurrentView();
400 void applyBlendMode(
const BlendMode& mode);
408 void applyTransform(
const Transform& transform);
416 void applyTexture(
const Texture* texture);
424 void applyShader(
const Shader* shader);
433 void setupDraw(
bool useVertexCache,
const RenderStates& states);
443 void drawPrimitives(
PrimitiveType type, std::size_t firstVertex, std::size_t vertexCount);
459 enum {VertexCacheSize = 4};
465 Uint64 lastTextureId;
466 bool texCoordsArrayEnabled;
468 Vertex vertexCache[VertexCacheSize];
483 #endif // SFML_RENDERTARGET_HPP
PrimitiveType
Types of primitives that a sf::VertexArray can render.
Image living on the graphics card that can be used for drawing.
Define the states used for drawing to a RenderTarget.
Utility class for manipulating RGBA colors.
2D camera that defines what region is shown on screen
Blending modes for drawing.
Vertex buffer storage for one or more 2D primitives.
Define a point with color and texture coordinates.
Utility class that makes any derived class non-copyable.
Base class for all render targets (window, texture, ...)
Abstract base class for objects that can be drawn to a render target.
Shader class (vertex, geometry and fragment)
static const RenderStates Default
Special instance holding the default render states.