ASGE  3.2.0
Simple Game Framework in GL
ASGE::Renderer Class Referenceabstract

#include <Renderer.hpp>

Collaboration diagram for ASGE::Renderer:
[legend]

Public Member Functions

 Renderer ()=default
 
virtual ~Renderer ()=default
 
virtual void setClearColour (Colour rgb)=0
 
const FontloadFont (const char *font, int size)
 
virtual const FontloadFont (const char *font, int size, double range)=0
 
virtual const FontloadFontFromMem (const char *name, const unsigned char *data, unsigned int len, int size, double range)=0
 
virtual const FontloadFontAtlas (Font::AtlasMetrics &&metrics, const std::string &img_path, const std::string &csv_path)=0
 
virtual bool init (const ASGE::GameSettings &settings)=0
 
virtual bool exit ()=0
 
virtual void preRender ()=0
 
virtual void postRender ()=0
 
virtual void setDefaultTextColour (const Colour &colour)=0
 
virtual SHADER_LIB::ShaderfindShader (int shader_handle)=0
 
virtual const FontgetDefaultFont () const =0
 
virtual const FontgetFont (int idx) const =0
 
virtual void setFont (int id)=0
 
virtual void setSpriteMode (SpriteSortMode mode)=0
 
virtual void setWindowedMode (GameSettings::WindowMode mode)=0
 
virtual void setWindowTitle (const char *str)=0
 
virtual void swapBuffers ()=0
 
virtual std::unique_ptr< InputinputPtr ()=0
 
virtual std::unique_ptr< SpritecreateUniqueSprite ()=0
 
virtual SpritecreateRawSprite ()=0
 
virtual void render (const ASGE::Sprite &sprite)=0
 
virtual void render (const ASGE::Tile &tile, const ASGE::Point2D &xy)=0
 
virtual void render (const ASGE::Text &text)=0
 
virtual void render (ASGE::Text &&text)=0
 
void render (ASGE::Texture2D &texture, const ASGE::Point2D &pos_xy, int16_t z_order)
 
virtual void render (ASGE::Texture2D &texture, std::array< float, 4 > rect, const Point2D &pos_xy, int width, int height, int16_t z_order)=0
 
virtual ASGE::Texture2DcreateNonCachedTexture (int width, int height, ASGE::Texture2D::Format format, void *data)=0
 
virtual ASGE::Texture2DcreateNonCachedMSAATexture (int width, int height, ASGE::Texture2D::Format format)=0
 
virtual ASGE::Texture2DcreateNonCachedTexture (const std::string &path)=0
 
virtual ASGE::Texture2DcreateCachedTexture (std::string id, int width, int height, ASGE::Texture2D::Format format, void *data)=0
 
virtual ASGE::Texture2DcreateCachedTextureArray (std::string id, int width, int height, ASGE::Texture2D::Format format, void *data, int count)=0
 
virtual ASGE::Texture2DcreateCachedTexture (const std::string &path)=0
 
SHADER_LIB::ShaderinitPixelShaderFromFile (const std::string &filename)
 
virtual SHADER_LIB::ShaderinitPixelShader (std::string shader)=0
 
virtual void setActiveShader (ASGE::SHADER_LIB::Shader *shader)=0
 
virtual SHADER_LIB::ShadergetShader ()=0
 
GameSettings::WindowMode getWindowMode () noexcept
 
virtual int windowHeight () const noexcept=0
 
virtual int windowWidth () const noexcept=0
 
virtual void setProjectionMatrix (float min_x, float max_x, float min_y, float max_y)=0
 
virtual void setProjectionMatrix (const Camera::CameraView &view)=0
 
virtual ASGE::Viewport getViewport () const =0
 
virtual void setViewport (const ASGE::Viewport &viewport)=0
 
virtual void setRenderTarget (RenderTarget *)=0
 
virtual std::tuple< int32_t, int32_t, int16_t > screenRes ()=0
 
virtual void setBaseResolution (int width, int height, Resolution::Policy policy)=0
 
virtual const ASGE::Resolutionresolution () const =0
 
virtual void setResolutionPolicy (ASGE::Resolution::Policy)=0
 
ASGE::RenderTargetrenderTarget ()
 
const ASGE::RenderTargetrenderTarget () const
 
int msaa () const
 
ASGE::Texture2D::MagFilter magFilter () const
 

Protected Member Functions

void msaa (int msaa_level)
 
void magFilter (ASGE::Texture2D::MagFilter mag)
 
