diff --git a/.vscode/settings.json b/.vscode/settings.json index 74e2d32..34c4b6f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -70,7 +70,8 @@ "valarray": "cpp", "variant": "cpp", "complex": "cpp", - "hash_map": "cpp" + "hash_map": "cpp", + "filesystem": "cpp" }, "cmake.configureOnOpen": false } \ No newline at end of file diff --git a/src/graphics.hpp b/src/graphics.hpp index a66e8f0..1cba674 100644 --- a/src/graphics.hpp +++ b/src/graphics.hpp @@ -18,3 +18,9 @@ extern "C" // glm #include #include + +#include +namespace inferno { +class Ray; +using RayField = std::vector; +} diff --git a/src/hart_directory.cpp b/src/hart_directory.cpp index 1daacab..137100b 100644 --- a/src/hart_directory.cpp +++ b/src/hart_directory.cpp @@ -1,5 +1,7 @@ #include "hart_directory.hpp" +#include "inferno_hart.hpp" + #include #include diff --git a/src/hart_directory.hpp b/src/hart_directory.hpp index 44420e8..b5b0b1d 100644 --- a/src/hart_directory.hpp +++ b/src/hart_directory.hpp @@ -6,13 +6,31 @@ // _CREDIT returns ModuleCredit #include +#include #include #include -#include "inferno_hart.hpp" - namespace inferno { +class HARTModule; +struct ModuleCredit; + +#ifdef _WIN32 +#include +#define HART_EXTENSION ".dll" +#define HART_INTERFACE extern "C" __declspec(dllexport) +#else // UNIX-Like +#include +#define HART_EXTENSION ".so" +#define HART_INTERFACE extern "C" +#endif + +HART_INTERFACE typedef void* (*HART_INIT_F)(void); +HART_INTERFACE typedef void (*HART_DESTROY_F)(void*); +HART_INTERFACE typedef void* (*HART_CREDIT_F)(void); + +typedef void (*HART_HIT_CALLBACK)(HitInfo* hit); + class HARTModuleDirectory { public: diff --git a/src/hart_module.hpp b/src/hart_module.hpp index b0d0665..6f0ed04 100644 --- a/src/hart_module.hpp +++ b/src/hart_module.hpp @@ -5,6 +5,7 @@ #include +#include #include "hart_directory.hpp" namespace inferno { @@ -14,8 +15,6 @@ class Ray; class HitInfo; class HARTModule; -using RayField = std::vector; - class HHM { public: diff --git a/src/renderer/dispatcher.cpp b/src/renderer/dispatcher.cpp index 1799d89..3657380 100644 --- a/src/renderer/dispatcher.cpp +++ b/src/renderer/dispatcher.cpp @@ -1,45 +1,43 @@ -#include "dispatcher.hpp" +// #include "dispatcher.hpp" -#include +// #include "hart_module.hpp" +// #include "renderer.hpp" -#include "renderer.hpp" -#include "hart_module.hpp" +// using namespace inferno; -using namespace inferno; +// RenderDispatcher::RenderDispatcher() +// { +// // mHHM = new HHM(); +// // mRenderer = new RayRenderer(mHHM); +// } -RenderDispatcher::RenderDispatcher() -{ - mHHM = new HHM(); - mRenderer = new RayRenderer(mHHM); -} +// RenderDispatcher::~RenderDispatcher() +// { -RenderDispatcher::~RenderDispatcher() -{ +// } -} +// RayRenderer* RenderDispatcher::getRenderer() +// { +// return mRenderer; +// } -RayRenderer* RenderDispatcher::getRenderer() -{ - return mRenderer; -} +// HHM* RenderDispatcher::getTopModule() +// { +// return mHHM; +// } -HHM* RenderDispatcher::getTopModule() -{ - return mHHM; -} +// void RenderDispatcher::startProgression() +// { -void RenderDispatcher::startProgression() -{ +// } -} +// void RenderDispatcher::stopProgression() +// { -void RenderDispatcher::stopProgression() -{ +// } -} +// GLuint RenderDispatcher::getLatestTexture() +// { -GLuint RenderDispatcher::getLatestTexture() -{ - -} +// } diff --git a/src/renderer/ray_source.cpp b/src/renderer/ray_source.cpp index 887161c..587bfa1 100644 --- a/src/renderer/ray_source.cpp +++ b/src/renderer/ray_source.cpp @@ -46,7 +46,7 @@ RayField RaySource::getInitialRays(bool MSAA) for (int x = 0; x < mReferenceCamera->getRayViewport().x; x++) for (int y = 0; y < mReferenceCamera->getRayViewport().y; y++) { - float Px = (2.0f * ((x + 0.5f) / mReferenceCamera->getRayViewport().x) - 1.0f) * scale * aspect; + float Px = (2.0f * ((x + 0.5f) / mReferenceCamera->getRayViewport().x) - 1.0f) * scale * aspect; float Py = (1.0f - 2.0f * ((y + 0.5f) / mReferenceCamera->getRayViewport().y) * scale); Ray* ray = new Ray; @@ -57,4 +57,4 @@ RayField RaySource::getInitialRays(bool MSAA) } return field; - } +} diff --git a/src/renderer/ray_source.hpp b/src/renderer/ray_source.hpp index 658b431..4c2ee55 100644 --- a/src/renderer/ray_source.hpp +++ b/src/renderer/ray_source.hpp @@ -8,8 +8,6 @@ namespace inferno { -using RayField = std::vector; - class Camera; class RaySource diff --git a/suppressions.txt b/suppressions.txt new file mode 100644 index 0000000..f785cc2 --- /dev/null +++ b/suppressions.txt @@ -0,0 +1 @@ +*:*/thirdparty/* \ No newline at end of file