init commit

This commit is contained in:
Alex Lardner
2026-07-04 19:08:19 -07:00
parent 40dc51d21a
commit d7890c9808
106 changed files with 13653 additions and 0 deletions
+53
View File
@@ -0,0 +1,53 @@
#ifndef RAYLIB_CPP_INCLUDE_SHADER_HPP_
#define RAYLIB_CPP_INCLUDE_SHADER_HPP_
#include <string>
#include "ShaderUnmanaged.hpp"
#include "Texture.hpp"
#include "./raylib-cpp-utils.hpp"
#include "./raylib.hpp"
namespace raylib {
/**
* Shader type (generic)
*/
class Shader : public ShaderUnmanaged {
public:
using ShaderUnmanaged::ShaderUnmanaged;
Shader(const Shader&) = delete;
Shader(Shader&& other) noexcept {
set(other);
other.id = 0;
other.locs = nullptr;
}
Shader& operator=(const Shader&) = delete;
Shader& operator=(Shader&& other) noexcept {
if (this == &other) {
return *this;
}
Unload();
set(other);
other.id = 0;
other.locs = nullptr;
return *this;
}
/**
* Unload shader from GPU memory (VRAM)
*/
~Shader() { Unload(); }
};
} // namespace raylib
using RShader = raylib::Shader;
#endif // RAYLIB_CPP_INCLUDE_SHADER_HPP_