Renderer.pkg 4.6 KB

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