raylib-cpp
C++ object-oriented wrapper library for raylib.
include
Material.hpp
1
#ifndef RAYLIB_CPP_MATERIAL_HPP_
2
#define RAYLIB_CPP_MATERIAL_HPP_
3
4
#ifdef __cplusplus
5
extern
"C"
{
6
#endif
7
#include "raylib.h"
8
#ifdef __cplusplus
9
}
10
#endif
11
12
#include "./raylib-cpp-utils.hpp"
13
14
namespace
raylib
{
15
class
Material
:
public
::Material
{
16
public
:
17
Material
(::
Material
material) {
18
set
(material);
19
};
20
21
Material
() {
22
set
(LoadMaterialDefault());
23
};
24
25
~Material
() {
26
Unload
();
27
}
28
29
GETTERSETTER(::
Shader
,
Shader
,shader)
30
31
Material
& operator=(const ::
Material
& material) {
32
set
(material);
33
return
*
this
;
34
}
35
36
Material
&
operator=
(
const
Material
& material) {
37
set
(material);
38
return
*
this
;
39
}
40
41
inline
void
Unload
() {
42
::UnloadMaterial(*
this
);
43
}
44
45
inline
Material
&
SetTexture
(
int
mapType, ::
Texture2D
texture) {
46
::SetMaterialTexture(
this
, mapType, texture);
47
return
*
this
;
48
}
49
50
protected
:
51
inline
void
set
(::
Material
material) {
52
shader = material.shader;
53
maps = material.maps;
54
params = material.params;
55
}
56
57
};
58
}
59
60
#endif
raylib
Provides all the classes associated with raylib-cpp.
Definition:
AudioDevice.hpp:14
raylib::Material::~Material
~Material()
Definition:
Material.hpp:25
raylib::Material::SetTexture
Material & SetTexture(int mapType, ::Texture2D texture)
Definition:
Material.hpp:45
raylib::Material::operator=
Material & operator=(const Material &material)
Definition:
Material.hpp:36
raylib::Material::Material
Material(::Material material)
Definition:
Material.hpp:17
raylib::Material::Material
Material()
Definition:
Material.hpp:21
raylib::Shader
Definition:
Shader.hpp:16
raylib::Material::Unload
void Unload()
Definition:
Material.hpp:41
raylib::Texture
Definition:
Texture.hpp:19
raylib::Material::set
void set(::Material material)
Definition:
Material.hpp:51
raylib::Material
Definition:
Material.hpp:15
Generated on Sun Oct 25 2020 14:07:42 for raylib-cpp by
1.8.17