BsScriptRenderSettings.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsScriptEnginePrerequisites.h"
  5. #include "BsScriptObject.h"
  6. namespace bs
  7. {
  8. struct RenderSettings;
  9. struct AutoExposureSettings;
  10. struct TonemappingSettings;
  11. struct WhiteBalanceSettings;
  12. struct ColorGradingSettings;
  13. /** @addtogroup ScriptInteropEngine
  14. * @{
  15. */
  16. /** Interop class between C++ & CLR for AutoExposureSettings. */
  17. class BS_SCR_BE_EXPORT ScriptAutoExposureSettings : public ScriptObject<ScriptAutoExposureSettings>
  18. {
  19. public:
  20. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "AutoExposureSettings")
  21. /** Converts managed object its native counterpart. */
  22. static SPtr<AutoExposureSettings> toNative(MonoObject* object);
  23. /** Converts native object to its managed counterpart. */
  24. static MonoObject* toManaged(AutoExposureSettings& value);
  25. private:
  26. ScriptAutoExposureSettings(MonoObject* instance);
  27. /************************************************************************/
  28. /* CLR HOOKS */
  29. /************************************************************************/
  30. static MonoField* sHistogramLog2Min;
  31. static MonoField* sHistogramLog2Max;
  32. static MonoField* sHistogramPctLow;
  33. static MonoField* sHistogramPctHigh;
  34. static MonoField* sMinEyeAdaptation;
  35. static MonoField* sMaxEyeAdaptation;
  36. static MonoField* sEyeAdaptationSpeedUp;
  37. static MonoField* sEyeAdaptationSpeedDown;
  38. };
  39. /** Interop class between C++ & CLR for TonemappingSettings. */
  40. class BS_SCR_BE_EXPORT ScriptTonemappingSettings : public ScriptObject<ScriptTonemappingSettings>
  41. {
  42. public:
  43. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "TonemappingSettings")
  44. /** Converts managed object its native counterpart. */
  45. static SPtr<TonemappingSettings> toNative(MonoObject* object);
  46. /** Converts native object to its managed counterpart. */
  47. static MonoObject* toManaged(TonemappingSettings& value);
  48. private:
  49. ScriptTonemappingSettings(MonoObject* instance);
  50. /************************************************************************/
  51. /* CLR HOOKS */
  52. /************************************************************************/
  53. static MonoField* sFilmicCurveShoulderStrength;
  54. static MonoField* sFilmicCurveLinearStrength;
  55. static MonoField* sFilmicCurveLinearAngle;
  56. static MonoField* sFilmicCurveToeStrength;
  57. static MonoField* sFilmicCurveToeNumerator;
  58. static MonoField* sFilmicCurveToeDenominator;
  59. static MonoField* sFilmicCurveLinearWhitePoint;
  60. };
  61. /** Interop class between C++ & CLR for WhiteBalanceSettings. */
  62. class BS_SCR_BE_EXPORT ScriptWhiteBalanceSettings : public ScriptObject<ScriptWhiteBalanceSettings>
  63. {
  64. public:
  65. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "WhiteBalanceSettings")
  66. /** Converts managed object its native counterpart. */
  67. static SPtr<WhiteBalanceSettings> toNative(MonoObject* object);
  68. /** Converts native object to its managed counterpart. */
  69. static MonoObject* toManaged(WhiteBalanceSettings& value);
  70. private:
  71. ScriptWhiteBalanceSettings(MonoObject* instance);
  72. /************************************************************************/
  73. /* CLR HOOKS */
  74. /************************************************************************/
  75. static MonoField* sTemperature;
  76. static MonoField* sTint;
  77. };
  78. /** Interop class between C++ & CLR for ColorGradingSettings. */
  79. class BS_SCR_BE_EXPORT ScriptColorGradingSettings : public ScriptObject<ScriptColorGradingSettings>
  80. {
  81. public:
  82. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "ColorGradingSettings")
  83. /** Converts managed object its native counterpart. */
  84. static SPtr<ColorGradingSettings> toNative(MonoObject* object);
  85. /** Converts native object to its managed counterpart. */
  86. static MonoObject* toManaged(ColorGradingSettings& value);
  87. private:
  88. ScriptColorGradingSettings(MonoObject* instance);
  89. /************************************************************************/
  90. /* CLR HOOKS */
  91. /************************************************************************/
  92. static MonoField* sSaturation;
  93. static MonoField* sContrast;
  94. static MonoField* sGain;
  95. static MonoField* sOffset;
  96. };
  97. /** Interop class between C++ & CLR for RenderSettings. */
  98. class BS_SCR_BE_EXPORT ScriptRenderSettings : public ScriptObject<ScriptRenderSettings>
  99. {
  100. public:
  101. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "RenderSettings")
  102. /** Converts managed object its native counterpart. */
  103. static SPtr<RenderSettings> toNative(MonoObject* object);
  104. /** Converts native object to its managed counterpart. */
  105. static MonoObject* toManaged(const SPtr<RenderSettings>& value);
  106. private:
  107. ScriptRenderSettings(MonoObject* instance);
  108. /************************************************************************/
  109. /* CLR HOOKS */
  110. /************************************************************************/
  111. static MonoObject* internal_CreateDefault();
  112. static MonoField* sEnableAutoExposure;;
  113. static MonoField* sAutoExposure;
  114. static MonoField* sEnableTonemapping;
  115. static MonoField* sTonemapping;
  116. static MonoField* sWhiteBalance;
  117. static MonoField* sColorGrading;
  118. static MonoField* sExposureScale;
  119. static MonoField* sGamma;
  120. static MonoField* sEnableHDR;
  121. static MonoField* sEnableLighting;
  122. static MonoField* sEnableShadows;
  123. static MonoField* sOverlayOnly;
  124. };
  125. /** @} */
  126. }