Fix compilation when ENABLE_DEVMODE is disabled

We don't compile ShaderRenderer in production yet.
This commit is contained in:
David Capello 2023-04-07 21:36:04 -03:00
parent 538219f655
commit e38398d7aa

View File

@ -34,7 +34,7 @@ EditorRender::~EditorRender()
EditorRender::Type EditorRender::type() const
{
#if SK_ENABLE_SKSL
#if SK_ENABLE_SKSL && ENABLE_DEVMODE
if (dynamic_cast<ShaderRenderer*>(m_renderer.get()))
return Type::kShaderRenderer;
#endif
@ -43,7 +43,7 @@ EditorRender::Type EditorRender::type() const
void EditorRender::setType(const Type type)
{
#if SK_ENABLE_SKSL
#if SK_ENABLE_SKSL && ENABLE_DEVMODE
if (type == Type::kShaderRenderer) {
m_renderer = std::make_unique<ShaderRenderer>();
}