Renderer.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529
  1. //
  2. // Copyright (c) 2008-2015 the Urho3D project.
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to deal
  6. // in the Software without restriction, including without limitation the rights
  7. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. // copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. // THE SOFTWARE.
  21. //
  22. #pragma once
  23. #include "../Container/HashSet.h"
  24. #include "../Core/Mutex.h"
  25. #include "../Graphics/Batch.h"
  26. #include "../Graphics/Drawable.h"
  27. #include "../Graphics/Viewport.h"
  28. #include "../Math/Color.h"
  29. namespace Urho3D
  30. {
  31. class Geometry;
  32. class Drawable;
  33. class Light;
  34. class Material;
  35. class Pass;
  36. class Technique;
  37. class Octree;
  38. class Graphics;
  39. class RenderPath;
  40. class RenderSurface;
  41. class ResourceCache;
  42. class Skeleton;
  43. class OcclusionBuffer;
  44. class Texture;
  45. class Texture2D;
  46. class TextureCube;
  47. class View;
  48. class Zone;
  49. static const int SHADOW_MIN_PIXELS = 64;
  50. static const int INSTANCING_BUFFER_DEFAULT_SIZE = 1024;
  51. /// Light vertex shader variations.
  52. enum LightVSVariation
  53. {
  54. LVS_DIR = 0,
  55. LVS_SPOT,
  56. LVS_POINT,
  57. LVS_SHADOW,
  58. LVS_SPOTSHADOW,
  59. LVS_POINTSHADOW,
  60. MAX_LIGHT_VS_VARIATIONS
  61. };
  62. /// Per-vertex light vertex shader variations.
  63. enum VertexLightVSVariation
  64. {
  65. VLVS_NOLIGHTS = 0,
  66. VLVS_1LIGHT,
  67. VLVS_2LIGHTS,
  68. VLVS_3LIGHTS,
  69. VLVS_4LIGHTS,
  70. MAX_VERTEXLIGHT_VS_VARIATIONS
  71. };
  72. /// Light pixel shader variations.
  73. enum LightPSVariation
  74. {
  75. LPS_NONE = 0,
  76. LPS_SPOT,
  77. LPS_POINT,
  78. LPS_POINTMASK,
  79. LPS_SPEC,
  80. LPS_SPOTSPEC,
  81. LPS_POINTSPEC,
  82. LPS_POINTMASKSPEC,
  83. LPS_SHADOW,
  84. LPS_SPOTSHADOW,
  85. LPS_POINTSHADOW,
  86. LPS_POINTMASKSHADOW,
  87. LPS_SHADOWSPEC,
  88. LPS_SPOTSHADOWSPEC,
  89. LPS_POINTSHADOWSPEC,
  90. LPS_POINTMASKSHADOWSPEC,
  91. MAX_LIGHT_PS_VARIATIONS
  92. };
  93. /// Deferred light volume vertex shader variations.
  94. enum DeferredLightVSVariation
  95. {
  96. DLVS_NONE = 0,
  97. DLVS_DIR,
  98. DLVS_ORTHO,
  99. DLVS_ORTHODIR,
  100. MAX_DEFERRED_LIGHT_VS_VARIATIONS
  101. };
  102. /// Deferred light volume pixels shader variations.
  103. enum DeferredLightPSVariation
  104. {
  105. DLPS_NONE = 0,
  106. DLPS_SPOT,
  107. DLPS_POINT,
  108. DLPS_POINTMASK,
  109. DLPS_SPEC,
  110. DLPS_SPOTSPEC,
  111. DLPS_POINTSPEC,
  112. DLPS_POINTMASKSPEC,
  113. DLPS_SHADOW,
  114. DLPS_SPOTSHADOW,
  115. DLPS_POINTSHADOW,
  116. DLPS_POINTMASKSHADOW,
  117. DLPS_SHADOWSPEC,
  118. DLPS_SPOTSHADOWSPEC,
  119. DLPS_POINTSHADOWSPEC,
  120. DLPS_POINTMASKSHADOWSPEC,
  121. DLPS_ORTHO,
  122. DLPS_ORTHOSPOT,
  123. DLPS_ORTHOPOINT,
  124. DLPS_ORTHOPOINTMASK,
  125. DLPS_ORTHOSPEC,
  126. DLPS_ORTHOSPOTSPEC,
  127. DLPS_ORTHOPOINTSPEC,
  128. DLPS_ORTHOPOINTMASKSPEC,
  129. DLPS_ORTHOSHADOW,
  130. DLPS_ORTHOSPOTSHADOW,
  131. DLPS_ORTHOPOINTSHADOW,
  132. DLPS_ORTHOPOINTMASKSHADOW,
  133. DLPS_ORTHOSHADOWSPEC,
  134. DLPS_ORTHOSPOTSHADOWSPEC,
  135. DLPS_ORTHOPOINTSHADOWSPEC,
  136. DLPS_ORTHOPOINTMASKSHADOWSPEC,
  137. MAX_DEFERRED_LIGHT_PS_VARIATIONS
  138. };
  139. /// High-level rendering subsystem. Manages drawing of 3D views.
  140. class URHO3D_API Renderer : public Object
  141. {
  142. URHO3D_OBJECT(Renderer, Object);
  143. public:
  144. /// Construct.
  145. Renderer(Context* context);
  146. /// Destruct.
  147. virtual ~Renderer();
  148. /// Set number of backbuffer viewports to render.
  149. void SetNumViewports(unsigned num);
  150. /// Set a backbuffer viewport.
  151. void SetViewport(unsigned index, Viewport* viewport);
  152. /// Set default renderpath.
  153. void SetDefaultRenderPath(RenderPath* renderPath);
  154. /// Set default renderpath from an XML file.
  155. void SetDefaultRenderPath(XMLFile* file);
  156. /// Set HDR rendering on/off.
  157. void SetHDRRendering(bool enable);
  158. /// Set specular lighting on/off.
  159. void SetSpecularLighting(bool enable);
  160. /// Set texture anisotropy.
  161. void SetTextureAnisotropy(int level);
  162. /// Set texture filtering.
  163. void SetTextureFilterMode(TextureFilterMode mode);
  164. /// Set texture quality level. See the QUALITY constants in GraphicsDefs.h.
  165. void SetTextureQuality(int quality);
  166. /// Set material quality level. See the QUALITY constants in GraphicsDefs.h.
  167. void SetMaterialQuality(int quality);
  168. /// Set shadows on/off.
  169. void SetDrawShadows(bool enable);
  170. /// Set shadow map resolution.
  171. void SetShadowMapSize(int size);
  172. /// Set shadow quality mode. See the SHADOWQUALITY constants in GraphicsDefs.h.
  173. void SetShadowQuality(int quality);
  174. /// Set reuse of shadow maps. Default is true. If disabled, also transparent geometry can be shadowed.
  175. void SetReuseShadowMaps(bool enable);
  176. /// Set maximum number of shadow maps created for one resolution. Only has effect if reuse of shadow maps is disabled.
  177. void SetMaxShadowMaps(int shadowMaps);
  178. /// Set dynamic instancing on/off.
  179. void SetDynamicInstancing(bool enable);
  180. /// Set minimum number of instances required in a batch group to render as instanced.
  181. void SetMinInstances(int instances);
  182. /// Set maximum number of sorted instances per batch group. If exceeded, instances are rendered unsorted.
  183. void SetMaxSortedInstances(int instances);
  184. /// Set maximum number of occluder triangles.
  185. void SetMaxOccluderTriangles(int triangles);
  186. /// Set occluder buffer width.
  187. void SetOcclusionBufferSize(int size);
  188. /// Set required screen size (1.0 = full screen) for occluders.
  189. void SetOccluderSizeThreshold(float screenSize);
  190. /// Set whether to thread occluder rendering. Default false.
  191. void SetThreadedOcclusion(bool enable);
  192. /// Set shadow depth bias multiplier for mobile platforms (OpenGL ES.) No effect on desktops. Default 2.
  193. void SetMobileShadowBiasMul(float mul);
  194. /// Set shadow depth bias addition for mobile platforms (OpenGL ES.) No effect on desktops. Default 0.0001.
  195. void SetMobileShadowBiasAdd(float add);
  196. /// Force reload of shaders.
  197. void ReloadShaders();
  198. /// Return number of backbuffer viewports.
  199. unsigned GetNumViewports() const { return viewports_.Size(); }
  200. /// Return backbuffer viewport by index.
  201. Viewport* GetViewport(unsigned index) const;
  202. /// Return default renderpath.
  203. RenderPath* GetDefaultRenderPath() const;
  204. /// Return whether HDR rendering is enabled.
  205. bool GetHDRRendering() const { return hdrRendering_; }
  206. /// Return whether specular lighting is enabled.
  207. bool GetSpecularLighting() const { return specularLighting_; }
  208. /// Return whether drawing shadows is enabled.
  209. bool GetDrawShadows() const { return drawShadows_; }
  210. /// Return texture anisotropy.
  211. int GetTextureAnisotropy() const { return textureAnisotropy_; }
  212. /// Return texture filtering.
  213. TextureFilterMode GetTextureFilterMode() const { return textureFilterMode_; }
  214. /// Return texture quality level.
  215. int GetTextureQuality() const { return textureQuality_; }
  216. /// Return material quality level.
  217. int GetMaterialQuality() const { return materialQuality_; }
  218. /// Return shadow map resolution.
  219. int GetShadowMapSize() const { return shadowMapSize_; }
  220. /// Return shadow quality.
  221. int GetShadowQuality() const { return shadowQuality_; }
  222. /// Return whether shadow maps are reused.
  223. bool GetReuseShadowMaps() const { return reuseShadowMaps_; }
  224. /// Return maximum number of shadow maps per resolution.
  225. int GetMaxShadowMaps() const { return maxShadowMaps_; }
  226. /// Return whether dynamic instancing is in use.
  227. bool GetDynamicInstancing() const { return dynamicInstancing_; }
  228. /// Return minimum number of instances required in a batch group to render as instanced.
  229. int GetMinInstances() const { return minInstances_; }
  230. /// Return maximum number of sorted instances per batch group.
  231. int GetMaxSortedInstances() const { return maxSortedInstances_; }
  232. /// Return maximum number of occluder triangles.
  233. int GetMaxOccluderTriangles() const { return maxOccluderTriangles_; }
  234. /// Return occlusion buffer width.
  235. int GetOcclusionBufferSize() const { return occlusionBufferSize_; }
  236. /// Return occluder screen size threshold.
  237. float GetOccluderSizeThreshold() const { return occluderSizeThreshold_; }
  238. /// Return whether occlusion rendering is threaded.
  239. bool GetThreadedOcclusion() const { return threadedOcclusion_; }
  240. /// Return shadow depth bias multiplier for mobile platforms.
  241. float GetMobileShadowBiasMul() const { return mobileShadowBiasMul_; }
  242. /// Return shadow depth bias addition for mobile platforms.
  243. float GetMobileShadowBiasAdd() const { return mobileShadowBiasAdd_; }
  244. /// Return number of views rendered.
  245. unsigned GetNumViews() const { return views_.Size(); }
  246. /// Return number of primitives rendered.
  247. unsigned GetNumPrimitives() const { return numPrimitives_; }
  248. /// Return number of batches rendered.
  249. unsigned GetNumBatches() const { return numBatches_; }
  250. /// Return number of geometries rendered.
  251. unsigned GetNumGeometries(bool allViews = false) const;
  252. /// Return number of lights rendered.
  253. unsigned GetNumLights(bool allViews = false) const;
  254. /// Return number of shadow maps rendered.
  255. unsigned GetNumShadowMaps(bool allViews = false) const;
  256. /// Return number of occluders rendered.
  257. unsigned GetNumOccluders(bool allViews = false) const;
  258. /// Return the default zone.
  259. Zone* GetDefaultZone() const { return defaultZone_; }
  260. /// Return the default material.
  261. Material* GetDefaultMaterial() const { return defaultMaterial_; }
  262. /// Return the default range attenuation texture.
  263. Texture2D* GetDefaultLightRamp() const { return defaultLightRamp_; }
  264. /// Return the default spotlight attenuation texture.
  265. Texture2D* GetDefaultLightSpot() const { return defaultLightSpot_; }
  266. /// Return the shadowed pointlight face selection cube map.
  267. TextureCube* GetFaceSelectCubeMap() const { return faceSelectCubeMap_; }
  268. /// Return the shadowed pointlight indirection cube map.
  269. TextureCube* GetIndirectionCubeMap() const { return indirectionCubeMap_; }
  270. /// Return the instancing vertex buffer
  271. VertexBuffer* GetInstancingBuffer() const { return dynamicInstancing_ ? instancingBuffer_ : (VertexBuffer*)0; }
  272. /// Return the frame update parameters.
  273. const FrameInfo& GetFrameInfo() const { return frame_; }
  274. /// Update for rendering. Called by HandleRenderUpdate().
  275. void Update(float timeStep);
  276. /// Render. Called by Engine.
  277. void Render();
  278. /// Add debug geometry to the debug renderer.
  279. void DrawDebugGeometry(bool depthTest);
  280. /// Queue a render surface's viewports for rendering. Called by the surface, or by View.
  281. void QueueRenderSurface(RenderSurface* renderTarget);
  282. /// Queue a viewport for rendering. Null surface means backbuffer.
  283. void QueueViewport(RenderSurface* renderTarget, Viewport* viewport);
  284. /// Return volume geometry for a light.
  285. Geometry* GetLightGeometry(Light* light);
  286. /// Return quad geometry used in postprocessing.
  287. Geometry* GetQuadGeometry();
  288. /// Allocate a shadow map. If shadow map reuse is disabled, a different map is returned each time.
  289. Texture2D* GetShadowMap(Light* light, Camera* camera, unsigned viewWidth, unsigned viewHeight);
  290. /// Allocate a rendertarget or depth-stencil texture for deferred rendering or postprocessing. Should only be called during actual rendering, not before.
  291. Texture* GetScreenBuffer
  292. (int width, int height, unsigned format, bool cubemap, bool filtered, bool srgb, unsigned persistentKey = 0);
  293. /// Allocate a depth-stencil surface that does not need to be readable. Should only be called during actual rendering, not before.
  294. RenderSurface* GetDepthStencil(int width, int height);
  295. /// Allocate an occlusion buffer.
  296. OcclusionBuffer* GetOcclusionBuffer(Camera* camera);
  297. /// Allocate a temporary shadow camera and a scene node for it. Is thread-safe.
  298. Camera* GetShadowCamera();
  299. /// Mark a view as prepared by the specified culling camera.
  300. void StorePreparedView(View* view, Camera* cullCamera);
  301. /// Return a prepared view if exists for the specified camera. Used to avoid duplicate view preparation CPU work.
  302. View* GetPreparedView(Camera* cullCamera);
  303. /// Choose shaders for a forward rendering batch.
  304. void SetBatchShaders(Batch& batch, Technique* tech, bool allowShadows = true);
  305. /// Choose shaders for a deferred light volume batch.
  306. void SetLightVolumeBatchShaders
  307. (Batch& batch, Camera* camera, const String& vsName, const String& psName, const String& vsDefines, const String& psDefines);
  308. /// Set cull mode while taking possible projection flipping into account.
  309. void SetCullMode(CullMode mode, Camera* camera);
  310. /// Ensure sufficient size of the instancing vertex buffer. Return true if successful.
  311. bool ResizeInstancingBuffer(unsigned numInstances);
  312. /// Save the screen buffer allocation status. Called by View.
  313. void SaveScreenBufferAllocations();
  314. /// Restore the screen buffer allocation status. Called by View.
  315. void RestoreScreenBufferAllocations();
  316. /// Optimize a light by scissor rectangle.
  317. void OptimizeLightByScissor(Light* light, Camera* camera);
  318. /// Optimize a light by marking it to the stencil buffer and setting a stencil test.
  319. void OptimizeLightByStencil(Light* light, Camera* camera);
  320. /// Return a scissor rectangle for a light.
  321. const Rect& GetLightScissor(Light* light, Camera* camera);
  322. /// Return a view or its source view if it uses one. Used internally for render statistics.
  323. static View* GetActualView(View* view);
  324. private:
  325. /// Initialize when screen mode initially set.
  326. void Initialize();
  327. /// Reload shaders.
  328. void LoadShaders();
  329. /// Reload shaders for a material pass.
  330. void LoadPassShaders(Pass* pass);
  331. /// Release shaders used in materials.
  332. void ReleaseMaterialShaders();
  333. /// Reload textures.
  334. void ReloadTextures();
  335. /// Create light volume geometries.
  336. void CreateGeometries();
  337. /// Create instancing vertex buffer.
  338. void CreateInstancingBuffer();
  339. /// Create point light shadow indirection texture data.
  340. void SetIndirectionTextureData();
  341. /// Prepare for rendering of a new view.
  342. void PrepareViewRender();
  343. /// Remove unused occlusion and screen buffers.
  344. void RemoveUnusedBuffers();
  345. /// Reset shadow map allocation counts.
  346. void ResetShadowMapAllocations();
  347. /// Reset screem buffer allocation counts.
  348. void ResetScreenBufferAllocations();
  349. /// Remove all shadow maps. Called when global shadow map resolution or format is changed.
  350. void ResetShadowMaps();
  351. /// Remove all occlusion and screen buffers.
  352. void ResetBuffers();
  353. /// Handle screen mode event.
  354. void HandleScreenMode(StringHash eventType, VariantMap& eventData);
  355. /// Handle render update event.
  356. void HandleRenderUpdate(StringHash eventType, VariantMap& eventData);
  357. /// Graphics subsystem.
  358. WeakPtr<Graphics> graphics_;
  359. /// Default renderpath.
  360. SharedPtr<RenderPath> defaultRenderPath_;
  361. /// Default zone.
  362. SharedPtr<Zone> defaultZone_;
  363. /// Directional light quad geometry.
  364. SharedPtr<Geometry> dirLightGeometry_;
  365. /// Spot light volume geometry.
  366. SharedPtr<Geometry> spotLightGeometry_;
  367. /// Point light volume geometry.
  368. SharedPtr<Geometry> pointLightGeometry_;
  369. /// Instance stream vertex buffer.
  370. SharedPtr<VertexBuffer> instancingBuffer_;
  371. /// Default material.
  372. SharedPtr<Material> defaultMaterial_;
  373. /// Default range attenuation texture.
  374. SharedPtr<Texture2D> defaultLightRamp_;
  375. /// Default spotlight attenuation texture.
  376. SharedPtr<Texture2D> defaultLightSpot_;
  377. /// Face selection cube map for shadowed pointlights.
  378. SharedPtr<TextureCube> faceSelectCubeMap_;
  379. /// Indirection cube map for shadowed pointlights.
  380. SharedPtr<TextureCube> indirectionCubeMap_;
  381. /// Reusable scene nodes with shadow camera components.
  382. Vector<SharedPtr<Node> > shadowCameraNodes_;
  383. /// Reusable occlusion buffers.
  384. Vector<SharedPtr<OcclusionBuffer> > occlusionBuffers_;
  385. /// Shadow maps by resolution.
  386. HashMap<int, Vector<SharedPtr<Texture2D> > > shadowMaps_;
  387. /// Shadow map dummy color buffers by resolution.
  388. HashMap<int, SharedPtr<Texture2D> > colorShadowMaps_;
  389. /// Shadow map allocations by resolution.
  390. HashMap<int, PODVector<Light*> > shadowMapAllocations_;
  391. /// Screen buffers by resolution and format.
  392. HashMap<long long, Vector<SharedPtr<Texture> > > screenBuffers_;
  393. /// Current screen buffer allocations by resolution and format.
  394. HashMap<long long, unsigned> screenBufferAllocations_;
  395. /// Saved status of screen buffer allocations for restoring.
  396. HashMap<long long, unsigned> savedScreenBufferAllocations_;
  397. /// Cache for light scissor queries.
  398. HashMap<Pair<Light*, Camera*>, Rect> lightScissorCache_;
  399. /// Backbuffer viewports.
  400. Vector<SharedPtr<Viewport> > viewports_;
  401. /// Render surface viewports queued for update.
  402. Vector<Pair<WeakPtr<RenderSurface>, WeakPtr<Viewport> > > queuedViewports_;
  403. /// Views that have been processed this frame.
  404. Vector<WeakPtr<View> > views_;
  405. /// Prepared views by culling camera.
  406. HashMap<Camera*, WeakPtr<View> > preparedViews_;
  407. /// Octrees that have been updated during the frame.
  408. HashSet<Octree*> updatedOctrees_;
  409. /// Techniques for which missing shader error has been displayed.
  410. HashSet<Technique*> shaderErrorDisplayed_;
  411. /// Mutex for shadow camera allocation.
  412. Mutex rendererMutex_;
  413. /// Current variation names for deferred light volume shaders.
  414. Vector<String> deferredLightPSVariations_;
  415. /// Frame info for rendering.
  416. FrameInfo frame_;
  417. /// Texture anisotropy level.
  418. int textureAnisotropy_;
  419. /// Texture filtering mode.
  420. TextureFilterMode textureFilterMode_;
  421. /// Texture quality level.
  422. int textureQuality_;
  423. /// Material quality level.
  424. int materialQuality_;
  425. /// Shadow map resolution.
  426. int shadowMapSize_;
  427. /// Shadow quality.
  428. int shadowQuality_;
  429. /// Maximum number of shadow maps per resolution.
  430. int maxShadowMaps_;
  431. /// Minimum number of instances required in a batch group to render as instanced.
  432. int minInstances_;
  433. /// Maximum sorted instances per batch group.
  434. int maxSortedInstances_;
  435. /// Maximum occluder triangles.
  436. int maxOccluderTriangles_;
  437. /// Occlusion buffer width.
  438. int occlusionBufferSize_;
  439. /// Occluder screen size threshold.
  440. float occluderSizeThreshold_;
  441. /// Mobile platform shadow depth bias multiplier.
  442. float mobileShadowBiasMul_;
  443. /// Mobile platform shadow depth bias addition.
  444. float mobileShadowBiasAdd_;
  445. /// Number of occlusion buffers in use.
  446. unsigned numOcclusionBuffers_;
  447. /// Number of temporary shadow cameras in use.
  448. unsigned numShadowCameras_;
  449. /// Number of primitives (3D geometry only.)
  450. unsigned numPrimitives_;
  451. /// Number of batches (3D geometry only.)
  452. unsigned numBatches_;
  453. /// Frame number on which shaders last changed.
  454. unsigned shadersChangedFrameNumber_;
  455. /// Current stencil value for light optimization.
  456. unsigned char lightStencilValue_;
  457. /// HDR rendering flag.
  458. bool hdrRendering_;
  459. /// Specular lighting flag.
  460. bool specularLighting_;
  461. /// Draw shadows flag.
  462. bool drawShadows_;
  463. /// Shadow map reuse flag.
  464. bool reuseShadowMaps_;
  465. /// Dynamic instancing flag.
  466. bool dynamicInstancing_;
  467. /// Threaded occlusion rendering flag.
  468. bool threadedOcclusion_;
  469. /// Shaders need reloading flag.
  470. bool shadersDirty_;
  471. /// Initialized flag.
  472. bool initialized_;
  473. /// Flag for views needing reset.
  474. bool resetViews_;
  475. };
  476. }