YAGE  v0.1.1
Yet Another Game Engine
yage::GlslProgram Class Reference

#include <glslprogram.h>

Public Member Functions

 GlslProgram ()=default
 
 GlslProgram (const GlslProgram &)=delete
 
 GlslProgram (GlslProgram &&)=delete
 
 ~GlslProgram ()
 
GlslProgramoperator= (const GlslProgram &)=delete
 
GlslProgramoperator= (GlslProgram &&)=delete
 
void compileShaders (const std::string &vertex_shader_path, const std::string &fragment_shader_path)
 compiles vertex and fragment shader More...
 
void linkShaders ()
 
void addAttribute (const std::string &attribute_name)
 
GLint getUniformLocation (const std::string &uniform_name)
 
void use ()
 
void unuse ()
 

Private Member Functions

void compileShader (const GLuint &shader, const std::string &file_path)
 compiles one shader More...
 

Private Attributes

GLuint program_id_ = 0
 compiled shader program id More...
 
GLuint vertex_shader_id_ = 0
 
GLuint fragment_shader_id_ = 0
 
int attribute_index_ = 0
 

Constructor & Destructor Documentation

◆ GlslProgram() [1/3]

yage::GlslProgram::GlslProgram ( )
default

◆ GlslProgram() [2/3]

yage::GlslProgram::GlslProgram ( const GlslProgram )
delete

◆ GlslProgram() [3/3]

yage::GlslProgram::GlslProgram ( GlslProgram &&  )
delete

◆ ~GlslProgram()

yage::GlslProgram::~GlslProgram ( )

Member Function Documentation

◆ addAttribute()

void yage::GlslProgram::addAttribute ( const std::string &  attribute_name)

◆ compileShader()

void yage::GlslProgram::compileShader ( const GLuint &  shader,
const std::string &  file_path 
)
private

◆ compileShaders()

void yage::GlslProgram::compileShaders ( const std::string &  vertex_shader_path,
const std::string &  fragment_shader_path 
)

◆ getUniformLocation()

GLint yage::GlslProgram::getUniformLocation ( const std::string &  uniform_name)

◆ linkShaders()

void yage::GlslProgram::linkShaders ( )

◆ operator=() [1/2]

GlslProgram& yage::GlslProgram::operator= ( const GlslProgram )
delete

◆ operator=() [2/2]

GlslProgram& yage::GlslProgram::operator= ( GlslProgram &&  )
delete

◆ unuse()

void yage::GlslProgram::unuse ( )

◆ use()

void yage::GlslProgram::use ( )

Member Data Documentation

◆ attribute_index_

int yage::GlslProgram::attribute_index_ = 0
private

◆ fragment_shader_id_

GLuint yage::GlslProgram::fragment_shader_id_ = 0
private

◆ program_id_

GLuint yage::GlslProgram::program_id_ = 0
private

◆ vertex_shader_id_

GLuint yage::GlslProgram::vertex_shader_id_ = 0
private

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