2020-01-14 15:51:29 -08:00
|
|
|
/* Copyright (C) 2020 Wildfire Games.
|
2013-09-21 01:24:45 -07:00
|
|
|
* This file is part of 0 A.D.
|
|
|
|
|
*
|
|
|
|
|
* 0 A.D. is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* 0 A.D. is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef INCLUDED_JSINTERFACE_RENDERER
|
|
|
|
|
#define INCLUDED_JSINTERFACE_RENDERER
|
|
|
|
|
|
2014-01-04 02:14:53 -08:00
|
|
|
#include "scriptinterface/ScriptInterface.h"
|
2013-09-21 01:24:45 -07:00
|
|
|
|
|
|
|
|
#define DECLARE_BOOLEAN_SCRIPT_SETTING(NAME) \
|
2014-01-04 02:14:53 -08:00
|
|
|
bool Get##NAME##Enabled(ScriptInterface::CxPrivate* pCxPrivate); \
|
|
|
|
|
void Set##NAME##Enabled(ScriptInterface::CxPrivate* pCxPrivate, bool Enabled);
|
2013-09-21 01:24:45 -07:00
|
|
|
|
|
|
|
|
namespace JSI_Renderer
|
|
|
|
|
{
|
2014-01-04 02:14:53 -08:00
|
|
|
std::string GetRenderPath(ScriptInterface::CxPrivate* pCxPrivate);
|
2016-01-23 07:17:56 -08:00
|
|
|
void SetRenderPath(ScriptInterface::CxPrivate* pCxPrivate, const std::string& name);
|
2017-08-20 18:10:56 -07:00
|
|
|
void RecreateShadowMap(ScriptInterface::CxPrivate* pCxPrivate);
|
2018-08-05 14:50:00 -07:00
|
|
|
bool TextureExists(ScriptInterface::CxPrivate* pCxPrivate, const std::wstring& filename);
|
2013-09-21 01:24:45 -07:00
|
|
|
|
|
|
|
|
DECLARE_BOOLEAN_SCRIPT_SETTING(Shadows);
|
|
|
|
|
DECLARE_BOOLEAN_SCRIPT_SETTING(ShadowPCF);
|
|
|
|
|
DECLARE_BOOLEAN_SCRIPT_SETTING(Particles);
|
|
|
|
|
DECLARE_BOOLEAN_SCRIPT_SETTING(PreferGLSL);
|
2017-08-20 17:09:25 -07:00
|
|
|
DECLARE_BOOLEAN_SCRIPT_SETTING(WaterEffects);
|
2014-07-01 09:05:05 -07:00
|
|
|
DECLARE_BOOLEAN_SCRIPT_SETTING(WaterFancyEffects);
|
2013-09-21 01:24:45 -07:00
|
|
|
DECLARE_BOOLEAN_SCRIPT_SETTING(WaterRealDepth);
|
|
|
|
|
DECLARE_BOOLEAN_SCRIPT_SETTING(WaterReflection);
|
|
|
|
|
DECLARE_BOOLEAN_SCRIPT_SETTING(WaterRefraction);
|
2014-07-01 09:05:05 -07:00
|
|
|
DECLARE_BOOLEAN_SCRIPT_SETTING(WaterShadows);
|
2017-12-04 07:54:24 -08:00
|
|
|
DECLARE_BOOLEAN_SCRIPT_SETTING(Fog);
|
2013-09-21 01:24:45 -07:00
|
|
|
DECLARE_BOOLEAN_SCRIPT_SETTING(Silhouettes);
|
|
|
|
|
DECLARE_BOOLEAN_SCRIPT_SETTING(ShowSky);
|
2014-04-21 22:09:31 -07:00
|
|
|
DECLARE_BOOLEAN_SCRIPT_SETTING(SmoothLOS);
|
2019-08-04 01:28:30 -07:00
|
|
|
DECLARE_BOOLEAN_SCRIPT_SETTING(PostProc);
|
2014-05-26 06:42:32 -07:00
|
|
|
DECLARE_BOOLEAN_SCRIPT_SETTING(DisplayFrustum);
|
2020-01-14 15:51:29 -08:00
|
|
|
DECLARE_BOOLEAN_SCRIPT_SETTING(DisplayShadowsFrustum);
|
2013-09-21 01:24:45 -07:00
|
|
|
|
2017-08-23 17:32:42 -07:00
|
|
|
void RegisterScriptFunctions(const ScriptInterface& scriptInterface);
|
2013-09-21 01:24:45 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#undef DECLARE_BOOLEAN_SCRIPT_SETTING
|
|
|
|
|
|
2018-04-27 09:48:44 -07:00
|
|
|
#endif // INCLUDED_JSINTERFACE_RENDERER
|