+ | Vector classes

This commit is contained in:
TheRedShip
2024-10-13 18:06:57 +02:00
parent 8784b5ce02
commit 0bd05282cf
10 changed files with 407 additions and 33 deletions

View File

@ -10,42 +10,20 @@
/* */
/* ************************************************************************** */
#include "RT.h"
#include "RT.hpp"
int main(void)
{
if (!glfwInit())
{
fprintf( stderr, "Failed to initialize GLFW\n" );
return (-1);
}
Window window;
GLFWwindow *win = window.getWindow();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 4);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
GLFWwindow* window;
window = glfwCreateWindow(WIDTH, HEIGHT, "RT_GPU", NULL, NULL);
if (!window )
{
fprintf( stderr, "Failed to open GLFW window. If you have an Intel GPU, they are not 3.3 compatible. Try the 2.1 version of the tutorials.\n" );
glfwTerminate();
return -1;
}
glfwMakeContextCurrent(window);
gladLoadGL(glfwGetProcAddress);
glfwSwapInterval(1);
while (!glfwWindowShouldClose(window))
while (!window.shouldClose())
{
glClear(GL_COLOR_BUFFER_BIT);
glfwSwapBuffers(window);
glfwPollEvents();
}
window.display();
window.pollEvents();
}
return (0);
}