Gamedev Framework (gf)  0.1.0
A C++11 framework for 2D games
Classes | Enumerations | Functions | Variables
Graphics classes

All the classes related to graphics. More...

Classes

class  gf::AnimatedSprite
 An animated sprite. More...
 
class  gf::Animation
 An animation. More...
 
struct  gf::BlendMode
 Blending modes for drawing. More...
 
class  gf::BufferedGeometry
 A drawable for buffers. More...
 
struct  gf::Color
 Predefined colors. More...
 
struct  gf::ColorRamp
 A color ramp. More...
 
class  gf::Curve
 A curve is a one dimension object. More...
 
class  gf::Drawable
 Abstract base class for objects that can be drawn to a render window. More...
 
class  gf::Effect
 A post-processing effect. More...
 
class  gf::DefaultEffect
 Default effect. More...
 
class  gf::AntiAliasingEffect
 Anti-aliasing effect. More...
 
class  gf::ColorMatrixEffect
 Generic color matrix effect. More...
 
class  gf::ColorEffect
 Simple color effects. More...
 
class  gf::ColorBlindEffect
 Simulation of color blindness. More...
 
class  gf::EdgeEffect
 Edge detector. More...
 
struct  gf::Glyph
 A glyph. More...
 
class  gf::Font
 A character font. More...
 
class  gf::Image
 Class for loading, manipulating and saving images. More...
 
class  gf::NinePatch
 A nine-patch. More...
 
class  gf::PostProcessing
 A post-processing drawable. More...
 
class  gf::RenderPipeline
 A render pipeline. More...
 
struct  gf::RenderStates
 Define the states used for drawing to a RenderTarget. More...
 
class  gf::RenderTarget
 Base class for all render targets (window, texture, ...) More...
 
class  gf::RenderTexture
 Target for off-screen 2D rendering into a texture. More...
 
class  gf::RenderWindow
 A window that can serve as a target for 2D drawing. More...
 
class  gf::Shader
 An OpenGL vertex and/or fragment shader. More...
 
class  gf::Shape
 Base class for textured shapes with outline. More...
 
class  gf::RectangleShape
 Specialized shape representing a rectangle. More...
 
class  gf::CircleShape
 Specialized shape representing a circle. More...
 
class  gf::ConvexShape
 Specialized shape representing a convex polygon. More...
 
class  gf::StarShape
 Specialized shape representing a star. More...
 
class  gf::RoundedRectangleShape
 Specialized shape representing a rounded rectangle. More...
 
class  gf::Sprite
 A drawable representation of a texture, with its own transformations, color, etc. More...
 
class  gf::SpriteBatch
 A sprite batch. More...
 
class  gf::BareTexture
 An image that lives in the graphic memory that can be used for drawing. More...
 
class  gf::Texture
 A texture for colored images. More...
 
class  gf::AlphaTexture
 A texture with a single alpha channel. More...
 
class  gf::TileLayer
 A tile layer. More...
 
class  gf::Transformable
 Decomposed transform defined by a position, a rotation and a scale. More...
 
struct  gf::Vertex
 A point associated with a color and a texture coordinate. More...
 
class  gf::VertexArray
 A set of primitives. More...
 
class  gf::VertexBuffer
 Data in the graphics memory. More...
 
class  gf::View
 2D camera that defines what region is shown on screen More...
 
class  gf::AdaptativeView
 Adaptative view. More...
 
class  gf::ViewContainer
 A container of views. More...
 
class  gf::StretchView
 Stretch view. More...
 
class  gf::FitView
 Fit view. More...
 
class  gf::FillView
 Fill view. More...
 
class  gf::ExtendView
 Extend view. More...
 
class  gf::ScreenView
 Screen view. More...
 

Enumerations

enum  gf::BlendEquation {
  gf::BlendEquation::Add,
  gf::BlendEquation::Substract,
  gf::BlendEquation::ReverseSubstract
}
 Enumeration of the blending equations. More...
 
