setting it up for macos

This commit is contained in:
Dynamitos
2025-01-24 09:50:51 +01:00
parent 80cf4f8082
commit 45ed7c75be
6 changed files with 32 additions and 4 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
int main()
{
BVH bvh;
bvh.addModels(ModelLoader::loadModel("../../cube.fbx"), glm::mat4());
bvh.addModels(ModelLoader::loadModel("../cube.fbx"), glm::mat4());
bvh.generate();
Window w(1920, 1080);
std::vector<uint32_t> texture(1920 * 1080);
+1 -1
View File
@@ -1,7 +1,7 @@
#pragma once
#include <array>
#include <glm/glm.hpp>
#include <utility>
#include <algorithm>
struct AABB
{
+3 -2
View File
@@ -9,11 +9,12 @@ Window::Window(int width, int height) : width(width), height(height)
glewExperimental = true;
assert(glfwInit());
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 5);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // We don't want the old OpenGL
window = glfwCreateWindow(width, height, "RayTracer", nullptr, nullptr);
glfwMakeContextCurrent(window);
assert(!glewInit());
std::cout << glewInit() <<std::endl;
std::cout <<glewGetErrorString(1) <<std::endl;
glGenVertexArrays(1, &vao);
glBindVertexArray(vao);
glGenTextures(1, &texture);