This commit is contained in:
ZY4N
2025-03-23 21:11:22 +01:00
parent 510398423a
commit c609d49f0d
49 changed files with 1412 additions and 924 deletions

View File

@@ -0,0 +1,18 @@
#pragma once
#include "opengl/resource_management/resource_handle.hpp"
namespace zgl
{
struct index_buffer_handle : resource_handle
{
inline void bind() const;
inline static void unbind();
};
}
#define INCLUDE_INDEX_BUFFER_HANDLE_IMPLEMENTATION
#include "opengl/handles/index_buffer_handle.ipp"
#undef INCLUDE_INDEX_BUFFER_HANDLE_IMPLEMENTATION

View File

@@ -7,7 +7,7 @@ namespace zgl
struct shader_handle_set
{
std::array<shader_handle, zgl::shading::stage::count> stages;
std::array<shader_handle, shading::stage::count> stages;
};
}

View File

@@ -24,7 +24,9 @@ struct shader_program_handle
[[nodiscard]] uniform_support_type check_uniform_support(std::span<const shader_program_variable> uniforms) const;
GLuint program_id{ 0 };
[[nodiscard]] bool valid() const;
GLuint id{ 0 };
};
}

View File

@@ -1,15 +1,16 @@
#pragma once
#include "GL/glew.h"
#include "opengl/resource_management/resource_handle.hpp"
namespace zgl {
struct texture_handle
namespace zgl
{
struct texture_handle : resource_handle
{
inline void bind() const;
inline static void unbind();
GLuint texture_id{ 0 };
};
}
#define INCLUDE_TEXTURE_INSTANCE_IMPLEMENTATION

View File

@@ -0,0 +1,19 @@
#pragma once
#include "opengl/resource_management/resource_handle.hpp"
namespace zgl
{
struct vertex_buffer_handle : resource_handle
{
inline void bind() const;
inline static void unbind();
};
}
#define INCLUDE_VERTEX_BUFFER_HANDLE_IMPLEMENTATION
#include "opengl/handles/vertex_buffer_handle.ipp"
#undef INCLUDE_VERTEX_BUFFER_HANDLE_IMPLEMENTATION