[sdl] set ShadowMapSize and SolarSystemMaxDistance from config
parent
fecc0ca0a9
commit
b7dd51fc81
|
@ -79,6 +79,7 @@ class SDL_Application
|
||||||
void toggleFullscreen();
|
void toggleFullscreen();
|
||||||
void copyURL();
|
void copyURL();
|
||||||
void pasteURL();
|
void pasteURL();
|
||||||
|
void configure() const;
|
||||||
|
|
||||||
// state variables
|
// state variables
|
||||||
std::string m_appName;
|
std::string m_appName;
|
||||||
|
@ -166,11 +167,22 @@ SDL_Application::initCelestiaCore()
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SDL_Application::configure() const
|
||||||
|
{
|
||||||
|
auto *renderer = m_appCore->getRenderer();
|
||||||
|
const auto *config = m_appCore->getConfig();
|
||||||
|
|
||||||
|
renderer->setRenderFlags(Renderer::DefaultRenderFlags);
|
||||||
|
renderer->setShadowMapSize(config->ShadowMapSize);
|
||||||
|
renderer->setSolarSystemMaxDistance(config->SolarSystemMaxDistance);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SDL_Application::run()
|
SDL_Application::run()
|
||||||
{
|
{
|
||||||
m_appCore->initRenderer();
|
m_appCore->initRenderer();
|
||||||
m_appCore->getRenderer()->setRenderFlags(Renderer::DefaultRenderFlags);
|
configure();
|
||||||
m_appCore->start();
|
m_appCore->start();
|
||||||
|
|
||||||
std::string tzName;
|
std::string tzName;
|
||||||
|
|
Loading…
Reference in New Issue