lldrawpoolwlsky.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_DRAWPOOLWLSKY_H
00033 #define LL_DRAWPOOLWLSKY_H
00034 
00035 #include "lldrawpool.h"
00036 
00037 class LLGLSLShader;
00038 
00039 class LLDrawPoolWLSky : public LLDrawPool {
00040 public:
00041 
00042         static const U32 SKY_VERTEX_DATA_MASK = LLVertexBuffer::MAP_VERTEX |
00043                                                         LLVertexBuffer::MAP_TEXCOORD;
00044         static const U32 STAR_VERTEX_DATA_MASK =        LLVertexBuffer::MAP_VERTEX |
00045                                                         LLVertexBuffer::MAP_COLOR;
00046 
00047         LLDrawPoolWLSky(void);
00048         /*virtual*/ ~LLDrawPoolWLSky();
00049 
00050         /*virtual*/ BOOL isDead() { return FALSE; }
00051 
00052         /*virtual*/ LLViewerImage *getDebugTexture();
00053         /*virtual*/ void beginRenderPass( S32 pass );
00054         /*virtual*/ void endRenderPass( S32 pass );
00055         /*virtual*/ S32  getNumPasses() { return 1; }
00056         /*virtual*/ void render(S32 pass = 0);
00057         /*virtual*/ void prerender();
00058         /*virtual*/ U32 getVertexDataMask() { return SKY_VERTEX_DATA_MASK; }
00059         /*virtual*/ BOOL verify() const { return TRUE; }                // Verify that all data in the draw pool is correct!
00060         /*virtual*/ S32 getVertexShaderLevel() const { return mVertexShaderLevel; }
00061         
00062         //static LLDrawPool* createPool(const U32 type, LLViewerImage *tex0 = NULL);
00063 
00064         // Create an empty new instance of the pool.
00065         /*virtual*/ LLDrawPoolWLSky *instancePool();  
00066         /*virtual*/ LLViewerImage* getTexture();
00067         /*virtual*/ BOOL isFacePool() { return FALSE; }
00068         /*virtual*/ void resetDrawOrders();
00069 
00070         static void cleanupGL();
00071         static void restoreGL();
00072 private:
00073         void renderDome(F32 camHeightLocal, LLGLSLShader * shader) const;
00074         void renderSkyHaze(F32 camHeightLocal) const;
00075         void renderStars(void) const;
00076         void renderSkyClouds(F32 camHeightLocal) const;
00077         void renderHeavenlyBodies();
00078 
00079 private:
00080         static LLPointer<LLImageGL> sCloudNoiseTexture;
00081         static LLPointer<LLImageRaw> sCloudNoiseRawImage;
00082 };
00083 
00084 #endif // LL_DRAWPOOLWLSKY_H

Generated on Fri May 16 08:33:20 2008 for SecondLife by  doxygen 1.5.5