24 #ifndef GF_RENDER_TARGET_H 25 #define GF_RENDER_TARGET_H 29 #include "GraphicsApi.h" 30 #include "GraphicsHandle.h" 33 #include "PrimitiveType.h" 36 #include "RenderStates.h" 42 #ifndef DOXYGEN_SHOULD_SKIP_THIS 80 static void gen(
int n,
unsigned* resources);
81 static void del(
int n,
const unsigned* resources);
132 virtual Vector2i getSize()
const = 0;
144 Region getCanonicalScissorBox();
151 void setCanonicalScissorBox(
const Region& box);
158 RectI getScissorBox();
165 void setScissorBox(
const RectI& box);
175 void clear(
const Color4f& color);
194 RangeF getAliasedLineWidthRange()
const;
202 float getLineWidth()
const;
300 void setView(
const View& view);
325 Region getCanonicalViewport(
const View& view)
const;
339 RectI getViewport(
const View& view)
const;
449 Image captureFramebuffer(
unsigned name)
const;
453 static constexpr std::size_t CountMax = 5;
455 std::size_t count = 0;
459 void drawFinish(
const Locations& locations);
464 Shader m_defaultAlphaShader;
468 #ifndef DOXYGEN_SHOULD_SKIP_THIS 473 #endif // GF_RENDER_TARGET_H
PrimitiveType
Kind of primitives to render.
Definition: PrimitiveType.h:43
2D camera that defines what region is shown on framebuffer
Definition: View.h:94
A half-open range of values.
Definition: Range.h:44
const char * name
Name of the attribute.
Definition: RenderTarget.h:67
Base class for all render targets (window, texture, ...)
Definition: RenderTarget.h:102
Define the states used for drawing to a RenderTarget.
Definition: RenderStates.h:82
A span.
Definition: Span.h:36
A point associated with a color and a texture coordinate.
Definition: Vertex.h:75
Data in the graphics memory.
Definition: VertexBuffer.h:81
A trait to handle creation and deletion of GPU resources.
Definition: GraphicsHandle.h:48
Abstract base class for objects that can be drawn to a render window.
Definition: Drawable.h:57
An OpenGL vertex and/or fragment shader.
Definition: Shader.h:119
bool normalized
Is the attribute normalized?
Definition: RenderTarget.h:70
RenderAttributeType type
Type of the attribute.
Definition: RenderTarget.h:69
A texture for colored images.
Definition: Texture.h:313
Attribute info.
Definition: RenderTarget.h:66
std::size_t offset
Offset of the attribute in the vertex.
Definition: RenderTarget.h:71
Class for loading, manipulating and saving images.
Definition: Image.h:80
The namespace for gf classes.
Definition: Action.h:35
RenderAttributeType
The type of an attribute.
Definition: RenderTarget.h:54
A 4D vector.
Definition: Vector.h:852
A region of a window.
Definition: Region.h:40
int size
Size of the attribute.
Definition: RenderTarget.h:68
GraphicsTag
A tag to represent various GPU resources.
Definition: GraphicsHandle.h:37
const View & getView() const
Get the view currently in use in the render target.
Definition: RenderTarget.h:309