Euphoria
eu::render::ShaderProgram Struct Reference

#include <shader.h>

Inheritance diagram for eu::render::ShaderProgram:
eu::render::ShaderId

Public Member Functions

 ShaderProgram ()
 
 ~ShaderProgram ()=default
 
 ShaderProgram (const ShaderProgram &other)=delete
 
void operator= (const ShaderProgram &)=delete
 
 ShaderProgram (ShaderProgram &&other)=delete
 
void operator= (ShaderProgram &&)=delete
 
void add_attribute (const ShaderAttribute &attribute)
 
bool load (io::FileSystem *fs, const io::FilePath &file_path)
 
bool compile (const gl::Char *vertex_source, const gl::Char *fragment_source, const gl::Char *geometry_source=nullptr)
 
ShaderUniform get_uniform (const std::string &name)
 
void set_uniform (const ShaderUniform &attribute, gl::Int val)
 
void set_uniform (const ShaderUniform &attribute, float val)
 
void set_uniform (const ShaderUniform &attribute, const Rgb &val)
 
void set_uniform (const ShaderUniform &attribute, const Rgba &val)
 
void set_uniform (const ShaderUniform &attribute, const vec3f &val)
 
void set_uniform (const ShaderUniform &attribute, const vec4f &val)
 
void set_uniform (const ShaderUniform &attribute, const mat3f &val)
 
void set_uniform (const ShaderUniform &attribute, const mat4f &val)
 
void set_uniform (const ShaderUniform &attribute, const Rectf &val)
 
const std::vector< ShaderAttribute > & get_attributes () const
 
const io::FilePathget_name () const
 
- Public Member Functions inherited from eu::render::ShaderId
 ShaderId ()
 
 ~ShaderId ()
 
 ShaderId (const ShaderId &other)=delete
 
void operator= (const ShaderId &)=delete
 
 ShaderId (ShaderId &&other)=delete
 
void operator= (ShaderId &&)=delete
 
bool is_currently_bound () const
 
gl::Uint get_id () const
 

Static Public Member Functions

static const ShaderProgramget_current_bound_for_debug ()
 

Detailed Description

Definition at line 50 of file shader.h.

Constructor & Destructor Documentation

◆ ShaderProgram() [1/3]

eu::render::ShaderProgram::ShaderProgram ( )

Definition at line 391 of file shader.cc.

◆ ~ShaderProgram()

eu::render::ShaderProgram::~ShaderProgram ( )
default

◆ ShaderProgram() [2/3]

eu::render::ShaderProgram::ShaderProgram ( const ShaderProgram other)
delete

◆ ShaderProgram() [3/3]

eu::render::ShaderProgram::ShaderProgram ( ShaderProgram &&  other)
delete

Member Function Documentation

◆ add_attribute()

void eu::render::ShaderProgram::add_attribute ( const ShaderAttribute attribute)

Definition at line 184 of file shader.cc.

◆ compile()

bool eu::render::ShaderProgram::compile ( const gl::Char vertex_source,
const gl::Char fragment_source,
const gl::Char geometry_source = nullptr 
)

Definition at line 193 of file shader.cc.

◆ get_attributes()

const std::vector< ShaderAttribute > & eu::render::ShaderProgram::get_attributes ( ) const

Definition at line 452 of file shader.cc.

◆ get_current_bound_for_debug()

const ShaderProgram * eu::render::ShaderProgram::get_current_bound_for_debug ( )
static

Definition at line 129 of file shader.cc.

◆ get_name()

const io::FilePath & eu::render::ShaderProgram::get_name ( ) const

Definition at line 459 of file shader.cc.

◆ get_uniform()

ShaderUniform eu::render::ShaderProgram::get_uniform ( const std::string &  name)

Definition at line 262 of file shader.cc.

◆ load()

bool eu::render::ShaderProgram::load ( io::FileSystem fs,
const io::FilePath file_path 
)

Definition at line 398 of file shader.cc.

◆ operator=() [1/2]

void eu::render::ShaderProgram::operator= ( const ShaderProgram )
delete

◆ operator=() [2/2]

void eu::render::ShaderProgram::operator= ( ShaderProgram &&  )
delete

◆ set_uniform() [1/9]

void eu::render::ShaderProgram::set_uniform ( const ShaderUniform attribute,
const mat3f val 
)

Definition at line 353 of file shader.cc.

◆ set_uniform() [2/9]

void eu::render::ShaderProgram::set_uniform ( const ShaderUniform attribute,
const mat4f val 
)

Definition at line 366 of file shader.cc.

◆ set_uniform() [3/9]

void eu::render::ShaderProgram::set_uniform ( const ShaderUniform attribute,
const Rectf val 
)

Definition at line 379 of file shader.cc.

◆ set_uniform() [4/9]

void eu::render::ShaderProgram::set_uniform ( const ShaderUniform attribute,
const Rgb val 
)

Definition at line 301 of file shader.cc.

◆ set_uniform() [5/9]

void eu::render::ShaderProgram::set_uniform ( const ShaderUniform attribute,
const Rgba val 
)

Definition at line 314 of file shader.cc.

◆ set_uniform() [6/9]

void eu::render::ShaderProgram::set_uniform ( const ShaderUniform attribute,
const vec3f val 
)

Definition at line 327 of file shader.cc.

◆ set_uniform() [7/9]

void eu::render::ShaderProgram::set_uniform ( const ShaderUniform attribute,
const vec4f val 
)

Definition at line 340 of file shader.cc.

◆ set_uniform() [8/9]

void eu::render::ShaderProgram::set_uniform ( const ShaderUniform attribute,
float  val 
)

Definition at line 283 of file shader.cc.

◆ set_uniform() [9/9]

void eu::render::ShaderProgram::set_uniform ( const ShaderUniform attribute,
gl::Int  val 
)

Definition at line 292 of file shader.cc.


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