...
This commit is contained in:
18
include/opengl/handles/index_buffer_handle.hpp
Normal file
18
include/opengl/handles/index_buffer_handle.hpp
Normal 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
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -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 };
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
19
include/opengl/handles/vertex_buffer_handle.hpp
Normal file
19
include/opengl/handles/vertex_buffer_handle.hpp
Normal 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
|
||||
Reference in New Issue
Block a user