/indra/newview/lldrawpoolterrain.h

https://bitbucket.org/lindenlab/viewer-beta/ · C Header · 88 lines · 50 code · 13 blank · 25 comment · 0 complexity · 16168e26c757c33b1605a1226c3bf620 MD5 · raw file

  1. /**
  2. * @file lldrawpoolterrain.h
  3. * @brief LLDrawPoolTerrain class definition
  4. *
  5. * $LicenseInfo:firstyear=2002&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, Linden Research, Inc.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation;
  12. * version 2.1 of the License only.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  24. * $/LicenseInfo$
  25. */
  26. #ifndef LL_LLDRAWPOOLTERRAIN_H
  27. #define LL_LLDRAWPOOLTERRAIN_H
  28. #include "lldrawpool.h"
  29. class LLDrawPoolTerrain : public LLFacePool
  30. {
  31. LLPointer<LLViewerTexture> mTexturep;
  32. public:
  33. enum
  34. {
  35. VERTEX_DATA_MASK = LLVertexBuffer::MAP_VERTEX |
  36. LLVertexBuffer::MAP_NORMAL |
  37. LLVertexBuffer::MAP_TEXCOORD0 |
  38. LLVertexBuffer::MAP_TEXCOORD1 |
  39. LLVertexBuffer::MAP_TEXCOORD2 |
  40. LLVertexBuffer::MAP_TEXCOORD3
  41. };
  42. virtual U32 getVertexDataMask();
  43. static S32 getDetailMode();
  44. LLDrawPoolTerrain(LLViewerTexture *texturep);
  45. virtual ~LLDrawPoolTerrain();
  46. /*virtual*/ LLDrawPool *instancePool();
  47. /*virtual*/ S32 getNumDeferredPasses() { return 1; }
  48. /*virtual*/ void beginDeferredPass(S32 pass);
  49. /*virtual*/ void endDeferredPass(S32 pass);
  50. /*virtual*/ void renderDeferred(S32 pass);
  51. /*virtual*/ S32 getNumShadowPasses() { return 1; }
  52. /*virtual*/ void beginShadowPass(S32 pass);
  53. /*virtual*/ void endShadowPass(S32 pass);
  54. /*virtual*/ void renderShadow(S32 pass);
  55. /*virtual*/ void render(S32 pass = 0);
  56. /*virtual*/ void prerender();
  57. /*virtual*/ void beginRenderPass( S32 pass );
  58. /*virtual*/ void endRenderPass( S32 pass );
  59. /*virtual*/ void dirtyTextures(const std::set<LLViewerFetchedTexture*>& textures);
  60. /*virtual*/ LLViewerTexture *getTexture();
  61. /*virtual*/ LLViewerTexture *getDebugTexture();
  62. /*virtual*/ LLColor3 getDebugColor() const; // For AGP debug display
  63. LLPointer<LLViewerTexture> mAlphaRampImagep;
  64. LLPointer<LLViewerTexture> m2DAlphaRampImagep;
  65. LLPointer<LLViewerTexture> mAlphaNoiseImagep;
  66. static S32 sDetailMode;
  67. static F32 sDetailScale; // meters per texture
  68. protected:
  69. void renderSimple();
  70. void renderOwnership();
  71. void renderFull2TU();
  72. void renderFull4TU();
  73. void renderFullShader();
  74. };
  75. #endif // LL_LLDRAWPOOLSIMPLE_H