2025-01-25 20:08:21 +01:00
|
|
|
#include "scene/Renderer.h"
|
2025-01-24 00:19:11 +01:00
|
|
|
#include "util/ModelLoader.h"
|
|
|
|
|
#include "window/Window.h"
|
2025-01-24 23:20:26 +01:00
|
|
|
#include <iostream>
|
|
|
|
|
#include <imgui.h>
|
2025-01-23 15:26:32 +01:00
|
|
|
|
2025-01-24 00:19:11 +01:00
|
|
|
int main()
|
|
|
|
|
{
|
2025-01-25 20:08:21 +01:00
|
|
|
Renderer scene;
|
2025-01-24 21:54:38 +01:00
|
|
|
Window window(1920, 1080);
|
2025-01-25 13:04:12 +01:00
|
|
|
scene.startRender(
|
2025-01-24 21:54:38 +01:00
|
|
|
Camera{
|
2025-01-26 19:43:06 +01:00
|
|
|
.position = glm::vec3(5, 5, 5),
|
|
|
|
|
.direction = glm::vec3(-1, -1, -1),
|
2025-01-24 21:54:38 +01:00
|
|
|
},
|
|
|
|
|
RenderParameter{
|
|
|
|
|
.width = 1920,
|
|
|
|
|
.height = 1080,
|
|
|
|
|
.numSamples = 10000,
|
|
|
|
|
});
|
2025-01-24 00:19:11 +01:00
|
|
|
while (true)
|
|
|
|
|
{
|
2025-01-24 23:20:26 +01:00
|
|
|
window.beginFrame();
|
2025-01-25 19:31:31 +01:00
|
|
|
if (ImGui::Button("Render"))
|
2025-01-24 23:20:26 +01:00
|
|
|
{
|
2025-01-25 19:31:31 +01:00
|
|
|
scene.startRender(
|
|
|
|
|
Camera{
|
2025-01-26 19:43:06 +01:00
|
|
|
.position = glm::vec3(5, 5, 5),
|
|
|
|
|
.direction = glm::vec3(-1, -1, -1),
|
2025-01-25 19:31:31 +01:00
|
|
|
},
|
|
|
|
|
RenderParameter{
|
|
|
|
|
.width = 1920,
|
|
|
|
|
.height = 1080,
|
|
|
|
|
.numSamples = 10000,
|
|
|
|
|
});
|
2025-01-24 23:20:26 +01:00
|
|
|
}
|
2025-01-24 21:20:06 +01:00
|
|
|
window.update(scene.getImage());
|
2025-01-24 00:19:11 +01:00
|
|
|
}
|
|
|
|
|
return 0;
|
2025-01-23 12:33:39 +01:00
|
|
|
}
|