added glfw support

This commit is contained in:
2024-09-01 18:53:07 -06:00
parent f941e90f08
commit 76c67ce5e3
4 changed files with 26 additions and 1 deletions

View File

@ -1,7 +1,23 @@
#include <iostream>
#include "RaycasterConfig.h"
#include <GLFW/glfw3.h>
int main(int argc, char *argv[]){
std::cout << Raycaster_VERSION_MAJOR << "." << Raycaster_VERSION_MINOR << std::endl;
if(!glfwInit()){
std::cout << "GLFW Init failed" << std::endl;
return -1;
}
GLFWwindow* window = glfwCreateWindow(640, 480, "My Title", NULL, NULL);
if (!window){
std::cout << "GLFW Window creation failed" << std::endl;
return -1;
}
glfwMakeContextCurrent(window);
while(!glfwWindowShouldClose(window)){
glfwPollEvents();
glfwSwapBuffers(window);
}
glfwTerminate();
return 0;
}