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
inline
void
set
(::
Material
material) {
30
shader = material.shader;
31
maps = material.maps;
32
params = material.params;
33
}
34
35
GETTERSETTER(::
Shader
,
Shader
,shader)
36
37
Material
& operator=(const ::
Material
& material) {
38
set
(material);
39
return
*
this
;
40
}
41
42
Material
&
operator=
(
const
Material
& material) {
43
set
(material);
44
return
*
this
;
45
}
46
47
inline
void
Unload
() {
48
::UnloadMaterial(*
this
);
49
}
50
51
inline
Material
&
SetTexture
(
int
mapType, ::
Texture2D
texture) {
52
::SetMaterialTexture(
this
, mapType, texture);
53
return
*
this
;
54
}
55
56
};
57
}
58
59
#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:51
raylib::Material::operator=
Material & operator=(const Material &material)
Definition:
Material.hpp:42
raylib::Material::Material
Material(::Material material)
Definition:
Material.hpp:17
raylib::Material::Material
Material()
Definition:
Material.hpp:21
raylib::Shader
Definition:
Shader.hpp:15
raylib::Material::Unload
void Unload()
Definition:
Material.hpp:47
raylib::Material::set
void set(::Material material)
Definition:
Material.hpp:29
raylib::Material
Definition:
Material.hpp:15
raylib::Texture2D
Definition:
Texture2D.hpp:19
Generated on Wed Aug 19 2020 10:26:59 for raylib-cpp by
1.8.17