Lots of stuff, ending with Window restruct
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user