Conquer Space 0.0.0
A space themed grand strategy game set in the near future, with realistic orbital mechanics, and an emphasis on economics and politics.
Public Member Functions | Private Attributes | List of all members
cqsp::engine::Renderer2D Class Reference

#include <renderer2d.h>

Public Member Functions

 Renderer2D (cqsp::asset::ShaderProgram_t tex, cqsp::asset::ShaderProgram_t color)
 
 Renderer2D (cqsp::asset::ShaderProgram_t tex)
 Only enable the texture shader More...
 
 Renderer2D (cqsp::asset::ShaderProgram_t color, bool)
 Only enable the color shader More...
 
void DrawTexturedSprite (cqsp::engine::Mesh *mesh, cqsp::asset::Texture &texture, glm::vec2 position, glm::vec2 size, float rotate)
 
void DrawColoredSprite (cqsp::engine::Mesh *mesh, glm::vec3 color, glm::vec2 position, glm::vec2 size, float rotate)
 
void SetProjection (const glm::mat4 &projection)
 
bool TextureEnabled ()
 
bool ColorEnabled ()
 

Private Attributes

cqsp::asset::ShaderProgram_t texture_shader
 
cqsp::asset::ShaderProgram_t color_shader
 

Constructor & Destructor Documentation

◆ Renderer2D() [1/3]

cqsp::engine::Renderer2D::Renderer2D ( cqsp::asset::ShaderProgram_t  tex,
cqsp::asset::ShaderProgram_t  color 
)

◆ Renderer2D() [2/3]

cqsp::engine::Renderer2D::Renderer2D ( cqsp::asset::ShaderProgram_t  tex)
explicit

Only enable the texture shader

Parameters
tex

◆ Renderer2D() [3/3]

cqsp::engine::Renderer2D::Renderer2D ( cqsp::asset::ShaderProgram_t  color,
bool   
)

Only enable the color shader

Parameters
color

Member Function Documentation

◆ ColorEnabled()

bool cqsp::engine::Renderer2D::ColorEnabled ( )

◆ DrawColoredSprite()

void cqsp::engine::Renderer2D::DrawColoredSprite ( cqsp::engine::Mesh mesh,
glm::vec3  color,
glm::vec2  position,
glm::vec2  size,
float  rotate 
)

◆ DrawTexturedSprite()

void cqsp::engine::Renderer2D::DrawTexturedSprite ( cqsp::engine::Mesh mesh,
cqsp::asset::Texture texture,
glm::vec2  position,
glm::vec2  size,
float  rotate 
)

◆ SetProjection()

void cqsp::engine::Renderer2D::SetProjection ( const glm::mat4 &  projection)

◆ TextureEnabled()

bool cqsp::engine::Renderer2D::TextureEnabled ( )

Member Data Documentation

◆ color_shader

cqsp::asset::ShaderProgram_t cqsp::engine::Renderer2D::color_shader
private

◆ texture_shader

cqsp::asset::ShaderProgram_t cqsp::engine::Renderer2D::texture_shader
private

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