24 #ifndef GF_RENDER_TARGET_H
25 #define GF_RENDER_TARGET_H
39 #ifndef DOXYGEN_SHOULD_SKIP_THIS
251 return m_defaultView;
388 void initializeViews();
389 void initializeShader();
390 void initializeTexture();
398 void drawStart(
const Vertex *vertices,
const RenderStates& states, Locations& locations);
399 void drawFinish(
const Locations& locations);
405 Shader m_defaultAlphaShader;
410 #ifndef DOXYGEN_SHOULD_SKIP_THIS
void clear()
Clear the entire target.
Vector< unsigned, 2 > Vector2u
A unsigned vector with 2 components.
Definition: Vector.h:795
2D camera that defines what region is shown on screen
Definition: View.h:92
Vector< float, 2 > Vector2f
A float vector with 2 components.
Definition: Vector.h:741
Base class for all render targets (window, texture, ...)
Definition: RenderTarget.h:65
const View & getView() const
Get the view currently in use in the render target.
Definition: RenderTarget.h:236
Define the states used for drawing to a RenderTarget.
Definition: RenderStates.h:81
Image captureFramebuffer(unsigned name) const
Capture the given framebuffer.
Vector< int, 2 > Vector2i
A int vector with 2 components.
Definition: Vector.h:777
A point associated with a color and a texture coordinate.
Definition: Vertex.h:75
RenderTarget()=default
Default constructor.
PrimitiveType
Kind of primitives to render.
Definition: PrimitiveType.h:43
Range< float > RangeF
A float range.
Definition: Range.h:169
Data in the graphics memory.
Definition: VertexBuffer.h:70
virtual ~RenderTarget()
Destructor.
void draw(Drawable &drawable, const RenderStates &states=RenderStates())
Draw a drawable object to the render target.
Rect< int > RectI
A int rectangle.
Definition: Rect.h:312
Abstract base class for objects that can be drawn to a render window.
Definition: Drawable.h:79
void clear(const Color4f &color)
Clear the entire target with a single color.
virtual Vector2u getSize() const =0
Return the size of the rendering region of the target.
An OpenGL vertex and/or fragment shader.
Definition: Shader.h:119
void draw(const VertexBuffer &buffer, const RenderStates &states=RenderStates())
Draw a vertex buffer to the render target.
void draw(const Vertex *vertices, const uint16_t *indices, std::size_t count, PrimitiveType type, const RenderStates &states=RenderStates())
Draw primitives defined by an array of vertices and their indices.
void setView(const View &view)
Change the current active view.
Definition: RenderTarget.h:225
A texture for colored images.
Definition: Texture.h:317
void initialize()
Performs the common initialization step after creation.
Vector2i mapCoordsToPixel(Vector2f point) const
Convert a point from world coordinates to target coordinates, using the current view.
Class for loading, manipulating and saving images.
Definition: Image.h:92
RenderTarget(const RenderTarget &)=delete
Deleted copy constructor.
Vector2f mapPixelToCoords(Vector2i point, const View &view) const
Convert a point from target coordinates to world coordinates.
Vector2i mapCoordsToPixel(Vector2f point, const View &view) const
Convert a point from world coordinates to target coordinates.
RectI getViewport(const View &view) const
Get the viewport of a view, applied to this render target.
RangeF getAliasedLineWidthRange() const
Get the range for aliased line width.
Vector< float, 4 > Color4f
A float color vector with 4 components.
Definition: Vector.h:855
Vector2f mapPixelToCoords(Vector2i point) const
Convert a point from target coordinates to world coordinates, using the current view.
#define GF_API
Definition: Portability.h:35
const View & getDefaultView() const
Get the default view of the render target.
Definition: RenderTarget.h:250
void draw(const Vertex *vertices, const uint16_t **indices, const std::size_t *count, std::size_t primcount, PrimitiveType type, const RenderStates &states=RenderStates())
Draw primitives defined by an array of vertices and their indices.
void draw(const Vertex *vertices, int *first, const std::size_t *count, std::size_t primcount, PrimitiveType type, const RenderStates &states=RenderStates())
Draw primitives defined by an array of vertices.
void draw(const Vertex *vertices, std::size_t count, PrimitiveType type, const RenderStates &states=RenderStates())
Draw primitives defined by an array of vertices.
float getLineWidth() const
Get the line width.
RenderTarget & operator=(const RenderTarget &)=delete
Deleted copy assignment.