enum  gf::BlendFactor {
  gf::BlendFactor::Zero,
  gf::BlendFactor::One,
  gf::BlendFactor::SrcColor,
  gf::BlendFactor::OneMinusSrcColor,
  gf::BlendFactor::DstColor,
  gf::BlendFactor::OneMinusDstColor,
  gf::BlendFactor::SrcAlpha,
  gf::BlendFactor::OneMinusSrcAlpha,
  gf::BlendFactor::DstAlpha,
  gf::BlendFactor::OneMinusDstAlpha
}
 Enumeration of the blending factors. More...
 
enum  gf::Curve::Type {
  gf::Curve::Simple,
  gf::Curve::Outlined
}
 The type of the curve. More...
 
enum  gf::ColorEffect::Type {
  gf::ColorEffect::Normal,
  gf::ColorEffect::Grayscale,
  gf::ColorEffect::Sepia,
  gf::ColorEffect::NightVision,
  gf::ColorEffect::Warm,
  gf::ColorEffect::Cool
}
 Type of color effect. More...
 
enum  gf::ColorBlindEffect::Type {
  gf::ColorBlindEffect::Normal,
  gf::ColorBlindEffect::Protanopia,
  gf::ColorBlindEffect::Protanomaly,
  gf::ColorBlindEffect::Deuteranopia,
  gf::ColorBlindEffect::Deuteranomaly,
  gf::ColorBlindEffect::Tritanopia,
  gf::ColorBlindEffect::Tritanomaly,
  gf::ColorBlindEffect::Achromatopsia,
  gf::ColorBlindEffect::Achromatomaly
}
 Type of color blindness. More...
 
enum  gf::PrimitiveType {
  gf::PrimitiveType::Points,
  gf::PrimitiveType::LineStrip,
  gf::PrimitiveType::LineLoop,
  gf::PrimitiveType::Lines,
  gf::PrimitiveType::TriangleStrip,
  gf::PrimitiveType::TriangleFan,
  gf::PrimitiveType::Triangles
}
 Kind of primitives to render. More...
 
enum  gf::Shader::Type {
  gf::Shader::Vertex,
  gf::Shader::Fragment
}
 Type of shaders. More...
 
enum  gf::BareTexture::Format {
  gf::BareTexture::Format::Color,
  gf::BareTexture::Format::Alpha
}
 Format of the texture. More...
 
enum  gf::Anchor {
  gf::Anchor::Center,
  gf::Anchor::TopLeft,
  gf::Anchor::TopRight,
  gf::Anchor::BottomLeft,
  gf::Anchor::BottomRight
}
 The origin anchor of the transformable object. More...
 

Functions

bool operator== (const RenderStates &lhs, const RenderStates &rhs)
 Check render states equality. More...
 

Variables

constexpr BlendMode gf::BlendAlpha
 Alpha blend mode. More...
 
constexpr BlendMode gf::BlendAdd
 Additive blend mode. More...
 
constexpr BlendMode gf::BlendMultiply
 Multiplicative blend mode. More...
 
constexpr BlendMode gf::BlendNone
 No blend mode. More...
 

Detailed Description

All the classes related to graphics.

Enumeration Type Documentation

enum gf::Anchor
strong

The origin anchor of the transformable object.

See also
Transformable::setOrigin()
Enumerator
Center 

Center.

TopLeft 

Top-left.

TopRight 

Top-right.

BottomLeft 

Bottom-left.

BottomRight 

Bottom-right.

enum gf::BlendEquation
strong

Enumeration of the blending equations.

The equations are mapped directly to their OpenGL equivalents, specified by glBlendEquation() or glBlendEquationSeparate().

See also
gf::BlendMode
Enumerator
Add 

Pixel = Src * SrcFactor + Dst * DstFactor.

Substract 

Pixel = Src * SrcFactor - Dst * DstFactor.

ReverseSubstract 

