added glfw support
This commit is contained in:
16
src/main.cpp
16
src/main.cpp
@ -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;
|
||||
}
|
Reference in New Issue
Block a user