Further shader compilation development.

This commit is contained in:
zy4n
2025-03-22 17:40:08 +01:00
parent e01b8c2e09
commit 510398423a
45 changed files with 1567 additions and 1097 deletions

View File

@@ -7,34 +7,21 @@
namespace zgl
{
class shader_data
struct shader_data
{
private:
explicit shader_data(GLuint shader_id, GLenum type);
public:
shader_data() = default;
[[nodiscard]] static std::error_code build_from(
GLenum type,
const std::string& source,
shader_data& data
);
inline shader_data(GLuint id);
shader_data(const shader_data& other) = delete;
shader_data& operator=(const shader_data& other) = delete;
shader_data(shader_data&& other) noexcept;
shader_data& operator=(shader_data&& other) noexcept;
inline shader_data(shader_data&& other) noexcept;
inline shader_data& operator=(shader_data&& other) noexcept;
[[nodiscard]] shader_handle handle() const;
inline ~shader_data();
~shader_data();
private:
shader_handle m_handle{};
GLenum m_type{ GL_INVALID_ENUM };
shader_handle handle{};
};
}