lldrawpooltree.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /**
  2. * @file lldrawpooltree.h
  3. * @brief LLDrawPoolTree class definition
  4. *
  5. * $LicenseInfo:firstyear=2002&license=viewergpl$
  6. *
  7. * Copyright (c) 2002-2009, Linden Research, Inc.
  8. *
  9. * Second Life Viewer Source Code
  10. * The source code in this file ("Source Code") is provided by Linden Lab
  11. * to you under the terms of the GNU General Public License, version 2.0
  12. * ("GPL"), unless you have obtained a separate licensing agreement
  13. * ("Other License"), formally executed by you and Linden Lab. Terms of
  14. * the GPL can be found in doc/GPL-license.txt in this distribution, or
  15. * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  16. *
  17. * There are special exceptions to the terms and conditions of the GPL as
  18. * it is applied to this Source Code. View the full text of the exception
  19. * in the file doc/FLOSS-exception.txt in this software distribution, or
  20. * online at
  21. * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  22. *
  23. * By copying, modifying or distributing this software, you acknowledge
  24. * that you have read and understood your obligations described above,
  25. * and agree to abide by those obligations.
  26. *
  27. * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  28. * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  29. * COMPLETENESS OR PERFORMANCE.
  30. * $/LicenseInfo$
  31. */
  32. #ifndef LL_LLDRAWPOOLTREE_H
  33. #define LL_LLDRAWPOOLTREE_H
  34. #include "lldrawpool.h"
  35. class LLDrawPoolTree final : public LLFacePool
  36. {
  37. public:
  38. enum
  39. {
  40. VERTEX_DATA_MASK = LLVertexBuffer::MAP_VERTEX |
  41. LLVertexBuffer::MAP_NORMAL |
  42. LLVertexBuffer::MAP_COLOR |
  43. LLVertexBuffer::MAP_TEXCOORD0
  44. };
  45. LL_INLINE U32 getVertexDataMask() override
  46. {
  47. return VERTEX_DATA_MASK;
  48. }
  49. LLDrawPoolTree(LLViewerTexture* texturep);
  50. void prerender() override;
  51. // These three methods are for EE rendering only
  52. void beginRenderPass(S32) override;
  53. void endRenderPass(S32) override;
  54. LL_INLINE void render(S32 pass = 0) override { renderDeferred(pass); }
  55. LL_INLINE S32 getNumDeferredPasses() override { return 1; }
  56. void beginDeferredPass(S32) override;
  57. void endDeferredPass(S32) override;
  58. void renderDeferred(S32 pass) override;
  59. LL_INLINE S32 getNumShadowPasses() override { return 1; }
  60. void beginShadowPass(S32 pass) override;
  61. void endShadowPass(S32 pass) override;
  62. LL_INLINE void renderShadow(S32 pass) override { render(pass); }
  63. LL_INLINE bool verify() const override { return true; }
  64. LL_INLINE LLViewerTexture* getTexture() override { return mTexturep; }
  65. private:
  66. void renderTree();
  67. private:
  68. LLPointer<LLViewerTexture> mTexturep;
  69. };
  70. #endif // LL_LLDRAWPOOLTREE_H