cgv
Loading...
Searching...
No Matches
cgv::render::shader_compile_options Struct Reference

holds options applied before and during shader compilation, such as preprocessor defines and code snippets. More...

#include <shader_code.h>

Public Member Functions

 shader_compile_options (const shader_define_map &defines)
 
 shader_compile_options (const std::vector< shader_code_snippet > &snippets)
 
 shader_compile_options (const shader_define_map &defines, const std::vector< shader_code_snippet > &snippets)
 

Public Attributes

shader_define_map defines
 map of pre-processor define names to values
 
std::vector< shader_code_snippetsnippets
 shader code snippets
 

Detailed Description

holds options applied before and during shader compilation, such as preprocessor defines and code snippets.

Pre-processor defines will be handled as follows:

  • Existing macros in the source file that are stated in defines will have their values replaced
  • Existing macros in the source file that are not stated in defines will be left untouched
  • Macros not present in the source file but stated in defines will be added to the source before compilation

Snippets are handled as follows (also see shader_code_snippets):

  • If at least one snippet is given, the additional define <CGV_USE_SNIPPETS> is set internally before compilation.

Definition at line 87 of file shader_code.h.

Constructor & Destructor Documentation

◆ shader_compile_options() [1/4]

cgv::render::shader_compile_options::shader_compile_options ( )
inline

Definition at line 94 of file shader_code.h.

◆ shader_compile_options() [2/4]

cgv::render::shader_compile_options::shader_compile_options ( const shader_define_map defines)
inline

Definition at line 95 of file shader_code.h.

◆ shader_compile_options() [3/4]

cgv::render::shader_compile_options::shader_compile_options ( const std::vector< shader_code_snippet > &  snippets)
inline

Definition at line 96 of file shader_code.h.

◆ shader_compile_options() [4/4]

cgv::render::shader_compile_options::shader_compile_options ( const shader_define_map defines,
const std::vector< shader_code_snippet > &  snippets 
)
inline

Definition at line 97 of file shader_code.h.

Member Data Documentation

◆ defines

shader_define_map cgv::render::shader_compile_options::defines

◆ snippets

std::vector<shader_code_snippet> cgv::render::shader_compile_options::snippets

shader code snippets

Definition at line 91 of file shader_code.h.


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