opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
osc::Material Class Reference

#include <material.h>

Inheritance diagram for osc::Material:
[legend]

Public Member Functions

 Material (Shader)
 
const Shadershader () const
 
void clear ()
 
bool empty () const
 
template<MaterialPropertyValue T>
std::optional< Tget (std::string_view property_name) const
 
template<MaterialPropertyValue T>
std::optional< Tget (const StringName &property_name) const
 
template<MaterialPropertyValue T>
void set (std::string_view property_name, const T &value)
 
template<MaterialPropertyValue T>
void set (const StringName &property_name, const T &value)
 
template<MaterialPropertyValue T>
std::optional< std::span< const T > > get_array (std::string_view property_name) const
 
template<MaterialPropertyValue T>
std::optional< std::span< const T > > get_array (const StringName &property_name) const
 
template<MaterialPropertyValue T>
void set_array (std::string_view property_name, std::span< const T > values)
 
template<MaterialPropertyValue T>
void set_array (const StringName &property_name, std::span< const T > values)
 
template<std::convertible_to< std::string_view > StringLike, std::ranges::contiguous_range Range>
void set_array (StringLike &&property_name, Range &&values)
 
void unset (std::string_view property_name)
 
void unset (const StringName &property_name)
 
bool is_transparent () const
 
void set_transparent (bool)
 
SourceBlendingFactor source_blending_factor () const
 
void set_source_blending_factor (SourceBlendingFactor)
 
DestinationBlendingFactor destination_blending_factor () const
 
void set_destination_blending_factor (DestinationBlendingFactor)
 
BlendingEquation blending_equation () const
 
void set_blending_equation (BlendingEquation)
 
bool is_depth_tested () const
 
void set_depth_tested (bool)
 
DepthFunction depth_function () const
 
void set_depth_function (DepthFunction)
 
bool writes_to_depth_buffer () const
 
void set_writes_to_depth_buffer (bool)
 
bool is_wireframe () const
 
void set_wireframe (bool)
 
CullMode cull_mode () const
 
void set_cull_mode (CullMode)
 

Friends

class GraphicsBackend
 
bool operator== (const Material &, const Material &)=default
 
std::ostream & operator<< (std::ostream &, const Material &)
 

Constructor & Destructor Documentation

◆ Material()

osc::Material::Material ( Shader  )
explicit

Member Function Documentation

◆ blending_equation()

BlendingEquation osc::Material::blending_equation ( ) const

◆ clear()

void osc::Material::clear ( )

◆ cull_mode()

CullMode osc::Material::cull_mode ( ) const

◆ depth_function()

DepthFunction osc::Material::depth_function ( ) const

◆ destination_blending_factor()

DestinationBlendingFactor osc::Material::destination_blending_factor ( ) const

◆ empty()

bool osc::Material::empty ( ) const

◆ get() [1/2]

template<MaterialPropertyValue T>
std::optional< T > osc::Material::get ( const StringName property_name) const

◆ get() [2/2]

template<MaterialPropertyValue T>
std::optional< T > osc::Material::get ( std::string_view  property_name) const

◆ get_array() [1/2]

template<MaterialPropertyValue T>
std::optional< std::span< const T > > osc::Material::get_array ( const StringName property_name) const

◆ get_array() [2/2]

template<MaterialPropertyValue T>
std::optional< std::span< const T > > osc::Material::get_array ( std::string_view  property_name) const

◆ is_depth_tested()

bool osc::Material::is_depth_tested ( ) const

◆ is_transparent()

bool osc::Material::is_transparent ( ) const

◆ is_wireframe()

bool osc::Material::is_wireframe ( ) const

◆ set() [1/2]

template<MaterialPropertyValue T>
void osc::Material::set ( const StringName property_name,
const T value 
)

◆ set() [2/2]

template<MaterialPropertyValue T>
void osc::Material::set ( std::string_view  property_name,
const T value 
)

◆ set_array() [1/3]

template<MaterialPropertyValue T>
void osc::Material::set_array ( const StringName property_name,
std::span< const T values 
)

◆ set_array() [2/3]

template<MaterialPropertyValue T>
void osc::Material::set_array ( std::string_view  property_name,
std::span< const T values 
)

◆ set_array() [3/3]

template<std::convertible_to< std::string_view > StringLike, std::ranges::contiguous_range Range>
void osc::Material::set_array ( StringLike &&  property_name,
Range &&  values 
)
inline

◆ set_blending_equation()

void osc::Material::set_blending_equation ( BlendingEquation  )

◆ set_cull_mode()

void osc::Material::set_cull_mode ( CullMode  )

◆ set_depth_function()

void osc::Material::set_depth_function ( DepthFunction  )

◆ set_depth_tested()

void osc::Material::set_depth_tested ( bool  )

◆ set_destination_blending_factor()

void osc::Material::set_destination_blending_factor ( DestinationBlendingFactor  )

◆ set_source_blending_factor()

void osc::Material::set_source_blending_factor ( SourceBlendingFactor  )

◆ set_transparent()

void osc::Material::set_transparent ( bool  )

◆ set_wireframe()

void osc::Material::set_wireframe ( bool  )

◆ set_writes_to_depth_buffer()

void osc::Material::set_writes_to_depth_buffer ( bool  )

◆ shader()

const Shader & osc::Material::shader ( ) const

◆ source_blending_factor()

SourceBlendingFactor osc::Material::source_blending_factor ( ) const

◆ unset() [1/2]

void osc::Material::unset ( const StringName property_name)

◆ unset() [2/2]

void osc::Material::unset ( std::string_view  property_name)

◆ writes_to_depth_buffer()

bool osc::Material::writes_to_depth_buffer ( ) const

Friends And Related Symbol Documentation

◆ GraphicsBackend

friend class GraphicsBackend
friend

◆ operator<<

std::ostream & operator<< ( std::ostream &  ,
const Material  
)
friend

◆ operator==

bool operator== ( const Material ,
const Material  
)
friend

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