Make debug plane a ScreenSpaceRenderable and add documentation (#3483)

* Add screenspace version of debug plane, and an example

* Remove the old renderable

* Apply suggestions from code review

Co-authored-by: Alexander Bock <alexander.bock@liu.se>

---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
This commit is contained in:
Emma Broman
2025-01-17 13:47:37 +01:00
committed by GitHub
parent 16aa150f10
commit e643e8d653
5 changed files with 49 additions and 32 deletions

View File

@@ -24,7 +24,7 @@
#include <modules/debugging/debuggingmodule.h>
#include <modules/debugging/rendering/renderabledebugplane.h>
#include <modules/debugging/rendering/screenspacedebugplane.h>
#include <openspace/documentation/documentation.h>
#include <openspace/engine/configuration.h>
#include <openspace/engine/globals.h>
@@ -136,11 +136,11 @@ DebuggingModule::DebuggingModule()
}
void DebuggingModule::internalInitialize(const ghoul::Dictionary&) {
ghoul::TemplateFactory<Renderable>* fRenderable =
FactoryManager::ref().factory<Renderable>();
ghoul_assert(fRenderable, "No renderable factory existed");
ghoul::TemplateFactory<ScreenSpaceRenderable>* fSsRenderable =
FactoryManager::ref().factory<ScreenSpaceRenderable>();
ghoul_assert(fSsRenderable, "ScreenSpaceRenderable factory was not created");
fRenderable->registerClass<RenderableDebugPlane>("RenderableDebugPlane");
fSsRenderable->registerClass<ScreenSpaceDebugPlane>("ScreenSpaceDebugPlane");
}
void DebuggingModule::internalInitializeGL() {
@@ -150,7 +150,7 @@ void DebuggingModule::internalInitializeGL() {
std::vector<documentation::Documentation> DebuggingModule::documentations() const {
return {
RenderableDebugPlane::Documentation()
ScreenSpaceDebugPlane::Documentation()
};
}