PageRenderTime 33ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/newview/lldrawpoolwater.h

https://bitbucket.org/lindenlab/viewer-beta/
C Header | 92 lines | 49 code | 18 blank | 25 comment | 0 complexity | 0251c000416a6fb9be394e05e10bfce1 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file lldrawpoolwater.h
  3. * @brief LLDrawPoolWater 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_LLDRAWPOOLWATER_H
  27. #define LL_LLDRAWPOOLWATER_H
  28. #include "lldrawpool.h"
  29. class LLFace;
  30. class LLHeavenBody;
  31. class LLWaterSurface;
  32. class LLDrawPoolWater: public LLFacePool
  33. {
  34. protected:
  35. LLPointer<LLViewerTexture> mHBTex[2];
  36. LLPointer<LLViewerTexture> mWaterImagep;
  37. LLPointer<LLViewerTexture> mOpaqueWaterImagep;
  38. LLPointer<LLViewerTexture> mWaterNormp;
  39. public:
  40. static BOOL sSkipScreenCopy;
  41. static BOOL sNeedsReflectionUpdate;
  42. static BOOL sNeedsDistortionUpdate;
  43. static LLVector3 sLightDir;
  44. static LLColor4 sWaterFogColor;
  45. static F32 sWaterFogEnd;
  46. enum
  47. {
  48. VERTEX_DATA_MASK = LLVertexBuffer::MAP_VERTEX |
  49. LLVertexBuffer::MAP_NORMAL |
  50. LLVertexBuffer::MAP_TEXCOORD0
  51. };
  52. virtual U32 getVertexDataMask() { return VERTEX_DATA_MASK; }
  53. LLDrawPoolWater();
  54. /*virtual*/ ~LLDrawPoolWater();
  55. /*virtual*/ LLDrawPool *instancePool();
  56. static void restoreGL();
  57. /*virtual*/ S32 getNumPostDeferredPasses() { return 0; } //getNumPasses(); }
  58. /*virtual*/ void beginPostDeferredPass(S32 pass);
  59. /*virtual*/ void endPostDeferredPass(S32 pass);
  60. /*virtual*/ void renderPostDeferred(S32 pass) { render(pass); }
  61. /*virtual*/ S32 getNumDeferredPasses() { return 1; }
  62. /*virtual*/ void renderDeferred(S32 pass = 0);
  63. /*virtual*/ S32 getNumPasses();
  64. /*virtual*/ void render(S32 pass = 0);
  65. /*virtual*/ void prerender();
  66. /*virtual*/ LLViewerTexture *getDebugTexture();
  67. /*virtual*/ LLColor3 getDebugColor() const; // For AGP debug display
  68. void renderReflection(LLFace* face);
  69. void shade();
  70. protected:
  71. void renderOpaqueLegacyWater();
  72. };
  73. void cgErrorCallback();
  74. #endif // LL_LLDRAWPOOLWATER_H