GameSettings::WindowModewindowMode ()
 
const GameSettings::WindowModewindowMode () const
 
ColourclearColour ()
 
const ColourclearColour () const
 
ColourdefTextColour ()
 
const ColourdefTextColour () const
 

Protected Attributes

ASGE::RenderTargetactive_buffer { nullptr }
 

Detailed Description

The renderer used in the game.

The renderer is the heart and sole of the engine. It's responsible for managing rendering, shaders input initialisation, the window etc. This class defines the interface that all platform specific renders must utilise. This allows renderers to be replaced easily if their interface matches. The platform specific renders may use batching or texture caching but this is not enforced.

Definition at line 51 of file Renderer.hpp.

Constructor & Destructor Documentation

◆ Renderer()

ASGE::Renderer::Renderer ( )
default

Default Constructor.

The renderer is an abstract class that does not know about the rendering implementation details. Its primary use is as an interface that all rendering subsystems need to adhere to.

◆ ~Renderer()

virtual ASGE::Renderer::~Renderer ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ createCachedTexture() [1/2]

virtual ASGE::Texture2D* ASGE::Renderer::createCachedTexture ( const std::string &  path)
pure virtual

Creates a cached texture from a file.

A cached texture is one which is managed by the renderer. Upon its successful creation it will be stored using its file path. Subsequent retrievals of a texture with the same ID will result in the cached version being returned.

Parameters
[in]pathThe texture to load.
Returns
The newly cached Texture.

◆ createCachedTexture() [2/2]

virtual ASGE::Texture2D* ASGE::Renderer::createCachedTexture ( std::string  id,
int  width,
int  height,
ASGE::Texture2D::Format  format,
void *  data 
)
pure virtual

Creates a cached texture.

A cached texture is one which is managed by the renderer. Upon its successful creation it will be stored using its ID. Subsequent retrievals of a texture with the same ID will result in the cached version being returned.

Parameters
[in]idThe unique ID for the texture.
[in]widthThe width of the newly created texture.
[in]heightThe height of the newly created texture.
[in]formatThe pixel format.
[in]dataExisting pixel data to use. Can be nullptr (empty).
Returns
A pointer to the cached ASGE::Texture2D matching the requested ID

◆ createCachedTextureArray()

virtual ASGE::Texture2D* ASGE::Renderer::createCachedTextureArray ( std::string  id,
int  width,
int  height,
ASGE::Texture2D::Format  format,
void *  data,
int  count 
)
pure virtual

Creates a cached version of a 2D Texture Array.

2D Texture Arrays can be used to store images on different layers.

Parameters
[in]idThe unique id to use.
[in]widthThe width of the textures in the array.
[in]heightThe height of the textures in the array.
[in]formatThe format of the pixels being stored.
[in]dataInitial data to upload.
[in]countThe number of layers to allocate.
Returns
A pointer to the cached ASGE::Texture2D

◆ createNonCachedMSAATexture()

virtual ASGE::Texture2D* ASGE::Renderer::createNonCachedMSAATexture ( int  width,
int  height,
ASGE::Texture2D::Format  format 
)
pure virtual

Creates a non-cached multi-sampling texture.

A non-cached texture is created and assigned to the GPU. The size of the allocation depends on both the dimensions and the pixel format. As the texture is not cached by ASGE, responsibility for its destruction is left to the callee.

Parameters
[in]widthThe width of the newly created MSAA texture.
[in]heightThe height of the newly created MSAA texture.
[in]formatThe pixel format.
Returns
The newly created Texture.
Warning
Don't forget to deallocate the memory the function call allocates.

◆ createNonCachedTexture() [1/2]

virtual ASGE::Texture2D* ASGE::Renderer::createNonCachedTexture ( const std::string &  path)
pure virtual

Attempts to create a non-cached texture from a file.

A non-cached texture is created and assigned to the GPU. The size of the allocation depends on both the dimensions and the pixel format. As the texture is not cached by ASGE, responsibility for its destruction is left to the callee.

Parameters
[in]pathThe texture to load.
Returns
The newly created Texture.
Warning
Don't forget to deallocate the memory the function call allocates.

◆ createNonCachedTexture() [2/2]

virtual ASGE::Texture2D* ASGE::Renderer::createNonCachedTexture ( int  width,
int  height,
ASGE::Texture2D::Format  format,
void *  data 
)
pure virtual

Creates a non-cached texture.

