feat: add OpenGL abstraction layer with RAII resources
- Replace window class with cbt::opengl::context - Add buffer resource (VBO, EBO, UBO, SSBO) with move semantics - Add texture resource with format/type enums and filtering - Add descriptor_set for Vulkan-style resource binding - All resources use RAII with proper cleanup
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace cbt {
|
||||
|
||||
class window {
|
||||
void* m_window = nullptr;
|
||||
bool m_initialized = false;
|
||||
|
||||
static auto init() -> bool;
|
||||
static auto terminate() -> void;
|
||||
static auto setup_opengl() -> bool;
|
||||
static auto info_opengl() -> void;
|
||||
|
||||
public:
|
||||
explicit window(std::string title, int width, int height);
|
||||
~window();
|
||||
|
||||
auto should_close() const -> bool;
|
||||
auto valid() const -> bool;
|
||||
auto swap_buffers() -> void;
|
||||
auto poll_events() -> void;
|
||||
auto raw() const -> void* { return m_window; }
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user