initial commit

This commit is contained in:
ZY4N
2024-12-10 13:50:21 +01:00
parent 20bbd06a89
commit 275d47b7c6
33 changed files with 1066 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
#pragma once
#include "GL/glew.h"
#include <system_error>
#include "opengl/handles/shader_handle.hpp"
#include "opengl/handles/shader_program_handle.hpp"
namespace zgl
{
class shader_program_data
{
private:
explicit shader_program_data(GLuint program_id);
public:
shader_program_data() = default;
[[nodiscard]] static std::error_code build_from(
const shader_handle& vertex_shader,
const shader_handle& geometry_shader,
const shader_handle& fragment_shader,
shader_program_data& data
);
shader_program_data(const shader_program_data& other) = delete;
shader_program_data& operator=(const shader_program_data& other) = delete;
shader_program_data(shader_program_data&& other) noexcept ;
shader_program_data& operator=(shader_program_data&& other) noexcept;
[[nodiscard]] shader_program_handle handle() const;
~shader_program_data();
private:
shader_program_handle m_handle{};
};
}
#define INCLUDE_SHADER_PROGRAM_DATA_IMPLEMENTATION
#include "opengl/data/shader_program_data.ipp"
#undef INCLUDE_SHADER_PROGRAM_DATA_IMPLEMENTATION