A non-cached texture is created and assigned to the GPU. The size of the allocation depends on both the dimensions and the pixel format. As the texture is not cached by ASGE, responsibility for its destruction is left to the callee.

Parameters
[in]widthThe width of the newly created texture.
[in]heightThe height of the newly created texture.
[in]formatThe pixel format.
[in]dataExisting pixel data to use. Can be nullptr (empty).
Returns
The newly created Texture.
Warning
Don't forget to deallocate the memory the function call allocates.

◆ createRawSprite()

virtual Sprite* ASGE::Renderer::createRawSprite ( )
pure virtual

Creates a new Sprite using the heap.

The sprite will be leaked when it falls out of scope, so needs to be manually freed.

Returns
A dynamically allocated sprite.

◆ createUniqueSprite()

virtual std::unique_ptr<Sprite> ASGE::Renderer::createUniqueSprite ( )
pure virtual

Creates a new Sprite using ownership semantics.

The sprite will be auto-deallocated when it falls out of scope, so be careful where to store it.

Returns
A uniquely owned sprite.

◆ exit()

virtual bool ASGE::Renderer::exit ( )
pure virtual

Exits the renderer and performs clean-up.

Returns
True if achieved gracefully.

◆ findShader()

virtual SHADER_LIB::Shader* ASGE::Renderer::findShader ( int  shader_handle)
pure virtual

Locates a shader using its ID.

Shaders are stored/cached so to prevent dangling pointers handle's can be used to retrieve the shader. It is recommended not to store the returned shader as it's memory location could change over time.

Parameters
[in]shader_handleThe shader to find.

◆ getDefaultFont()

virtual const Font& ASGE::Renderer::getDefaultFont ( ) const
pure virtual

Returns the currently active font.

When rendering text, if a colour is not specified the default one will be used instead. This can be set using this function.

Returns
Font The font currently being used by the renderer.
See also
Font

◆ getFont()

virtual const Font& ASGE::Renderer::getFont ( int  idx) const
pure virtual

Returns a font.

When loading fonts they will be assigned an index, you can retrieve the font using its index to access additional font related functionality

Parameters
[in]idxThe loaded font index
Returns
Font The font stored in idx otherwise current loaded
See also
Font

◆ getShader()

virtual SHADER_LIB::Shader* ASGE::Renderer::getShader ( )
pure virtual

Retrieves the current shader being used for rendering.

Returns
Pointer to the active shader (if any).

◆ getViewport()

virtual ASGE::Viewport ASGE::Renderer::getViewport ( ) const
pure virtual

Gets the viewport used to map the renderer to the window.

Returns
Retrieves the active viewport.

◆ getWindowMode()

GameSettings::WindowMode ASGE::Renderer::getWindowMode ( )
noexcept

Retrieves the window mode in use.

Returns
The window mode.

◆ init()

virtual bool ASGE::Renderer::init ( const ASGE::GameSettings settings)
pure virtual

Initialises the renderer.

Performs all the initialisation of the renderer, its framework and the window creation.

Parameters
[in]wThe width of the window in pixels.
[in]hThe height of the window in pixels.
[in]modeShould the window launch in fullscreen.
Returns
True if success.
See also
WindowMode

◆ initPixelShader()

virtual SHADER_LIB::Shader* ASGE::Renderer::initPixelShader ( std::string  shader)
pure virtual

Initialises a pixel shader.

GLSL Example

#version 330 core
#define FRAG_COLOUR 0
in VertexData
{
vec2 uvs;
vec4 rgba;
} fs_in;
uniform sampler2D image;
layout (location = FRAG_COLOUR, index = 0) out vec4 FragColor;
void main()
{
FragColor = fs_in.rgba * texture(image, fs_in.uvs);
}
Parameters
[in]shaderThe plain text representing a pixel shader.
Returns
The resultant shader object.
Note
The shader is managed by the renderer. It does not need to be manually deallocated.

◆ initPixelShaderFromFile()

SHADER_LIB::Shader* ASGE::Renderer::initPixelShaderFromFile ( const std::string &  filename)

Initialises a pixel shader stored from a local file.

Parameters
[in]filenameThe file to load.
Returns
The resultant shader object.
Note
The shader is managed by the renderer. It does not need to be manually deallocated.

◆ inputPtr()

virtual std::unique_ptr<Input> ASGE::Renderer::inputPtr ( )
pure virtual

Creates an input system, linked to the renderer.

Returns
A uniquely owned input system.

