Renderer.pkg 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. $#include "Graphics/Renderer.h"
  2. class Renderer
  3. {
  4. void SetNumViewports(unsigned num);
  5. void SetViewport(unsigned index, Viewport* viewport);
  6. void SetDefaultRenderPath(RenderPath* renderPath);
  7. void SetDefaultRenderPath(XMLFile* file);
  8. void SetHDRRendering(bool enable);
  9. void SetSpecularLighting(bool enable);
  10. void SetTextureAnisotropy(int level);
  11. void SetTextureFilterMode(TextureFilterMode mode);
  12. void SetTextureQuality(int quality);
  13. void SetMaterialQuality(int quality);
  14. void SetDrawShadows(bool enable);
  15. void SetShadowMapSize(int size);
  16. void SetShadowQuality(ShadowQuality quality);
  17. void SetShadowSoftness(float shadowSoftness);
  18. void SetVSMShadowParameters(float minVariance, float lightBleedingReduction);
  19. void SetReuseShadowMaps(bool enable);
  20. void SetMaxShadowMaps(int shadowMaps);
  21. void SetDynamicInstancing(bool enable);
  22. void SetMinInstances(int instances);
  23. void SetMaxSortedInstances(int instances);
  24. void SetMaxOccluderTriangles(int triangles);
  25. void SetOcclusionBufferSize(int size);
  26. void SetOccluderSizeThreshold(float screenSize);
  27. void SetThreadedOcclusion(bool enable);
  28. void SetMobileShadowBiasMul(float mul);
  29. void SetMobileShadowBiasAdd(float add);
  30. void ReloadShaders();
  31. unsigned GetNumViewports() const;
  32. Viewport* GetViewport(unsigned index) const;
  33. RenderPath* GetDefaultRenderPath() const;
  34. bool GetHDRRendering() const;
  35. bool GetSpecularLighting() const;
  36. bool GetDrawShadows() const;
  37. int GetTextureAnisotropy() const;
  38. TextureFilterMode GetTextureFilterMode() const;
  39. int GetTextureQuality() const;
  40. int GetMaterialQuality() const;
  41. int GetShadowMapSize() const;
  42. ShadowQuality GetShadowQuality() const;
  43. float GetShadowSoftness() const;
  44. Vector2 GetVSMShadowParameters() const;
  45. bool GetReuseShadowMaps() const;
  46. int GetMaxShadowMaps() const;
  47. bool GetDynamicInstancing() const;
  48. int GetMinInstances() const;
  49. int GetMaxSortedInstances() const;
  50. int GetMaxOccluderTriangles() const;
  51. int GetOcclusionBufferSize() const;
  52. float GetOccluderSizeThreshold() const;
  53. bool GetThreadedOcclusion() const;
  54. float GetMobileShadowBiasMul() const;
  55. float GetMobileShadowBiasAdd() const;
  56. unsigned GetNumViews() const;
  57. unsigned GetNumPrimitives() const;
  58. unsigned GetNumBatches() const;
  59. unsigned GetNumGeometries(bool allViews = false) const;
  60. unsigned GetNumLights(bool allViews = false) const;
  61. unsigned GetNumShadowMaps(bool allViews = false) const;
  62. unsigned GetNumOccluders(bool allViews = false) const;
  63. Zone* GetDefaultZone() const;
  64. Material* GetDefaultMaterial() const;
  65. Texture2D* GetDefaultLightRamp() const;
  66. Texture2D* GetDefaultLightSpot() const;
  67. void DrawDebugGeometry(bool depthTest);
  68. tolua_property__get_set unsigned numViewports;
  69. tolua_property__get_set RenderPath* defaultRenderPath;
  70. tolua_property__get_set bool HDRRendering;
  71. tolua_property__get_set bool specularLighting;
  72. tolua_property__get_set bool drawShadows;
  73. tolua_property__get_set int textureAnisotropy;
  74. tolua_property__get_set TextureFilterMode textureFilterMode;
  75. tolua_property__get_set int textureQuality;
  76. tolua_property__get_set int materialQuality;
  77. tolua_property__get_set int shadowMapSize;
  78. tolua_property__get_set ShadowQuality shadowQuality;
  79. tolua_property__get_set float shadowSoftness;
  80. tolua_property__get_set bool reuseShadowMaps;
  81. tolua_property__get_set int maxShadowMaps;
  82. tolua_property__get_set bool dynamicInstancing;
  83. tolua_property__get_set int minInstances;
  84. tolua_property__get_set int maxSortedInstances;
  85. tolua_property__get_set int maxOccluderTriangles;
  86. tolua_property__get_set int occlusionBufferSize;
  87. tolua_property__get_set float occluderSizeThreshold;
  88. tolua_property__get_set bool threadedOcclusion;
  89. tolua_property__get_set float mobileShadowBiasMul;
  90. tolua_property__get_set float mobileShadowBiasAdd;
  91. tolua_readonly tolua_property__get_set unsigned numViews;
  92. tolua_readonly tolua_property__get_set unsigned numPrimitives;
  93. tolua_readonly tolua_property__get_set unsigned numBatches;
  94. tolua_readonly tolua_property__get_set Zone* defaultZone;
  95. tolua_readonly tolua_property__get_set Material* defaultMaterial;
  96. tolua_readonly tolua_property__get_set Texture2D* defaultLightRamp;
  97. tolua_readonly tolua_property__get_set Texture2D* defaultLightSpot;
  98. };
  99. Renderer* GetRenderer();
  100. tolua_readonly tolua_property__get_set Renderer* renderer;
  101. ${
  102. #define TOLUA_DISABLE_tolua_GraphicsLuaAPI_GetRenderer00
  103. static int tolua_GraphicsLuaAPI_GetRenderer00(lua_State* tolua_S)
  104. {
  105. return ToluaGetSubsystem<Renderer>(tolua_S);
  106. }
  107. #define TOLUA_DISABLE_tolua_get_renderer_ptr
  108. #define tolua_get_renderer_ptr tolua_GraphicsLuaAPI_GetRenderer00
  109. $}