as refined as a really refined substance

This commit is contained in:
benkyd
2022-12-24 21:15:06 +00:00
parent e7f003d6e5
commit 8f1ecdef07
3 changed files with 11 additions and 6 deletions

View File

@@ -1,11 +1,13 @@
#include "hart_module.hpp"
#include <vector>
#include <renderer/ray_source.hpp>
#include <scene/scene.hpp>
#include <scene/mesh.hpp>
#include <spdlog/spdlog.h>
#include <vector>
using namespace inferno;
HHM::HHM()
@@ -39,6 +41,7 @@ void HHM::newScene(Scene* scene)
// as it is now, submitTris assumes it's getting the whole scene
// which would involve a lot of mesh copying (avoid!) if i were to chain them
for (auto* mesh : meshs) {
spdlog::debug("MESH BEING SUBMITTED TO MODULE");
void* verticies; void* normals; void* indicies;
int vertexCount = mesh->getVerticies(verticies, normals);
int indexCount = mesh->getIndicies(indicies);

View File

@@ -44,7 +44,10 @@ void RayRenderer::setScene(Scene* scene)
delete mRaySource;
}
mRaySource = new RaySource(scene->getCamera());
mIface->newScene(scene);
// the scene will be sent to the module on prepare
// as it did update during initialisation
// mIface->newScene(scene);
}
void RayRenderer::setTargetSize(glm::ivec2 size)
@@ -90,8 +93,7 @@ void RayRenderer::draw()
bool frameStatus = false;
while (!frameStatus)
{
EModuleState state = mIface->getModuleState();
switch(state)
switch(mIface->getModuleState())
{
case EModuleState::Bad:
spdlog::error("MODULE STATE BAD");

View File

@@ -31,7 +31,7 @@ private:
Sky* mCurrentSky;
private:
bool mDidUpdate = true;
bool mDidUpdate = false;
};
}