$(U BlendMode) is a structure that represents a blend mode. A blend mode determines how the colors of an object you draw are mixed with the colors that are already in the buffer.
This class inherits all the functions of $(TRANSFORMABLE_LINK) (position, rotation, scale, bounds, ...) as well as the functions of $(SHAPE_LINK) (outline, color, texture, ...).
$(U Color) is a simple color structure composed of 4 components:
This class inherits all the functions of $(TRANSFORMABLE_LINK) (position, rotation, scale, bounds, ...) as well as the functions of $(SHAPE_LINK) (outline, color, texture, ...).
$(U Drawable) is a very simple base interface that allows objects of derived classes to be drawn to a RenderTarget.
Fonts can be loaded from a file, from memory or from a custom stream, and supports the most common types of fonts. See the loadFromFile function for the complete list of supported formats.
* The glsl module contains types that match their equivalents in GLSL, the * OpenGL shading language. These types are exclusively used by the * $(SHADER_LINK) class. * * Types that already exist in DSFML, such as $(VECTOR2_LINK) and * $(VECTOR3_LINK), are reused as aliases, so you can use the types in this * module as well as the original ones. * Others are newly defined, such as Vec4 or Mat3. Their actual type is an * implementation detail and should not be used. * * All vector types support a default constructor that initializes every * component to zero, in addition to a constructor with one parameter for each * component. * The components are stored in member variables called x, y, z, and w. * * All matrix types support a constructor with a float[] parameter of the * appropriate size (that is, 9 in a 3x3 matrix, 16 in a 4x4 matrix). * Furthermore, they can be converted from $(TRANSFORM_LINK) objects.
A glyph is the visual representation of a character.
$(U Image) is an abstraction to manipulate images as bidimensional arrays of pixels. The class provides functions to load, read, write and save pixels, as well as many other useful functions.
The module containing the list of usable primitives for drawing.
A rectangle is defined by its top-left corner and its size. It is a very simple structure defined for convenience, so its member variables (left, top, width, and height) are public and can be accessed directly, just like the vector structures ($(VECTOR2_LINK) and $(VECTOR3_LINK)).
This class inherits all the functions of $(TRANSFORMABLE_LINK) (position, rotation, scale, bounds, ...) as well as the functions of $(SHAPE_LINK) (outline, color, texture, ...).
There are four global states that can be applied to the drawn objects:
$(U RenderTarget) defines the common behaviour of all the 2D render targets usable in the graphics module. It makes it possible to draw 2D entities like sprites, shapes, text without using any OpenGL command directly.
$(U RenderTexture) is the little brother of $(RENDERWINDOW_LINK). It implements the same 2D drawing and OpenGL-related functions (see their base class $(RENDERTARGET_LINK) for more details), the difference is that the result is stored in an off-screen texture rather than being show in a window.
$(U RenderWindow) is the main class of the Graphics package. It defines an OS window that can be painted using the other classes of the graphics module.
Shaders are programs written using a specific language, executed directly by the graphics card and allowing one to apply real-time operations to the rendered entities.
$(U Shape) is a drawable class that allows to define and display a custom convex shape on a render target.
$(U Sprite) is a drawable class that allows to easily display a texture (or a part of it) on a render target.
$(U Text) is a drawable class that allows one to easily display some text with a custom style and color on a render target.
$(U Texture) stores pixels that can be drawn, with a sprite for example. A texture lives in the graphics card memory, therefore it is very fast to draw a texture to a render target, or copy a render target to a texture (the graphics card can access both directly).
A $(U Transform) specifies how to translate, rotate, scale, shear, project, whatever things. In mathematical terms, it defines how to transform a coordinate system into another.
The interface and template are provided for convenience, on top of $(TRANSFORM_LINK).
A vertex is an improved point. It has a position and other extra attributes that will be used for drawing: in DSFML, vertices also have a color and a pair of texture coordinates.
$(U VertexArray) is a very simple wrapper around a dynamic array of vertices and a primitives type.
$(U View) defines a camera in the 2D scene. This is a very powerful concept: you can scroll, rotate or zoom the entire scene without altering the way that your drawable objects are drawn.
2D graphics module: sprites, text, shapes, etc.