cgv
Loading...
Searching...
No Matches
cgv::render::shader_library Class Reference

provides a shader library that handles shader loading and stores shaders More...

#include <shader_library.h>

Public Member Functions

void clear (context &ctx)
 
bool add (const std::string &name, const std::string &file, const shader_compile_options &options={})
 
bool contains (const std::string &name) const
 
shader_programget (const std::string &name)
 
shader_define_mapget_defines (const std::string &name)
 
shader_compile_optionsget_compile_options (const std::string &name)
 
shader_lib_map::iterator begin ()
 
shader_lib_map::iterator end ()
 
bool load_all (context &ctx, const std::string &where="")
 
bool reload (context &ctx, const std::string &name, const shader_compile_options &defines={}, const std::string &where="")
 

Static Public Member Functions

static bool load (context &ctx, shader_program &prog, const std::string &name, const shader_compile_options &options, const std::string &where="")
 
static bool load (context &ctx, shader_program &prog, const std::string &name, const std::string &where="")
 

Detailed Description

provides a shader library that handles shader loading and stores shaders

Definition at line 12 of file shader_library.h.

Member Function Documentation

◆ add()

bool cgv::render::shader_library::add ( const std::string &  name,
const std::string &  file,
const shader_compile_options options = {} 
)

Definition at line 13 of file shader_library.cxx.

◆ begin()

shader_lib_map::iterator cgv::render::shader_library::begin ( )
inline

Definition at line 34 of file shader_library.h.

◆ clear()

void cgv::render::shader_library::clear ( context ctx)

Definition at line 6 of file shader_library.cxx.

◆ contains()

bool cgv::render::shader_library::contains ( const std::string &  name) const

Definition at line 24 of file shader_library.cxx.

◆ end()

shader_lib_map::iterator cgv::render::shader_library::end ( )
inline

Definition at line 35 of file shader_library.h.

◆ get()

shader_program & cgv::render::shader_library::get ( const std::string &  name)

Definition at line 28 of file shader_library.cxx.

◆ get_compile_options()

shader_compile_options & cgv::render::shader_library::get_compile_options ( const std::string &  name)

Definition at line 36 of file shader_library.cxx.

◆ get_defines()

shader_define_map & cgv::render::shader_library::get_defines ( const std::string &  name)

Definition at line 32 of file shader_library.cxx.

◆ load() [1/2]

bool cgv::render::shader_library::load ( context ctx,
shader_program prog,
const std::string &  name,
const shader_compile_options options,
const std::string &  where = "" 
)
static

Definition at line 40 of file shader_library.cxx.

◆ load() [2/2]

bool cgv::render::shader_library::load ( context ctx,
shader_program prog,
const std::string &  name,
const std::string &  where = "" 
)
static

Definition at line 64 of file shader_library.cxx.

◆ load_all()

bool cgv::render::shader_library::load_all ( context ctx,
const std::string &  where = "" 
)

Definition at line 68 of file shader_library.cxx.

◆ reload()

bool cgv::render::shader_library::reload ( context ctx,
const std::string &  name,
const shader_compile_options defines = {},
const std::string &  where = "" 
)

Definition at line 77 of file shader_library.cxx.


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