Tatooine
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Attributes | Static Private Attributes | List of all members
tatooine::gl::shaderstage Class Reference

#include <shaderstage.h>

Inheritance diagram for tatooine::gl::shaderstage:
[legend]
Collaboration diagram for tatooine::gl::shaderstage:
[legend]

Public Member Functions

DLL_API shaderstage (GLenum shader_type, shadersource const &shaderfilepath)
 
DLL_API shaderstage (GLenum shader_type, std::filesystem::path const &shaderfilepath)
 
DLL_API shaderstage (shaderstage &&other)
 
DLL_API ~shaderstage ()
 
DLL_API auto compile (bool use_ansi_color=true) -> void
 
DLL_API auto delete_stage () -> void
 
auto glsl_vars () const -> auto const &
 
auto stage_name () const
 
auto stage_type () const
 
auto is_created () const
 
- Public Member Functions inherited from tatooine::gl::id_holder< GLuint >
 id_holder ()
 
 id_holder (GLuint _id)
 
 id_holder (id_holder const &other)=delete
 
 id_holder (id_holder &&other) noexcept
 
auto operator= (id_holder const &other) -> id_holder &=delete
 
auto operator= (id_holder &&other) noexcept -> id_holder &
 
 ~id_holder ()=default
 
auto id () const
 
void swap (id_holder &other)
 

Static Public Member Functions

static DLL_API auto type_to_string (GLenum shader_type) -> std::string_view
 

Protected Member Functions

DLL_API auto info_log (bool use_ansi_color=true) -> void
 
DLL_API auto parse_compile_error (std::smatch &match, std::ostream &os, bool use_ansi_color=true) -> void
 
DLL_API auto print_line (std::filesystem::path const &filename, size_t line_number, std::ostream &os) -> void
 
- Protected Member Functions inherited from tatooine::gl::id_holder< GLuint >
void set_id (GLuint id)
 
auto id_ptr ()
 
auto id_ref () -> auto &
 

Private Types

using path = std::filesystem::path
 

Private Attributes

bool m_delete = true
 
GLenum m_shader_type
 
std::variant< shadersource, std::filesystem::path > m_source
 
std::vector< GLSLVarm_glsl_vars
 
include_tree m_include_tree
 

Static Private Attributes

static std::regex const regex_nvidia_compiler_error
 
static std::regex const regex_mesa_compiler_error
 

Additional Inherited Members

- Static Public Attributes inherited from tatooine::gl::id_holder< GLuint >
static constexpr auto default_val
 

Member Typedef Documentation

◆ path

using tatooine::gl::shaderstage::path = std::filesystem::path
private

Constructor & Destructor Documentation

◆ shaderstage() [1/3]

DLL_API tatooine::gl::shaderstage::shaderstage ( GLenum  shader_type,
shadersource const &  shaderfilepath 
)

◆ shaderstage() [2/3]

DLL_API tatooine::gl::shaderstage::shaderstage ( GLenum  shader_type,
std::filesystem::path const &  shaderfilepath 
)

◆ shaderstage() [3/3]

◆ ~shaderstage()

DLL_API tatooine::gl::shaderstage::~shaderstage ( )

Member Function Documentation

◆ compile()

DLL_API auto tatooine::gl::shaderstage::compile ( bool  use_ansi_color = true) -> void

◆ delete_stage()

DLL_API auto tatooine::gl::shaderstage::delete_stage ( ) -> void

◆ glsl_vars()

auto tatooine::gl::shaderstage::glsl_vars ( ) const -> auto const&
inline

◆ info_log()

DLL_API auto tatooine::gl::shaderstage::info_log ( bool  use_ansi_color = true) -> void
protected

◆ is_created()

auto tatooine::gl::shaderstage::is_created ( ) const
inline

◆ parse_compile_error()

DLL_API auto tatooine::gl::shaderstage::parse_compile_error ( std::smatch &  match,
std::ostream &  os,
bool  use_ansi_color = true 
) -> void
protected

◆ print_line()

DLL_API auto tatooine::gl::shaderstage::print_line ( std::filesystem::path const &  filename,
size_t  line_number,
std::ostream &  os 
) -> void
protected

◆ stage_name()

auto tatooine::gl::shaderstage::stage_name ( ) const
inline

◆ stage_type()

auto tatooine::gl::shaderstage::stage_type ( ) const
inline

◆ type_to_string()

static DLL_API auto tatooine::gl::shaderstage::type_to_string ( GLenum  shader_type) -> std::string_view
static

Member Data Documentation

◆ m_delete

bool tatooine::gl::shaderstage::m_delete = true
private

◆ m_glsl_vars

std::vector<GLSLVar> tatooine::gl::shaderstage::m_glsl_vars
private

◆ m_include_tree

include_tree tatooine::gl::shaderstage::m_include_tree
private

◆ m_shader_type

GLenum tatooine::gl::shaderstage::m_shader_type
private

◆ m_source

std::variant<shadersource, std::filesystem::path> tatooine::gl::shaderstage::m_source
private

◆ regex_mesa_compiler_error

std::regex const tatooine::gl::shaderstage::regex_mesa_compiler_error
staticprivate

◆ regex_nvidia_compiler_error

std::regex const tatooine::gl::shaderstage::regex_nvidia_compiler_error
staticprivate

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