galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
galaxy::graphics Namespace Reference

Classes

class  Animation
 2D animation information. More...
 
class  Camera
 Orthographic 2D camera. More...
 
class  ChromaticAberration
 Chromatic Aberration pass. More...
 
class  Circle
 A circle. More...
 
class  Ellipse
 An elliptical circle. More...
 
class  FilmicGrain
 Film grain effect. More...
 
class  Font
 A font is a MSDF atlas of glyphs. More...
 
class  FontContext
 MSDF OpenGL configuration. More...
 
struct  Frame
 Single frame of an animation. More...
 
class  Framebuffer
 OpenGL framebuffer to render to. More...
 
class  GammaCorrection
 GammaCorrection effect. More...
 
class  GaussianBlur
 Gaussian Blur pass. More...
 
class  Point
 A single point. More...
 
class  Polygon
 A closed loop line collection of points. I.e. A square, triangle, etc. More...
 
class  Polyline
 An open looped line of points. More...
 
class  PostEffect
 Manages post processing effects to apply to combined scene. More...
 
class  PostProcess
 Manages post processing effects to apply to combined scene. More...
 
struct  RenderCommand
 Data to be passed to the renderer. More...
 
struct  RenderData
 Uniform data passed to shader from entity. More...
 
class  Renderer
 2D OpenGL renderer. More...
 
class  RenderTexture
 Draw to an opengl texture instead of the screen. More...
 
class  Shape
 A generic 2D shape. More...
 
class  Sharpen
 Sharpening effect. More...
 
class  SMAA
 Submorphological Anti Aliasing. More...
 
class  Text
 String of glyphs rendered with a font. More...
 
class  Transform
 Defines the 2D transformation of an entity. More...
 
class  VertexBatch
 Batches together vertex data to reduce draw calls. More...
 

Concepts

concept  is_posteffect
 Constraint to ensure type is a Post Effect.
 

Functions

std::array< Vertex, 4 > gen_quad_vertices (const float width, const float height) noexcept
 Generate some default verticies.
 
std::array< unsigned int, 6 > gen_default_indices () noexcept
 Generate some default indicies.
 
template<meta::is_arithmetic Type>
float map_x_texel (const Type x, const float width) noexcept
 Takes in a x positon texture coord and maps it to a texel.
 
template<meta::is_arithmetic Type>
float map_y_texel (const Type y, const float height) noexcept
 Takes in a y positon texture coord and maps it to a texel.
 

Function Documentation

◆ gen_quad_vertices()

std::array< Vertex, 4 > galaxy::graphics::gen_quad_vertices ( const float width,
const float height )
noexcept

Generate some default verticies.

Parameters
widthWidth of quad.
heightHeight of quad.
Returns
Vertices mapped from TOP LEFT to BOTTOM LEFT CLOCKWISE.

Definition at line 14 of file Vertex.cpp.

+ Here is the caller graph for this function:

◆ gen_default_indices()

std::array< unsigned int, 6 > galaxy::graphics::gen_default_indices ( )
noexcept

Generate some default indicies.

Returns
Indices mapping vertices from TOP LEFT to BOTTOM LEFT CLOCKWISE.

Definition at line 41 of file Vertex.cpp.

+ Here is the caller graph for this function:

◆ map_x_texel()

template<meta::is_arithmetic Type>
float galaxy::graphics::map_x_texel ( const Type x,
const float width )
inlinenodiscardnoexcept

Takes in a x positon texture coord and maps it to a texel.

Template Parameters
TypeType of the variable.
Parameters
xPosition of texture coord.
widthTexture width.
Returns
OpenGL shader compatible texel.

Definition at line 66 of file Vertex.hpp.

+ Here is the caller graph for this function:

◆ map_y_texel()

template<meta::is_arithmetic Type>
float galaxy::graphics::map_y_texel ( const Type y,
const float height )
inlinenodiscardnoexcept

Takes in a y positon texture coord and maps it to a texel.

Template Parameters
TypeType of the variable.
Parameters
yPosition of texture coord.
heightTexture height.
Returns
OpenGL shader compatible texel.

Definition at line 83 of file Vertex.hpp.

+ Here is the caller graph for this function: