Renderer.pkg 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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(int quality);
  17. void SetReuseShadowMaps(bool enable);
  18. void SetMaxShadowMaps(int shadowMaps);
  19. void SetDynamicInstancing(bool enable);
  20. void SetMinInstances(int instances);
  21. void SetMaxSortedInstances(int instances);
  22. void SetMaxOccluderTriangles(int triangles);
  23. void SetOcclusionBufferSize(int size);
  24. void SetOccluderSizeThreshold(float screenSize);
  25. void SetMobileShadowBiasMul(float mul);
  26. void SetMobileShadowBiasAdd(float add);
  27. void ReloadShaders();
  28. unsigned GetNumViewports() const;
  29. Viewport* GetViewport(unsigned index) const;
  30. RenderPath* GetDefaultRenderPath() const;
  31. bool GetHDRRendering() const;
  32. bool GetSpecularLighting() const;
  33. bool GetDrawShadows() const;
  34. int GetTextureAnisotropy() const;
  35. TextureFilterMode GetTextureFilterMode() const;
  36. int GetTextureQuality() const;
  37. int GetMaterialQuality() const;
  38. int GetShadowMapSize() const;
  39. int GetShadowQuality() const;
  40. bool GetReuseShadowMaps() const;
  41. int GetMaxShadowMaps() const;
  42. bool GetDynamicInstancing() const;
  43. int GetMinInstances() const;
  44. int GetMaxSortedInstances() const;
  45. int GetMaxOccluderTriangles() const;
  46. int GetOcclusionBufferSize() const;
  47. float GetOccluderSizeThreshold() const;
  48. float GetMobileShadowBiasMul() const;
  49. float GetMobileShadowBiasAdd() const;
  50. unsigned GetNumViews() const;
  51. unsigned GetNumPrimitives() const;
  52. unsigned GetNumBatches() const;
  53. unsigned GetNumGeometries(bool allViews = false) const;
  54. unsigned GetNumLights(bool allViews = false) const;
  55. unsigned GetNumShadowMaps(bool allViews = false) const;
  56. unsigned GetNumOccluders(bool allViews = false) const;
  57. Zone* GetDefaultZone() const;
  58. Material* GetDefaultMaterial() const;
  59. Texture2D* GetDefaultLightRamp() const;
  60. Texture2D* GetDefaultLightSpot() const;
  61. void DrawDebugGeometry(bool depthTest);
  62. tolua_property__get_set unsigned numViewports;
  63. tolua_property__get_set RenderPath* defaultRenderPath;
  64. tolua_property__get_set bool HDRRendering;
  65. tolua_property__get_set bool specularLighting;
  66. tolua_property__get_set bool drawShadows;
  67. tolua_property__get_set int textureAnisotropy;
  68. tolua_property__get_set TextureFilterMode textureFilterMode;
  69. tolua_property__get_set int textureQuality;
  70. tolua_property__get_set int materialQuality;
  71. tolua_property__get_set int shadowMapSize;
  72. tolua_property__get_set int shadowQuality;
  73. tolua_property__get_set bool reuseShadowMaps;
  74. tolua_property__get_set int maxShadowMaps;
  75. tolua_property__get_set bool dynamicInstancing;
  76. tolua_property__get_set int minInstances;
  77. tolua_property__get_set int maxSortedInstances;
  78. tolua_property__get_set int maxOccluderTriangles;
  79. tolua_property__get_set int occlusionBufferSize;
  80. tolua_property__get_set float occluderSizeThreshold;
  81. tolua_property__get_set float mobileShadowBiasMul;
  82. tolua_property__get_set float mobileShadowBiasAdd;
  83. tolua_readonly tolua_property__get_set unsigned numViews;
  84. tolua_readonly tolua_property__get_set unsigned numPrimitives;
  85. tolua_readonly tolua_property__get_set unsigned numBatches;
  86. tolua_readonly tolua_property__get_set Zone* defaultZone;
  87. tolua_readonly tolua_property__get_set Material* defaultMaterial;
  88. tolua_readonly tolua_property__get_set Texture2D* defaultLightRamp;
  89. tolua_readonly tolua_property__get_set Texture2D* defaultLightSpot;
  90. };
  91. Renderer* GetRenderer();
  92. tolua_readonly tolua_property__get_set Renderer* renderer;
  93. ${
  94. #define TOLUA_DISABLE_tolua_GraphicsLuaAPI_GetRenderer00
  95. static int tolua_GraphicsLuaAPI_GetRenderer00(lua_State* tolua_S)
  96. {
  97. return ToluaGetSubsystem<Renderer>(tolua_S);
  98. }
  99. #define TOLUA_DISABLE_tolua_get_renderer_ptr
  100. #define tolua_get_renderer_ptr tolua_GraphicsLuaAPI_GetRenderer00
  101. $}