Lots of stuff, ending with Window restruct

This commit is contained in:
NaifBanana
2026-09-09 12:18:44 -05:00
parent e2ea8c5373
commit fa60274540
12 changed files with 412 additions and 40 deletions
+8 -5
View File
@@ -12,10 +12,13 @@
int main() {
LOG("Howdy!");
nb::Window window(400, 400, "Hello!");
window.setWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
window.setWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
window.init();
auto window = nb::OGLWindow::CreateWindow(
400,
400,
"Howdy!",
{{GLFW_CONTEXT_VERSION_MAJOR, 3},
{GLFW_CONTEXT_VERSION_MINOR, 3}}
);
auto vert = std::make_shared<nb::Shader>(
GL_VERTEX_SHADER,
@@ -66,7 +69,7 @@ int main() {
}, indxs);
LOG(prog.log());
GLFWwindow* window_ptr = window.getWindow();
GLFWwindow* window_ptr = window->getWindowPtr();
while(!glfwWindowShouldClose(window_ptr)) {
OPENGL_CALL(glClearColor(0.2f, 0.3f, 0.3f, 1.0f));
OPENGL_CALL(glClear(GL_COLOR_BUFFER_BIT));