Files
RayTracer/src/main.cpp
T

26 lines
609 B
C++
Raw Normal View History

2025-01-23 17:19:53 +01:00
#include "scene/BVH.h"
#include "util/ModelLoader.h"
#include "window/Window.h"
2025-01-23 15:26:32 +01:00
int main()
{
2025-01-23 17:19:53 +01:00
BVH bvh;
2025-01-24 09:50:51 +01:00
bvh.addModels(ModelLoader::loadModel("../cube.fbx"), glm::mat4());
2025-01-23 17:19:53 +01:00
bvh.generate();
Window w(1920, 1080);
std::vector<unsigned char> texture(1920 * 1080 * 3);
for (int j = 10; j < 100; ++j)
{
for (int i = 0; i < 1920; ++i)
{
texture[(j * 1920 + i) * 3] = 0xff;
texture[(j * 1920 + i) * 3 + 1] = 0xff;
texture[(j * 1920 + i) * 3 + 2] = 0x0;
}
}
while (true)
{
w.update(texture);
}
return 0;
2025-01-23 12:33:39 +01:00
}