mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-08 12:30:00 -05:00
Move specification of RenderingMethod into renderengine
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#include <openspace/util/syncbuffer.h>
|
||||
#include <ghoul/filesystem/filesystem.h>
|
||||
#include <ghoul/misc/sharedmemory.h>
|
||||
#include <openspace/engine/configurationmanager.h>
|
||||
|
||||
#include <ghoul/io/texture/texturereader.h>
|
||||
#ifdef GHOUL_USE_DEVIL
|
||||
@@ -76,6 +77,9 @@
|
||||
namespace {
|
||||
const std::string _loggerCat = "RenderEngine";
|
||||
|
||||
const std::string KeyRenderingMethod = "RenderingMethod";
|
||||
const std::string DefaultRenderingMethod = "ABufferSingleLinked";
|
||||
|
||||
const std::map<std::string, int> RenderingMethods = {
|
||||
{ "ABufferFrameBuffer", ABUFFER_FRAMEBUFFER},
|
||||
{ "ABufferSingleLinked", ABUFFER_SINGLE_LINKED },
|
||||
@@ -130,7 +134,11 @@ RenderEngine::~RenderEngine() {
|
||||
ghoul::SharedMemory::remove(PerformanceMeasurementSharedData);
|
||||
}
|
||||
|
||||
bool RenderEngine::initialize(const std::string& renderingMethod) {
|
||||
bool RenderEngine::initialize() {
|
||||
std::string renderingMethod = DefaultRenderingMethod;
|
||||
if (OsEng.configurationManager()->hasKeyAndValue<std::string>(KeyRenderingMethod))
|
||||
renderingMethod = OsEng.configurationManager()->value<std::string>(KeyRenderingMethod);
|
||||
|
||||
auto it = RenderingMethods.find(renderingMethod);
|
||||
if (it == RenderingMethods.end()) {
|
||||
LFATAL("Rendering method '" << renderingMethod << "' not among the available "
|
||||
|
||||
Reference in New Issue
Block a user