#pragma once #include "raylib.h" #include #include struct ShaderSource { std::string vsPath; std::string fsPath; }; class ShaderManager { public: ShaderManager(); ~ShaderManager(); // Load a shader from vertex and fragment shader files // Returns a unique ID for the shader, or 0 on failure unsigned int Load(const std::string& vsPath, const std::string& fsPath); // Unload a shader by ID void Unload(unsigned int id); // Get a shader by ID (returns nullptr if not found) Shader* Get(unsigned int id); // Get source metadata for a shader if available const ShaderSource* GetSource(unsigned int id) const; // Unload all shaders void UnloadAll(); private: std::unordered_map shaders; std::unordered_map shaderSources; unsigned int nextId; bool unloaded; };