Aether3D
Game Engine
Include
Material.hpp
1
#ifndef MATERIAL_H
2
#define MATERIAL_H
3
4
#ifndef ERRORS_H
5
# include "Errors.hpp"
6
#endif
7
8
#ifndef INCLUDE_STRING_H
9
# include <string>
10
# define INCLUDE_STRING_H
11
#endif
12
13
struct
Matrix44
;
14
class
Texture
;
15
struct
Vec3
;
16
struct
Vec4
;
17
19
class
Material
20
{
21
public
:
22
virtual
~
Material
() {}
23
41
virtual
void
LoadFromFile
(
const
char
* path ) = 0;
42
44
virtual
const
char
*
Name
()
const
= 0;
45
47
virtual
bool
Opaque
()
const
= 0;
48
56
virtual
void
SetOpaque
(
bool
opaque ) = 0;
57
70
virtual
Error::Enum
SetShaders
(
const
std::string& vertexShaderPath,
71
const
std::string& fragmentShaderPath,
72
const
std::string& geometryShaderPath,
73
const
std::string& defines ) = 0;
80
virtual
void
SetFloat
(
const
std::string& name,
float
value ) = 0;
81
88
virtual
void
SetMatrix
(
const
std::string& name,
const
Matrix44
& matrix ) = 0;
89
91
virtual
void
SetName
(
const
char
* name ) = 0;
92
100
virtual
void
SetTexture
(
const
std::string& name,
const
Texture
* texture ) = 0;
101
108
virtual
void
SetVector
(
const
std::string& name,
const
Vec3
& value ) = 0;
109
116
virtual
void
SetVector
(
const
std::string& name,
const
Vec4
& value ) = 0;
117
};
118
#endif
Material::Opaque
virtual bool Opaque() const =0
Material::SetVector
virtual void SetVector(const std::string &name, const Vec3 &value)=0
Material
Stores material properties for Mesh. Their names/values are directly mapped into shader uniforms.
Definition:
Material.hpp:19
Texture
2D or Cube Map texture.
Definition:
Texture.hpp:7
Material::SetName
virtual void SetName(const char *name)=0
Material::SetOpaque
virtual void SetOpaque(bool opaque)=0
Vec3
3-component vector.
Definition:
Vec3.hpp:22
Material::SetShaders
virtual Error::Enum SetShaders(const std::string &vertexShaderPath, const std::string &fragmentShaderPath, const std::string &geometryShaderPath, const std::string &defines)=0
Material::LoadFromFile
virtual void LoadFromFile(const char *path)=0
Material::SetTexture
virtual void SetTexture(const std::string &name, const Texture *texture)=0
Vec4
4-component vector.
Definition:
Vec3.hpp:380
Material::SetFloat
virtual void SetFloat(const std::string &name, float value)=0
Matrix44
Row-major 4x4 Matrix.
Definition:
Matrix.hpp:20
Material::Name
virtual const char * Name() const =0
Material::SetMatrix
virtual void SetMatrix(const std::string &name, const Matrix44 &matrix)=0
Generated on Sun Dec 13 2020 10:31:15 for Aether3D by
1.8.17