Pixel = Dst * DstFactor - Src * SrcFactor.

enum gf::BlendFactor
strong

Enumeration of the blending factors.

The factors are mapped directly to their OpenGL equivalents, specified by glBlendFunc() or glBlendFuncSeparate().

See also
gf::BlendMode
Enumerator
Zero 

(0, 0, 0, 0)

One 

(1, 1, 1, 1)

SrcColor 

(src.r, src.g, src.b, src.a)

OneMinusSrcColor 

(1, 1, 1, 1) - (src.r, src.g, src.b, src.a)

DstColor 

(dst.r, dst.g, dst.b, dst.a)

OneMinusDstColor 

(1, 1, 1, 1) - (dst.r, dst.g, dst.b, dst.a)

SrcAlpha 

(src.a, src.a, src.a, src.a)

OneMinusSrcAlpha 

(1, 1, 1, 1) - (src.a, src.a, src.a, src.a)

DstAlpha 

(dst.a, dst.a, dst.a, dst.a)

OneMinusDstAlpha 

(1, 1, 1, 1) - (dst.a, dst.a, dst.a, dst.a)

Format of the texture.

See also
gf::BareTexture
Enumerator
Color 

RGBA format.

Alpha 

Alpha format.

enum gf::PrimitiveType
strong

Kind of primitives to render.

gf::PrimitiveType represents a kind of primitive to render. The primitives are mapped to their OpenGL equivalents, specified by glDrawArrays or glDrawElements.

See also
gf::RenderTarget::draw
Enumerator
Points 

List of individual points.

LineStrip 

List of connected lines, a point uses the previous point to form a line.

LineLoop 

List of connected lines, a point uses the previous point to form a line, the last point is connected to the first.

Lines 

List of individual lines.

TriangleStrip 

List of connected triangles, a point uses the two previous points to form a triangle.

TriangleFan 

List of connected triangles, a point uses the common center and the previous point to form a triangle.

Triangles 

List of individual triangles.

The type of the curve.

Enumerator
Simple 

A simple curve with no outline.

Outlined 

An outlined curve.

Type of color effect.

Enumerator
Normal 

No effect.

Grayscale 

Grayscale.

Sepia 

Sepia colors.

NightVision 

Night vision.

Warm 

Warm colors.

Cool 

Cool colors.

Type of shaders.

Enumerator
Vertex 

Type for a vertex shader.

Fragment 

Type for a fragment (or pixel) shader.

Type of color blindness.

Enumerator
Normal 

Normal vision.

Protanopia 

Protanopia (red dichromacy, 1% of males affected)

Protanomaly 

Protanomaly (red trichromacy, 1% of males affected)

Deuteranopia 

Deuteranopia (green dichromacy, 1% of males affected)

Deuteranomaly 

Deuteranomaly (green trichromacy, 6% of males affected)

Tritanopia 

Tritanopia (blue dichromacy, rare)

Tritanomaly 

Tritanomaly (blue trichromacy, very rare)

Achromatopsia 

Achromatopsia (rod monochromacy, very rare)

Achromatomaly 

Achromatomaly (blue cone monochromacy, very rare)

Function Documentation

bool operator== ( const RenderStates lhs,
const RenderStates rhs 
)
related

Check render states equality.

Two render states are equals if their blend mode, their transform matrix, their texture and their shader are the same.

Variable Documentation

constexpr BlendMode gf::BlendAdd

Additive blend mode.

Add source to dest.

See also
gf::BlendMode
constexpr BlendMode gf::BlendAlpha

Alpha blend mode.

Blend source and dest according to dest alpha. Also known as alpha blending.

See also
gf::BlendMode
constexpr BlendMode gf::BlendMultiply

Multiplicative blend mode.

Multiply source and dest.

See also
gf::BlendMode
constexpr BlendMode gf::BlendNone

No blend mode.

Overwrite dest with source.

See also
gf::BlendMode