◆ loadFont() [1/2]

const Font* ASGE::Renderer::loadFont ( const char *  font,
int  size 
)

Loads a font that can be used to render text. Creates an SDF set of characters that can be used to render text. This version of the function will attempt to load a local file and convert the font using a distance range of 2.0.

Parameters
[in]fontThe filepath to the font file.
[in]sizeThe size of the glyphs to use in atlas generation.
Returns
A pointer to the loaded font.

◆ loadFont() [2/2]

virtual const Font* ASGE::Renderer::loadFont ( const char *  font,
int  size,
double  range 
)
pure virtual

Loads a font that can be used to render text. Creates an SDF set of characters that can be used to render text.

Parameters
[in]fontThe filepath to the font file.
[in]sizeThe size of the glyphs to use in atlas generation.
[in]rangeThe distance range to use.
Returns
A pointer to the loaded font.

◆ loadFontAtlas()

virtual const Font* ASGE::Renderer::loadFontAtlas ( Font::AtlasMetrics &&  metrics,
const std::string &  img_path,
const std::string &  csv_path 
)
pure virtual

Loads a font atlas that can be used to render text. Attempts to create a new atlas for rendering text using a pre-existing image file and accompanying CSV file. The advantage to this is the ability to use more computationally expensive algorithms and a significant reduction in load times. This function was designed with msdf-atlas-gen in mind.

Parameters
[in]metricsThe font metrics used to render text.
[in]img_pathThe location of the image file to load.
[in]csv_pathThe CSV data that defines each glyph.

◆ loadFontFromMem()

virtual const Font* ASGE::Renderer::loadFontFromMem ( const char *  name,
const unsigned char *  data,
unsigned int  len,
int  size,
double  range 
)
pure virtual

Loads a font that can be used to render text.

Parameters
[in]nameThe name of the font.
[in]dataA binary font loaded in memory.
[in]sizeThe buffer size.
[in]sizeThe size of the font to use in atlas generation.
Returns
A pointer to the loaded font.

◆ magFilter()

ASGE::Texture2D::MagFilter ASGE::Renderer::magFilter ( ) const

Gets the default MagFilter. All textures when sampled beyond their resolution need to be magnified. This is the default value the game will use when no filter has been individually set on a texture.

Returns
The default magnification filter.
See also
ASGE::Texture2D::MagFilter

◆ msaa()

int ASGE::Renderer::msaa ( ) const

Gets the MSAA level. When the game is setup the MSAA level is set on the window. This can't be adjusted during runtime, however, its value can be retrieved and used to create additional MSAA buffers.

Returns
The MSAA level to use.

◆ postRender()

virtual void ASGE::Renderer::postRender ( )
pure virtual

Sets the post render environment.

Can be used amongst other things to update OSD settings and to flush batched render calls.

◆ preRender()

virtual void ASGE::Renderer::preRender ( )
pure virtual

Sets the pre render environment.

Can be used amongst other things to reset render settings and to clear the screen.

◆ render() [1/6]

virtual void ASGE::Renderer::render ( ASGE::Text &&  text)
pure virtual

Renders a temporary text object.

Parameters
[in]textThe temporary text object to render.

◆ render() [2/6]

void ASGE::Renderer::render ( ASGE::Texture2D texture,
const ASGE::Point2D pos_xy,
int16_t  z_order 
)

Renders a texture.

Acts as as simple proxy function for rendering textures. This shorthand function actually calls the longhand version of the function using the texture's own properties to define sensible defaults i.e. sample the whole texture and render it at the same width and height it was originally defined as.

Parameters
[in]textureThe texture to render.
[in]pos_xyThe xy position of the rendered texture in 2D Space.
[in]z_orderThe z-ordering to use.

◆ render() [3/6]

virtual void ASGE::Renderer::render ( ASGE::Texture2D texture,
std::array< float, 4 >  rect,
const Point2D pos_xy,
int  width,
int  height,
int16_t  z_order 
)
pure virtual

Renders a texture to the screen or attached buffer.

Typically an ASGE::Sprite is used for rendering. Textures are attached to these objects and the positional and source rectangle information is used to generate the matrices required for rendering. However, on occasion it might be preferable to store a texture directly without the extra positional data. For example a tile map can be made up from a list or array of textures. When rendering the absolute position can be forwarded on to the renderer along with the UV mapping and this function will take care of the rest (it basically maps to a temporary sprite object).

