gdk-graphics 0a0aef92e917cfbac53dffbc32c295e4de914093
Loading...
Searching...
No Matches
gdk::graphics::null_material Class Referencefinal
Inheritance diagram for gdk::graphics::null_material:
Collaboration diagram for gdk::graphics::null_material:

Public Member Functions

 null_material (const_shader_ptr_type pShader=nullptr, const render_mode aRenderMode=render_mode::opaque, const face_culling_mode aFaceCullingMode=face_culling_mode::none)
virtual void set_texture (const std::string_view aName, texture_ptr_type aValue) override
virtual void set_float (const std::string_view aName, float aValue) override
 assigns a float to the material.
virtual void set_vector2 (const std::string_view aName, vector2_type aValue) override
 assigns a 2 component vector
virtual void set_vector3 (const std::string_view aName, vector3_type aValue) override
 assigns a 3 component vector
virtual void set_vector4 (const std::string_view aName, vector4_type aValue) override
 assigns a 4 component vector
virtual void set_vector4 (const std::string_view aName, const color &aValue) override
 assign an RGBA colour to a vec4 uniform
virtual void set_integer (const std::string_view aName, int aValue) override
 assigns an integer to the material.
virtual void set_integer2 (const std::string_view aName, int a1, int a2) override
 assigns a 2 integer array to the material.
virtual void set_integer3 (const std::string_view aName, int a1, int a2, int a3) override
 assigns a 3 integer array to the material.
virtual void set_integer4 (const std::string_view aName, int a1, int a2, int a3, int a4) override
 assigns a 4 integer array to the material.
virtual void set_int_vector2_array (const std::string_view aName, const std::vector< intvector2_type > &aValue) override
 assigns an array of integer vector2s to the material
std::optional< float > float_at (std::string_view aName) const
std::optional< vector4_type > vector4_at (std::string_view aName) const
texture_ptr_type texture_at (std::string_view aName) const
std::vector< std::string > uniforms () const
render_mode mode () const
Public Member Functions inherited from gdk::graphics::material
virtual void set_texture (const std::string_view aName, texture_ptr_type aTexturePointer)=0
 assigns a texture to the material, which shares it; a null texture unsets the name

Additional Inherited Members

Public Types inherited from gdk::graphics::material
enum class  face_culling_mode { front , back , front_and_back , none }
 specify whether front- or back-facing polygons can be culled More...
enum class  render_mode { opaque , transparent , additive }
 render mode decides transparency etc More...
using texture_ptr_type = std::shared_ptr<gdk::graphics::texture>
 textures can be shared among many materials.

Member Function Documentation

◆ set_float()

virtual void gdk::graphics::null_material::set_float ( const std::string_view aName,
float aValue )
overridevirtual

assigns a float to the material.

Implements gdk::graphics::material.

◆ set_int_vector2_array()

virtual void gdk::graphics::null_material::set_int_vector2_array ( const std::string_view aName,
const std::vector< intvector2_type > & aValue )
overridevirtual

assigns an array of integer vector2s to the material

Implements gdk::graphics::material.

◆ set_integer()

virtual void gdk::graphics::null_material::set_integer ( const std::string_view aName,
int aValue )
overridevirtual

assigns an integer to the material.

Implements gdk::graphics::material.

◆ set_integer2()

virtual void gdk::graphics::null_material::set_integer2 ( const std::string_view aName,
int aValue1,
int aValue2 )
overridevirtual

assigns a 2 integer array to the material.

Implements gdk::graphics::material.

◆ set_integer3()

virtual void gdk::graphics::null_material::set_integer3 ( const std::string_view aName,
int aValue1,
int aValue2,
int aValue3 )
overridevirtual

assigns a 3 integer array to the material.

Implements gdk::graphics::material.

◆ set_integer4()

virtual void gdk::graphics::null_material::set_integer4 ( const std::string_view aName,
int aValue1,
int aValue2,
int aValue3,
int aValue4 )
overridevirtual

assigns a 4 integer array to the material.

Implements gdk::graphics::material.

◆ set_vector2()

virtual void gdk::graphics::null_material::set_vector2 ( const std::string_view aName,
vector2_type aValue )
overridevirtual

assigns a 2 component vector

Implements gdk::graphics::material.

◆ set_vector3()

virtual void gdk::graphics::null_material::set_vector3 ( const std::string_view aName,
vector3_type aValue )
overridevirtual

assigns a 3 component vector

Implements gdk::graphics::material.

◆ set_vector4() [1/2]

virtual void gdk::graphics::null_material::set_vector4 ( const std::string_view aName,
const color & aValue )
overridevirtual

assign an RGBA colour to a vec4 uniform

Implements gdk::graphics::material.

◆ set_vector4() [2/2]

virtual void gdk::graphics::null_material::set_vector4 ( const std::string_view aName,
vector4_type aValue )
overridevirtual

assigns a 4 component vector

Implements gdk::graphics::material.


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