MCPcopy Create free account
hub / github.com/RobLoach/raylib-cpp / Material

Class Material

include/Material.hpp:14–49  ·  view source on GitHub ↗

* Material type (generic). * * The material will be unloaded on object destruction. Use raylib::MaterialUnmanaged if you're looking to not unload. * * @see raylib::MaterialUnmanaged */

Source from the content-addressed store, hash-verified

12 * @see raylib::MaterialUnmanaged
13 */
14class Material : public MaterialUnmanaged {
15public:
16 using MaterialUnmanaged::MaterialUnmanaged;
17
18 Material(const Material&) = delete;
19 Material& operator=(const Material&) = delete;
20
21 Material(Material&& other) noexcept {
22 set(other);
23 other.maps = nullptr;
24 other.shader = {};
25 other.params[0] = 0.0f;
26 other.params[1] = 0.0f;
27 other.params[2] = 0.0f;
28 other.params[3] = 0.0f;
29 }
30
31 Material& operator=(Material&& other) noexcept {
32 if (this == &other) {
33 return *this;
34 }
35 Unload();
36 set(other);
37 other.maps = nullptr;
38 other.shader = {};
39 return *this;
40 }
41
42 Material& operator=(const ::Material& material) {
43 Unload();
44 set(material);
45 return *this;
46 }
47
48 ~Material() { Unload(); }
49};
50} // namespace raylib
51
52using RMaterial = raylib::Material;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected