summaryrefslogtreecommitdiffhomepage
path: root/src/main.cpp
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2022-11-19 22:31:13 -0500
committerrealtradam <[email protected]>2022-11-19 22:31:13 -0500
commit0eef3373b58cf2de459578fc94606804d1e778a0 (patch)
tree0c53f9ce2b80823b223b07ae3dbdddb473c94354 /src/main.cpp
parent13432ece9e2a8c6d20158fd6886c6060c8a7bdc9 (diff)
downloadOgle-0eef3373b58cf2de459578fc94606804d1e778a0.tar.gz
Ogle-0eef3373b58cf2de459578fc94606804d1e778a0.zip
Hello Window complete
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 05e27da..fd3a460 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,6 +1,8 @@
#include <glad/glad.h>
#include <GLFW/glfw3.h>
+#include "input.h"
+
#include <iostream>
void framebuffer_size_callback(GLFWwindow* window, int width, int height)
@@ -14,7 +16,7 @@ int main() {
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
- GLFWwindow* window = glfwCreateWindow(800, 600, "Yep", NULL, NULL);
+ GLFWwindow* window = glfwCreateWindow(800, 600, "Ogle", NULL, NULL);
if (window == NULL)
{
std::cout << "Failed to create GLFW window" << std::endl;
@@ -33,8 +35,14 @@ int main() {
glfwSetFramebufferSizeCallback(window, framebuffer_size_callback);
+ // game loop
while(!glfwWindowShouldClose(window))
{
+ processInput(window);
+
+ glClearColor(0.2f, 0.3f, 0.3f, 1.0f);
+ glClear(GL_COLOR_BUFFER_BIT);
+
glfwSwapBuffers(window);
glfwPollEvents();
}