Fixing vcpkg hopefully
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
target_sources(RayTracer
|
||||
PRIVATE
|
||||
main.cpp)
|
||||
|
||||
add_subdirectory(scene/)
|
||||
add_subdirectory(window/)
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
#include "window/Window.h"
|
||||
|
||||
int main() {
|
||||
Window w(1920, 1080);
|
||||
while (true) {
|
||||
w.update();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
target_sources(RayTracer
|
||||
PRIVATE
|
||||
Scene.h
|
||||
Scene.cpp)
|
||||
@@ -0,0 +1 @@
|
||||
#include "Scene.h"
|
||||
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
class Scene
|
||||
{
|
||||
|
||||
};
|
||||
@@ -0,0 +1,4 @@
|
||||
target_sources(RayTracer
|
||||
PRIVATE
|
||||
Window.h
|
||||
Window.cpp)
|
||||
@@ -0,0 +1,17 @@
|
||||
#include "Window.h"
|
||||
|
||||
Window::Window(int width, int height)
|
||||
{
|
||||
glfwInit();
|
||||
window = glfwCreateWindow(width, height, "RayTracer", nullptr, nullptr);
|
||||
}
|
||||
|
||||
Window::~Window()
|
||||
{
|
||||
}
|
||||
|
||||
void Window::update()
|
||||
{
|
||||
glfwPollEvents();
|
||||
glfwSwapBuffers(window);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
#include <glfw/glfw3.h>
|
||||
|
||||
class Window
|
||||
{
|
||||
public:
|
||||
Window(int width, int height);
|
||||
~Window();
|
||||
void update();
|
||||
private:
|
||||
GLFWwindow* window;
|
||||
};
|
||||
Reference in New Issue
Block a user