auto [width, height, std::ignore] = renderer->screenRes();
struct Tile
{
public:
ASGE::Texture2D* texture = nullptr;
std::array<float,4> source_rectangle {0};
};
// create a tile with a texture and source rectangle
Tile tile;
tile.texture = renderer->createCachedTexture("/data/img/tile_sheet.png");
tile.source_rectangle = {0, 0, 64, 64};
// some moments later
renderer->render(*tile.texture, tile.source_rectangle, ASGE::Point2D{0,0}, 64, 64);
a simple 2D non-renderable texture.
Definition: Texture.hpp:57
A point in 2D space.
Definition: Point2D.hpp:31
Parameters
[in]textureThe texture to be sampled.
[in]rectThe source rectangle to use when sampling.
[in]pos_xyThe position to render the texture in 2D space.
[in]widthHow wide to render it.
[in]heightHow tall to render it.
[in]z_orderThe z ordering to use.

◆ render() [4/6]

virtual void ASGE::Renderer::render ( const ASGE::Sprite sprite)
pure virtual

Renders a sprite to the screen.

All the rendering params are stored within the sprite class itself.

Parameters
[in]spriteA reference to the sprite to render.
See also
Sprite

◆ render() [5/6]

virtual void ASGE::Renderer::render ( const ASGE::Text text)
pure virtual

Renders a text object.

Parameters
[in]textThe text object to render.

◆ render() [6/6]

virtual void ASGE::Renderer::render ( const ASGE::Tile tile,
const ASGE::Point2D xy 
)
pure virtual

Renders a tile object.

Parameters
[in]tileThe text object to render.

◆ renderTarget() [1/2]

ASGE::RenderTarget* ASGE::Renderer::renderTarget ( )
inline

Gets any active render target. Retrieves the active buffer object. This will be nullptr if there is currently no render target active.

Returns
The active render target.

Definition at line 665 of file Renderer.hpp.

◆ renderTarget() [2/2]

const ASGE::RenderTarget* ASGE::Renderer::renderTarget ( ) const
inline

Gets any active render target. Retrieves the active buffer object. This will be nullptr if there is currently no render target active.

Returns
The active render target.

Definition at line 674 of file Renderer.hpp.

◆ resolution()

virtual const ASGE::Resolution& ASGE::Renderer::resolution ( ) const
pure virtual

Retrieves the resolution information. The resolution data structure stores information such as the current active viewport, the window width and height, the base resolution and the desktop resolution.

Returns
The resolution information.
See also
ASGE::Resolution

◆ screenRes()

virtual std::tuple<int32_t, int32_t, int16_t> ASGE::Renderer::screenRes ( )
pure virtual

Retrieves information about the screen the window is on.

Retrieves information on the screen the window resides on. In particular it provides information about the width, height and the refresh rate of the screen. Returned as a tuple to allow the use of structured bindings.

auto [width, height, std::ignore] = renderer->screenRes();
auto [width, height, refresh] = renderer->screenRes();
Logging::INFO(std::to_string(width) + "," +
std::to_string(height)+ "," + std::to_string(refresh));
void INFO(const std::string &message)
Definition: Logger.hpp:302
Returns
The screen mode info: width, height and refresh rate.

◆ setActiveShader()

virtual void ASGE::Renderer::setActiveShader ( ASGE::SHADER_LIB::Shader shader)
pure virtual

Sets the shader to use when rendering.

Parameters
[in]shaderThe shader to activate.

◆ setBaseResolution()

virtual void ASGE::Renderer::setBaseResolution ( int  width,
int  height,
Resolution::Policy  policy 
)
pure virtual

Sets the base (game) resolution.

When designing the game, the positioning, scaling and logic will be implemented with a specific "resolution" in mind. However, when rendering the window size may not match the base resolution correctly, resulting in scaling. Setting this will allow the window to resize correctly, depending on the policy used. Designing games to support multiple resolutions is quite tricky and this function aims to help with this complexity. Simply set your game resolution and let the policy do the work for you.

Note
The base resolution is not in pixels, rather game units.
Parameters
width.The width the game was designed in.
height.The height the game was designed in.
policy.The scaling policy to apply when window size does not match.
// game is 1024,768 units; scale to window but retain its aspect ratio
renderer->setBaseResolution(1024, 768, ASGE::Resolution::Policy::MAINTAIN);
See also
Resolution::Policy

◆ setClearColour()

virtual void ASGE::Renderer::setClearColour ( Colour  rgb)
pure virtual

