* Shader type (generic) */
| 13 | * Shader type (generic) |
| 14 | */ |
| 15 | class Shader : public ShaderUnmanaged { |
| 16 | public: |
| 17 | using ShaderUnmanaged::ShaderUnmanaged; |
| 18 | |
| 19 | Shader(const Shader&) = delete; |
| 20 | |
| 21 | Shader(Shader&& other) noexcept { |
| 22 | set(other); |
| 23 | |
| 24 | other.id = 0; |
| 25 | other.locs = nullptr; |
| 26 | } |
| 27 | |
| 28 | Shader& operator=(const Shader&) = delete; |
| 29 | |
| 30 | Shader& operator=(Shader&& other) noexcept { |
| 31 | if (this == &other) { |
| 32 | return *this; |
| 33 | } |
| 34 | |
| 35 | Unload(); |
| 36 | set(other); |
| 37 | |
| 38 | other.id = 0; |
| 39 | other.locs = nullptr; |
| 40 | |
| 41 | return *this; |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * Unload shader from GPU memory (VRAM) |
| 46 | */ |
| 47 | ~Shader() { Unload(); } |
| 48 | }; |
| 49 | } // namespace raylib |
| 50 | |
| 51 | using RShader = raylib::Shader; |
nothing calls this directly
no outgoing calls
no test coverage detected