3#ifndef GDK_GFX_MATERIAL_H
4#define GDK_GFX_MATERIAL_H
6#include <gdk/graphics_types.h>
46 virtual void set_float(
const std::string_view aName,
float aValue) = 0;
49 virtual void set_vector2(
const std::string_view aName, graphics_vector2_type aValue) = 0;
52 virtual void set_vector3(
const std::string_view aName, graphics_vector3_type aValue) = 0;
55 virtual void set_vector4(
const std::string_view aName, graphics_vector4_type aValue) = 0;
58 virtual void set_integer(
const std::string_view aName,
int aValue) = 0;
61 virtual void set_integer2(
const std::string_view aName,
int aValue1,
int aValue2) = 0;
64 virtual void set_integer3(
const std::string_view aName,
int aValue1,
int aValue2,
int aValue3) = 0;
67 virtual void set_integer4(
const std::string_view aName,
int aValue1,
int aValue2,
int aValue3,
int aValue4) = 0;
70 virtual void set_int_vector2_array(
const std::string_view aName,
const std::vector<graphics_intvector2_type> &aValue) = 0;
decides how models using the material should be drawn.
Definition material.h:22
virtual void set_vector2(const std::string_view aName, graphics_vector2_type aValue)=0
assigns a 2 component vector
virtual void set_integer2(const std::string_view aName, int aValue1, int aValue2)=0
assigns a 2 integer array to the material.
virtual void set_integer(const std::string_view aName, int aValue)=0
assigns an integer to the material.
std::shared_ptr< gdk::texture > texture_ptr_type
textures can be shared among many webgl1es2_materials.
Definition material.h:39
virtual void set_texture(const std::string_view aName, texture_ptr_type aTexturePointer)=0
assigns a texture to the material.
virtual void set_integer4(const std::string_view aName, int aValue1, int aValue2, int aValue3, int aValue4)=0
assigns a 4 integer array to the material.
virtual void set_integer3(const std::string_view aName, int aValue1, int aValue2, int aValue3)=0
assigns a 3 integer array to the material.
face_culling_mode
specify whether front- or back-facing polygons can be culled
Definition material.h:25
@ none
do not cull any polygons
Definition material.h:29
@ back
cull back facing polygons
Definition material.h:27
@ front_and_back
cull front and back facing polygons
Definition material.h:28
@ front
cull front facing polygons
Definition material.h:26
virtual void set_float(const std::string_view aName, float aValue)=0
assigns a float to the material.
virtual void set_int_vector2_array(const std::string_view aName, const std::vector< graphics_intvector2_type > &aValue)=0
assigns an array of integer vector2s to the material
virtual void set_vector4(const std::string_view aName, graphics_vector4_type aValue)=0
assigns a 4 component vector
virtual void set_vector3(const std::string_view aName, graphics_vector3_type aValue)=0
assigns a 3 component vector
render_mode
render mode decides transparency etc
Definition material.h:33
@ transparent
transparency
Definition material.h:35
@ opaque
no transparency
Definition material.h:34
uniform color data, usually used to color the surface of a 3d model, but also used for height maps,...
Definition texture.h:17