3#ifndef GDK_GRAPHICS_MATERIAL_H
4#define GDK_GRAPHICS_MATERIAL_H
6#include <gdk/graphics/types.h>
13namespace gdk::graphics {
45 virtual void set_float(
const std::string_view aName,
float aValue) = 0;
48 virtual void set_vector2(
const std::string_view aName, vector2_type aValue) = 0;
51 virtual void set_vector3(
const std::string_view aName, vector3_type aValue) = 0;
54 virtual void set_vector4(
const std::string_view aName, vector4_type aValue) = 0;
60 virtual void set_integer(
const std::string_view aName,
int aValue) = 0;
63 virtual void set_integer2(
const std::string_view aName,
int aValue1,
int aValue2) = 0;
66 virtual void set_integer3(
const std::string_view aName,
int aValue1,
int aValue2,
int aValue3) = 0;
69 virtual void set_integer4(
const std::string_view aName,
int aValue1,
int aValue2,
int aValue3,
int aValue4) = 0;
72 virtual void set_int_vector2_array(
const std::string_view aName,
const std::vector<intvector2_type> &aValue) = 0;
decides how models using the material should be drawn.
Definition material.h:21
virtual void set_vector4(const std::string_view aName, vector4_type aValue)=0
assigns a 4 component vector
virtual void set_vector3(const std::string_view aName, vector3_type aValue)=0
assigns a 3 component vector
std::shared_ptr< gdk::graphics::texture > texture_ptr_type
textures can be shared among many materials.
Definition material.h:39
virtual void set_integer(const std::string_view aName, int aValue)=0
assigns an integer to the material.
virtual void set_vector2(const std::string_view aName, vector2_type aValue)=0
assigns a 2 component vector
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.
render_mode
render mode decides transparency etc
Definition material.h:32
@ additive
added to what is behind it, scaled by its alpha: light, a glow, a beam
Definition material.h:35
@ transparent
transparency
Definition material.h:34
@ opaque
no transparency
Definition material.h:33
virtual void set_integer3(const std::string_view aName, int aValue1, int aValue2, int aValue3)=0
assigns a 3 integer array to the material.
virtual void set_int_vector2_array(const std::string_view aName, const std::vector< intvector2_type > &aValue)=0
assigns an array of integer vector2s to the material
face_culling_mode
specify whether front- or back-facing polygons can be culled
Definition material.h:24
@ none
do not cull any polygons
Definition material.h:28
@ back
cull back facing polygons
Definition material.h:26
@ front_and_back
cull front and back facing polygons
Definition material.h:27
@ front
cull front facing polygons
Definition material.h:25
virtual void set_float(const std::string_view aName, float aValue)=0
assigns a float to the 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
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_vector4(const std::string_view aName, const color &aValue)=0
assign an RGBA colour to a vec4 uniform
uniform color data, usually used to color the surface of a 3d model, but also used for height maps,...
Definition texture.h:14
Represents a 4 channel color: {Red, Green, Blue, Alpha}.
Definition color.h:10