Sets the clear colour.

This colour will be used to clear the window on every update. Allowing a clean slate before performing the next render.

Parameters
rgb[in]A RGB defined colour to use for clearing.
See also
Colour

◆ setDefaultTextColour()

virtual void ASGE::Renderer::setDefaultTextColour ( const Colour colour)
pure virtual

Sets the default text colour.

When rendering text, if a colour is not specified the default one will be used instead. This can be set using this function.

Parameters
[in]colourThe colour to use.

◆ setFont()

virtual void ASGE::Renderer::setFont ( int  id)
pure virtual

Sets the currently active font.

In order for this to work, a valid id must be provided. The ID is returned from the load font function, so it is advisable to keep a record of it.

Parameters
[in]idThe index of the font to use (must be loaded).
Deprecated:
since 2.1

◆ setProjectionMatrix() [1/2]

virtual void ASGE::Renderer::setProjectionMatrix ( const Camera::CameraView view)
pure virtual

Sets the projection matrix.

Controls how the scene is rendered to the window. The projection matrix can be thought of as the camera's view, detailing the focal point and the content to include either side of the mid-point. This projection matrix may be stretched to accommodate the viewport used to render to the window.

Parameters
[in]view.The camera view to use.

◆ setProjectionMatrix() [2/2]

virtual void ASGE::Renderer::setProjectionMatrix ( float  min_x,
float  max_x,
float  min_y,
float  max_y 
)
pure virtual

Sets the projection matrix.

Controls how the scene is rendered to the window. The projection matrix can be thought of as the camera's view, detailing the focal point and the content to include either side of the mid-point. This projection matrix may be stretched to accommodate the viewport used to render to the window.

Parameters
[in]min_xThe camera's look at x position.
[in]max_xThe camera's look at y position.
[in]min_yThe camera's frustum width.
[in]max_yThe camera's frustum height.

◆ setRenderTarget()

virtual void ASGE::Renderer::setRenderTarget ( RenderTarget )
pure virtual

Sets the render target to use for rendering.

Instead of rendering directly to the screen, a render target with an attached texture can be directly rendered to. This allows for off-screen rendering as well as an easier to manage post-fx pipeline.

Parameters
[in]render_target.The destination target.

◆ setResolutionPolicy()

virtual void ASGE::Renderer::setResolutionPolicy ( ASGE::Resolution::Policy  )
pure virtual

Sets the resolution policy. Defines how scaling should take place. There are a number of policies that control how mapping of the game's resolution to the window should take place.

Parameters
[in]policy.The policy to apply.
Note
Changing the policy will reset the current viewport.
See also
ASGE::Resolution::Policy

◆ setSpriteMode()

virtual void ASGE::Renderer::setSpriteMode ( SpriteSortMode  mode)
pure virtual

Sets the sprite rendering mode. Useful for batching.

Parameters
[in]modeThe SpriteSortMode used for rendering.
See also
SpriteSortMode

◆ setViewport()

virtual void ASGE::Renderer::setViewport ( const ASGE::Viewport viewport)
pure virtual

Sets the viewport used to map the x,y ndc to the window or buffer.

Parameters
[in]viewportSets the viewport.

◆ setWindowedMode()

virtual void ASGE::Renderer::setWindowedMode ( GameSettings::WindowMode  mode)
pure virtual

Attempts to enable the requested window mode.

Will only swap if the mode is different and will attempt to perform this operation gracefully as possible.

Parameters
[in]modeThe requested window mode.

◆ setWindowTitle()

virtual void ASGE::Renderer::setWindowTitle ( const char *  str)
pure virtual

Sets the window title.

Parameters
[in]strThe name of the window.

◆ swapBuffers()

virtual void ASGE::Renderer::swapBuffers ( )
pure virtual

Tells the graphics subsystem to swap buffers.

◆ windowHeight()

virtual int ASGE::Renderer::windowHeight ( ) const
pure virtualnoexcept

Retrieves the window height.

Returns
The window height.

◆ windowWidth()

virtual int ASGE::Renderer::windowWidth ( ) const
pure virtualnoexcept

Retrieves the window width.

Returns
The window width.

Member Data Documentation

◆ active_buffer

ASGE::RenderTarget* ASGE::Renderer::active_buffer { nullptr }
protected

The attached FBO. Used when rendering offscreen to textures.

Definition at line 716 of file Renderer.hpp.


The documentation for this class was generated from the following file: