aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/pipeline.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:34 -0500
committerJacek Antonelli2008-08-15 23:45:34 -0500
commitcd17687f01420952712a500107e0f93e7ab8d5f8 (patch)
treece48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/newview/pipeline.h
parentSecond Life viewer sources 1.19.0.5 (diff)
downloadmeta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz
Second Life viewer sources 1.19.1.0
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/pipeline.h202
1 files changed, 107 insertions, 95 deletions
diff --git a/linden/indra/newview/pipeline.h b/linden/indra/newview/pipeline.h
index 9b0706f..0e3e1c0 100644
--- a/linden/indra/newview/pipeline.h
+++ b/linden/indra/newview/pipeline.h
@@ -32,20 +32,20 @@
32#ifndef LL_PIPELINE_H 32#ifndef LL_PIPELINE_H
33#define LL_PIPELINE_H 33#define LL_PIPELINE_H
34 34
35#include "llerror.h"
35#include "lldarrayptr.h" 36#include "lldarrayptr.h"
36#include "lldqueueptr.h" 37#include "lldqueueptr.h"
37#include "llstat.h" 38#include "llstat.h"
38#include "lllinkedqueue.h"
39#include "llskiplist.h"
40#include "lldrawpool.h" 39#include "lldrawpool.h"
41#include "llspatialpartition.h" 40#include "llspatialpartition.h"
42#include "m4math.h" 41#include "m4math.h"
43#include "llmemory.h" 42#include "llmemory.h"
44#include "lldrawpool.h" 43#include "lldrawpool.h"
45#include "llgl.h" 44#include "llgl.h"
45#include "lldrawable.h"
46#include "llrendertarget.h"
46 47
47class LLViewerImage; 48class LLViewerImage;
48class LLDrawable;
49class LLEdge; 49class LLEdge;
50class LLFace; 50class LLFace;
51class LLViewerObject; 51class LLViewerObject;
@@ -54,6 +54,8 @@ class LLDisplayPrimitive;
54class LLTextureEntry; 54class LLTextureEntry;
55class LLRenderFunc; 55class LLRenderFunc;
56class LLCubeMap; 56class LLCubeMap;
57class LLCullResult;
58class LLVOAvatar;
57 59
58typedef enum e_avatar_skinning_method 60typedef enum e_avatar_skinning_method
59{ 61{
@@ -65,6 +67,11 @@ BOOL compute_min_max(LLMatrix4& box, LLVector2& min, LLVector2& max); // Shouldn
65bool LLRayAABB(const LLVector3 &center, const LLVector3 &size, const LLVector3& origin, const LLVector3& dir, LLVector3 &coord, F32 epsilon = 0); 67bool LLRayAABB(const LLVector3 &center, const LLVector3 &size, const LLVector3& origin, const LLVector3& dir, LLVector3 &coord, F32 epsilon = 0);
66BOOL LLLineSegmentAABB(const LLVector3& start, const LLVector3& end, const LLVector3& center, const LLVector3& size); 68BOOL LLLineSegmentAABB(const LLVector3& start, const LLVector3& end, const LLVector3& center, const LLVector3& size);
67BOOL setup_hud_matrices(BOOL for_select); 69BOOL setup_hud_matrices(BOOL for_select);
70glh::matrix4f glh_get_current_modelview();
71void glh_set_current_modelview(glh::matrix4f& mat);
72glh::matrix4f glh_get_current_projection();
73void glh_set_current_projection(glh::matrix4f& mat);
74glh::matrix4f gl_ortho(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat znear, GLfloat zfar);
68 75
69class LLPipeline 76class LLPipeline
70{ 77{
@@ -75,16 +82,23 @@ public:
75 void destroyGL(); 82 void destroyGL();
76 void restoreGL(); 83 void restoreGL();
77 void resetVertexBuffers(); 84 void resetVertexBuffers();
85 void resizeScreenTexture();
78 void releaseGLBuffers(); 86 void releaseGLBuffers();
87 void createGLBuffers();
88
79 void resetVertexBuffers(LLDrawable* drawable); 89 void resetVertexBuffers(LLDrawable* drawable);
80 void setUseVBO(BOOL use_vbo); 90 void setUseVBO(BOOL use_vbo);
81 void generateReflectionMap(LLCubeMap* cube_map, LLCamera& camera, GLsizei res); 91 void generateImpostor(LLVOAvatar* avatar);
82 void blurReflectionMap(LLCubeMap* cube_in, LLCubeMap* cube_out, U32 res); 92 void generateReflectionMap(LLCubeMap* cube_map, LLCamera& camera);
93 void blurReflectionMap(LLCubeMap* cube_in, LLCubeMap* cube_out);
83 void bindScreenToTexture(); 94 void bindScreenToTexture();
84 void renderBloom(GLuint source, GLuint dest, GLuint buffer, U32 res, LLVector2 tc1, LLVector2 tc2); 95 void renderBloom(BOOL for_snapshot);
96
97 LLCubeMap* findReflectionMap(const LLVector3& location);
85 98
86 void init(); 99 void init();
87 void cleanup(); 100 void cleanup();
101 BOOL isInit() { return mInitialized; };
88 102
89 /// @brief Get a draw pool from pool type (POOL_SIMPLE, POOL_MEDIA) and texture. 103 /// @brief Get a draw pool from pool type (POOL_SIMPLE, POOL_MEDIA) and texture.
90 /// @return Draw pool, or NULL if not found. 104 /// @return Draw pool, or NULL if not found.
@@ -107,14 +121,14 @@ public:
107 121
108 // Object related methods 122 // Object related methods
109 void markVisible(LLDrawable *drawablep, LLCamera& camera); 123 void markVisible(LLDrawable *drawablep, LLCamera& camera);
124 void markOccluder(LLSpatialGroup* group);
110 void doOcclusion(LLCamera& camera); 125 void doOcclusion(LLCamera& camera);
111 void markNotCulled(LLSpatialGroup* group, LLCamera &camera, BOOL active = FALSE); 126 void markNotCulled(LLSpatialGroup* group, LLCamera &camera);
112 void markMoved(LLDrawable *drawablep, BOOL damped_motion = FALSE); 127 void markMoved(LLDrawable *drawablep, BOOL damped_motion = FALSE);
113 void markShift(LLDrawable *drawablep); 128 void markShift(LLDrawable *drawablep);
114 void markTextured(LLDrawable *drawablep); 129 void markTextured(LLDrawable *drawablep);
115 void markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag = LLDrawable::REBUILD_ALL, BOOL priority = FALSE); 130 void markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag = LLDrawable::REBUILD_ALL, BOOL priority = FALSE);
116 void markRelight(LLDrawable *drawablep, const BOOL now = FALSE); 131
117
118 //get the object between start and end that's closest to start. Return the point of collision in collision. 132 //get the object between start and end that's closest to start. Return the point of collision in collision.
119 LLViewerObject* pickObject(const LLVector3 &start, const LLVector3 &end, LLVector3 &collision); 133 LLViewerObject* pickObject(const LLVector3 &start, const LLVector3 &end, LLVector3 &collision);
120 134
@@ -136,7 +150,9 @@ public:
136 void setUseVertexShaders(BOOL use_shaders); 150 void setUseVertexShaders(BOOL use_shaders);
137 BOOL getUseVertexShaders() const { return mVertexShadersEnabled; } 151 BOOL getUseVertexShaders() const { return mVertexShadersEnabled; }
138 BOOL canUseVertexShaders(); 152 BOOL canUseVertexShaders();
139 153 BOOL canUseWindLightShaders() const;
154 BOOL canUseWindLightShadersOnObjects() const;
155
140 // phases 156 // phases
141 void resetFrameStats(); 157 void resetFrameStats();
142 158
@@ -144,26 +160,29 @@ public:
144 void updateMoveNormalAsync(LLDrawable* drawablep); 160 void updateMoveNormalAsync(LLDrawable* drawablep);
145 void updateMovedList(LLDrawable::drawable_vector_t& move_list); 161 void updateMovedList(LLDrawable::drawable_vector_t& move_list);
146 void updateMove(); 162 void updateMove();
147 void updateCull(LLCamera& camera); 163 void updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip = 0); //if water_clip is 0, ignore water plane, 1, cull to above plane, -1, cull to below plane
148 void updateGeom(F32 max_dtime); 164 void updateGeom(F32 max_dtime);
149 165
150 //calculate pixel area of given box from vantage point of given camera 166 //calculate pixel area of given box from vantage point of given camera
151 static F32 calcPixelArea(LLVector3 center, LLVector3 size, LLCamera& camera); 167 static F32 calcPixelArea(LLVector3 center, LLVector3 size, LLCamera& camera);
152 168
153 void stateSort(LLCamera& camera); 169 void stateSort(LLCamera& camera, LLCullResult& result);
154 void stateSort(LLSpatialGroup* group, LLCamera& camera); 170 void stateSort(LLSpatialGroup* group, LLCamera& camera);
155 void stateSort(LLSpatialBridge* bridge, LLCamera& camera); 171 void stateSort(LLSpatialBridge* bridge, LLCamera& camera);
156 void stateSort(LLDrawable* drawablep, LLCamera& camera); 172 void stateSort(LLDrawable* drawablep, LLCamera& camera);
157 void postSort(LLCamera& camera); 173 void postSort(LLCamera& camera);
158 void forAllDrawables(LLSpatialGroup::sg_vector_t& groups, void (*func)(LLDrawable*));
159 void forAllVisibleDrawables(void (*func)(LLDrawable*)); 174 void forAllVisibleDrawables(void (*func)(LLDrawable*));
160 175
161 void renderObjects(U32 type, U32 mask, BOOL texture = TRUE); 176 void renderObjects(U32 type, U32 mask, BOOL texture = TRUE);
177 void renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL texture);
162 178
163 void renderGeom(LLCamera& camera); 179 void grabReferences(LLCullResult& result);
180
181 void renderGeom(LLCamera& camera, BOOL forceVBOUpdate = FALSE);
182 void processImagery(LLCamera& camera);
183 void generateWaterReflection(LLCamera& camera);
164 void renderHighlights(); 184 void renderHighlights();
165 void renderDebug(); 185 void renderDebug();
166 void processOcclusion(LLCamera& camera);
167 186
168 void renderForSelect(std::set<LLViewerObject*>& objects); 187 void renderForSelect(std::set<LLViewerObject*>& objects);
169 void renderFaceForUVSelect(LLFace* facep); 188 void renderFaceForUVSelect(LLFace* facep);
@@ -172,29 +191,33 @@ public:
172 void findReferences(LLDrawable *drawablep); // Find the lists which have references to this object 191 void findReferences(LLDrawable *drawablep); // Find the lists which have references to this object
173 BOOL verify(); // Verify that all data in the pipeline is "correct" 192 BOOL verify(); // Verify that all data in the pipeline is "correct"
174 193
175 S32 getVisibleCount() const { return mVisibleList.size(); }
176 S32 getLightCount() const { return mLights.size(); } 194 S32 getLightCount() const { return mLights.size(); }
177 195
178 void calcNearbyLights(LLCamera& camera); 196 void calcNearbyLights(LLCamera& camera);
179 void setupHWLights(LLDrawPool* pool); 197 void setupHWLights(LLDrawPool* pool);
180 void setupAvatarLights(BOOL for_edit = FALSE); 198 void setupAvatarLights(BOOL for_edit = FALSE);
181 void enableLights(U32 mask, F32 shadow_factor); 199 void enableLights(U32 mask);
182 void enableLightsStatic(F32 shadow_factor); 200 void enableLightsStatic();
183 void enableLightsDynamic(F32 shadow_factor); 201 void enableLightsDynamic();
184 void enableLightsAvatar(F32 shadow_factor); 202 void enableLightsAvatar();
185 void enableLightsAvatarEdit(const LLColor4& color); 203 void enableLightsAvatarEdit(const LLColor4& color);
186 void enableLightsFullbright(const LLColor4& color); 204 void enableLightsFullbright(const LLColor4& color);
187 void disableLights(); 205 void disableLights();
188 void setAmbient(const LLColor4& ambient);
189 206
190 void shiftObjects(const LLVector3 &offset); 207 void shiftObjects(const LLVector3 &offset);
191 208
192 void setLight(LLDrawable *drawablep, BOOL is_light); 209 void setLight(LLDrawable *drawablep, BOOL is_light);
193 void setActive(LLDrawable *drawablep, BOOL active); 210 void setActive(LLDrawable *drawablep, BOOL active);
194 211
212 BOOL hasRenderBatches(const U32 type) const;
213 LLCullResult::drawinfo_list_t::iterator beginRenderMap(U32 type);
214 LLCullResult::drawinfo_list_t::iterator endRenderMap(U32 type);
215 LLCullResult::sg_list_t::iterator beginAlphaGroups();
216 LLCullResult::sg_list_t::iterator endAlphaGroups();
217
218 void addTrianglesDrawn(S32 count);
195 BOOL hasRenderType(const U32 type) const { return (type && (mRenderTypeMask & (1<<type))) ? TRUE : FALSE; } 219 BOOL hasRenderType(const U32 type) const { return (type && (mRenderTypeMask & (1<<type))) ? TRUE : FALSE; }
196 BOOL hasRenderDebugFeatureMask(const U32 mask) const { return (mRenderDebugFeatureMask & mask) ? TRUE : FALSE; } 220 BOOL hasRenderDebugFeatureMask(const U32 mask) const { return (mRenderDebugFeatureMask & mask) ? TRUE : FALSE; }
197 BOOL hasRenderFeatureMask(const U32 mask) const { return (mRenderFeatureMask & mask) ? TRUE : FALSE; }
198 BOOL hasRenderDebugMask(const U32 mask) const { return (mRenderDebugMask & mask) ? TRUE : FALSE; } 221 BOOL hasRenderDebugMask(const U32 mask) const { return (mRenderDebugMask & mask) ? TRUE : FALSE; }
199 void setRenderTypeMask(const U32 mask) { mRenderTypeMask = mask; } 222 void setRenderTypeMask(const U32 mask) { mRenderTypeMask = mask; }
200 U32 getRenderTypeMask() const { return mRenderTypeMask; } 223 U32 getRenderTypeMask() const { return mRenderTypeMask; }
@@ -240,13 +263,12 @@ public:
240 static BOOL getProcessBeacons(void* data); 263 static BOOL getProcessBeacons(void* data);
241 264
242private: 265private:
243 void initShaders(BOOL force);
244 void unloadShaders(); 266 void unloadShaders();
245 BOOL loadShaders();
246 void saveVertexShaderLevel(S32 type, S32 level, S32 max);
247 void addToQuickLookup( LLDrawPool* new_poolp ); 267 void addToQuickLookup( LLDrawPool* new_poolp );
248 void removeFromQuickLookup( LLDrawPool* poolp ); 268 void removeFromQuickLookup( LLDrawPool* poolp );
249 BOOL updateDrawableGeom(LLDrawable* drawable, BOOL priority); 269 BOOL updateDrawableGeom(LLDrawable* drawable, BOOL priority);
270 void assertInitializedDoError();
271 bool assertInitialized() { const bool is_init = isInit(); if (!is_init) assertInitializedDoError(); return is_init; };
250 272
251public: 273public:
252 enum {GPU_CLASS_MAX = 3 }; 274 enum {GPU_CLASS_MAX = 3 };
@@ -255,17 +277,18 @@ public:
255 { 277 {
256 // Following are pool types (some are also object types) 278 // Following are pool types (some are also object types)
257 RENDER_TYPE_SKY = LLDrawPool::POOL_SKY, 279 RENDER_TYPE_SKY = LLDrawPool::POOL_SKY,
258 RENDER_TYPE_STARS = LLDrawPool::POOL_STARS, 280 RENDER_TYPE_WL_SKY = LLDrawPool::POOL_WL_SKY,
259 RENDER_TYPE_GROUND = LLDrawPool::POOL_GROUND, 281 RENDER_TYPE_GROUND = LLDrawPool::POOL_GROUND,
260 RENDER_TYPE_TERRAIN = LLDrawPool::POOL_TERRAIN, 282 RENDER_TYPE_TERRAIN = LLDrawPool::POOL_TERRAIN,
261 RENDER_TYPE_SIMPLE = LLDrawPool::POOL_SIMPLE, 283 RENDER_TYPE_SIMPLE = LLDrawPool::POOL_SIMPLE,
262 RENDER_TYPE_BUMP = LLDrawPool::POOL_BUMP, 284 RENDER_TYPE_BUMP = LLDrawPool::POOL_BUMP,
263 RENDER_TYPE_AVATAR = LLDrawPool::POOL_AVATAR, 285 RENDER_TYPE_AVATAR = LLDrawPool::POOL_AVATAR,
264 RENDER_TYPE_TREE = LLDrawPool::POOL_TREE, 286 RENDER_TYPE_TREE = LLDrawPool::POOL_TREE,
287 RENDER_TYPE_INVISIBLE = LLDrawPool::POOL_INVISIBLE,
265 RENDER_TYPE_WATER = LLDrawPool::POOL_WATER, 288 RENDER_TYPE_WATER = LLDrawPool::POOL_WATER,
266 RENDER_TYPE_ALPHA = LLDrawPool::POOL_ALPHA, 289 RENDER_TYPE_ALPHA = LLDrawPool::POOL_ALPHA,
267 RENDER_TYPE_GLOW = LLDrawPool::POOL_GLOW, 290 RENDER_TYPE_GLOW = LLDrawPool::POOL_GLOW,
268 291
269 // Following are object types (only used in drawable mRenderType) 292 // Following are object types (only used in drawable mRenderType)
270 RENDER_TYPE_HUD = LLDrawPool::NUM_POOL_TYPES, 293 RENDER_TYPE_HUD = LLDrawPool::NUM_POOL_TYPES,
271 RENDER_TYPE_VOLUME, 294 RENDER_TYPE_VOLUME,
@@ -288,58 +311,30 @@ public:
288 RENDER_DEBUG_FEATURE_FOOT_SHADOWS = 0x0100, 311 RENDER_DEBUG_FEATURE_FOOT_SHADOWS = 0x0100,
289 }; 312 };
290 313
291 enum LLRenderFeatureMask
292 {
293 RENDER_FEATURE_LOCAL_LIGHTING = 0x02,
294 RENDER_FEATURE_OBJECT_BUMP = 0x04,
295 RENDER_FEATURE_AVATAR_BUMP = 0x08,
296// RENDER_FEATURE_SHADOWS = 0x10,
297 RENDER_FEATURE_RIPPLE_WATER = 0X20
298 };
299
300 enum LLRenderDebugMask 314 enum LLRenderDebugMask
301 { 315 {
302 RENDER_DEBUG_LIGHT_TRACE = 0x00001, 316 RENDER_DEBUG_COMPOSITION = 0x000020,
303 RENDER_DEBUG_COMPOSITION = 0x00020, 317 RENDER_DEBUG_VERIFY = 0x000080,
304 RENDER_DEBUG_VERIFY = 0x00080, 318 RENDER_DEBUG_BBOXES = 0x000200,
305 RENDER_DEBUG_SHADOW_MAP = 0x00100, 319 RENDER_DEBUG_OCTREE = 0x000400,
306 RENDER_DEBUG_BBOXES = 0x00200, 320 RENDER_DEBUG_PICKING = 0x000800,
307 RENDER_DEBUG_OCTREE = 0x00400, 321 RENDER_DEBUG_OCCLUSION = 0x001000,
308 RENDER_DEBUG_PICKING = 0x00800, 322 RENDER_DEBUG_POINTS = 0x002000,
309 RENDER_DEBUG_OCCLUSION = 0x01000, 323 RENDER_DEBUG_TEXTURE_PRIORITY = 0x004000,
310 RENDER_DEBUG_POINTS = 0x02000, 324 RENDER_DEBUG_TEXTURE_AREA = 0x008000,
311 RENDER_DEBUG_TEXTURE_PRIORITY = 0x04000, 325 RENDER_DEBUG_FACE_AREA = 0x010000,
312 RENDER_DEBUG_TEXTURE_AREA = 0x08000, 326 RENDER_DEBUG_PARTICLES = 0x020000,
313 RENDER_DEBUG_FACE_AREA = 0x10000, 327 RENDER_DEBUG_GLOW = 0x040000,
314 RENDER_DEBUG_PARTICLES = 0x20000, 328 RENDER_DEBUG_TEXTURE_ANIM = 0x080000,
315 RENDER_DEBUG_GLOW = 0x40000, 329 RENDER_DEBUG_LIGHTS = 0x100000,
316 RENDER_DEBUG_TEXTURE_ANIM = 0x80000, 330 RENDER_DEBUG_BATCH_SIZE = 0x200000,
317 }; 331 };
318 332
319 LLPointer<LLViewerImage> mAlphaSizzleImagep; 333 LLPointer<LLViewerImage> mAlphaSizzleImagep;
320 334
321 //MUST MATCH THE ORDER OF DECLARATION IN LLPipeline::init()
322 typedef enum
323 {
324 PARTITION_VOLUME = 0,
325 PARTITION_BRIDGE,
326 PARTITION_HUD,
327 PARTITION_TERRAIN,
328 PARTITION_WATER,
329 PARTITION_TREE,
330 PARTITION_PARTICLE,
331 PARTITION_CLOUD,
332 PARTITION_GRASS,
333 PARTITION_NONE,
334 NUM_PARTITIONS
335 } eObjectPartitions;
336
337private:
338 std::vector<LLSpatialPartition*> mObjectPartition;
339public: 335public:
340 336
341 LLSpatialPartition* getSpatialPartition(LLViewerObject* vobj); 337 LLSpatialPartition* getSpatialPartition(LLViewerObject* vobj);
342 LLSpatialPartition* getSpatialPartition(U32 index);
343 338
344 void updateCamera(BOOL reset = FALSE); 339 void updateCamera(BOOL reset = FALSE);
345 340
@@ -347,7 +342,14 @@ public:
347 LLQuaternion mFlyCamRotation; 342 LLQuaternion mFlyCamRotation;
348 343
349 BOOL mBackfaceCull; 344 BOOL mBackfaceCull;
345 S32 mBatchCount;
346 S32 mMatrixOpCount;
347 S32 mTextureMatrixOps;
348 S32 mMaxBatchSize;
349 S32 mMinBatchSize;
350 S32 mMeanBatchSize;
350 S32 mTrianglesDrawn; 351 S32 mTrianglesDrawn;
352 S32 mNumVisibleNodes;
351 LLStat mTrianglesDrawnStat; 353 LLStat mTrianglesDrawnStat;
352 S32 mVerticesRelit; 354 S32 mVerticesRelit;
353 355
@@ -359,25 +361,48 @@ public:
359 static S32 sCompiles; 361 static S32 sCompiles;
360 362
361 static BOOL sShowHUDAttachments; 363 static BOOL sShowHUDAttachments;
362 static BOOL sUseOcclusion; 364 static S32 sUseOcclusion; // 0 = no occlusion, 1 = read only, 2 = read/write
365 static BOOL sFastAlpha;
366 static BOOL sDisableShaders; // if TRUE, rendering will be done without shaders
367 static BOOL sRenderBump;
368 static BOOL sUseFBO;
369 static BOOL sUseFarClip;
363 static BOOL sSkipUpdate; //skip lod updates 370 static BOOL sSkipUpdate; //skip lod updates
364 static BOOL sDynamicReflections; 371 static BOOL sDynamicReflections;
372 static BOOL sWaterReflections;
373 static BOOL sDynamicLOD;
374 static BOOL sReflectionRender;
375 static BOOL sImpostorRender;
376 static BOOL sUnderWaterRender;
365 static BOOL sRenderGlow; 377 static BOOL sRenderGlow;
366 378 static BOOL sTextureBindTest;
379 static BOOL sRenderFrameTest;
380
367 //screen texture 381 //screen texture
368 GLuint mScreenTex; 382 LLRenderTarget mScreen;
383
369 LLVector2 mScreenScale; 384 LLVector2 mScreenScale;
370 385
371 //texture for making the glow 386 //water reflection texture
372 GLuint mGlowMap; 387 LLRenderTarget mWaterRef;
373 GLuint mGlowBuffer; 388
389 //water distortion texture (refraction)
390 LLRenderTarget mWaterDis;
374 391
392 //texture for making the glow
393 LLRenderTarget mGlow[3];
394
375 //framebuffer objects for off-screen scratch space 395 //framebuffer objects for off-screen scratch space
376 GLuint mFramebuffer[2]; 396 //GLuint mFramebuffer[4];
397 //GLuint mDepthbuffer[2];
377 398
378 //dynamic cube map scratch space 399 //dynamic cube map scratch space
379 LLPointer<LLCubeMap> mCubeBuffer; 400 LLPointer<LLCubeMap> mCubeBuffer;
380 401
402 //cube map anti-aliasing buffers
403 GLuint mBlurCubeBuffer[3];
404 GLuint mBlurCubeTexture[3];
405
381 //frambuffer object for rendering dynamic cube maps 406 //frambuffer object for rendering dynamic cube maps
382 GLuint mCubeFrameBuffer; 407 GLuint mCubeFrameBuffer;
383 408
@@ -388,22 +413,12 @@ public:
388 LLColor4 mSunDiffuse; 413 LLColor4 mSunDiffuse;
389 LLVector3 mSunDir; 414 LLVector3 mSunDir;
390 415
391 LLSpatialGroup::sg_vector_t mActiveGroups;
392 LLSpatialGroup::drawmap_elem_t mRenderMap[LLRenderPass::NUM_RENDER_TYPES];
393 std::vector<LLSpatialGroup* > mAlphaGroups;
394 std::vector<LLSpatialGroup* > mAlphaGroupsPostWater;
395 LLSpatialGroup::sg_vector_t mVisibleGroups;
396 LLSpatialGroup::sg_vector_t mDrawableGroups;
397
398 void clearRenderMap();
399
400 BOOL mInitialized; 416 BOOL mInitialized;
401 BOOL mVertexShadersEnabled; 417 BOOL mVertexShadersEnabled;
402 S32 mVertexShadersLoaded; // 0 = no, 1 = yes, -1 = failed 418 S32 mVertexShadersLoaded; // 0 = no, 1 = yes, -1 = failed
403 419
404protected: 420protected:
405 U32 mRenderTypeMask; 421 U32 mRenderTypeMask;
406 U32 mRenderFeatureMask;
407 U32 mRenderDebugFeatureMask; 422 U32 mRenderDebugFeatureMask;
408 U32 mRenderDebugMask; 423 U32 mRenderDebugMask;
409 424
@@ -412,9 +427,6 @@ protected:
412 ///////////////////////////////////////////// 427 /////////////////////////////////////////////
413 // 428 //
414 // 429 //
415 LLDrawable::drawable_vector_t mVisibleList;
416 LLSpatialBridge::bridge_vector_t mVisibleBridge;
417 LLSpatialBridge::bridge_vector_t mOccludedBridge;
418 LLDrawable::drawable_vector_t mMovedList; 430 LLDrawable::drawable_vector_t mMovedList;
419 LLDrawable::drawable_vector_t mMovedBridge; 431 LLDrawable::drawable_vector_t mMovedBridge;
420 LLDrawable::drawable_vector_t mShiftList; 432 LLDrawable::drawable_vector_t mShiftList;
@@ -457,7 +469,7 @@ protected:
457 // 469 //
458 LLDrawable::drawable_list_t mBuildQ1; // priority 470 LLDrawable::drawable_list_t mBuildQ1; // priority
459 LLDrawable::drawable_list_t mBuildQ2; // non-priority 471 LLDrawable::drawable_list_t mBuildQ2; // non-priority
460 472
461 LLDrawable::drawable_set_t mActiveQ; 473 LLDrawable::drawable_set_t mActiveQ;
462 474
463 LLDrawable::drawable_set_t mRetexturedList; 475 LLDrawable::drawable_set_t mRetexturedList;
@@ -496,15 +508,15 @@ protected:
496 std::map<uintptr_t, LLDrawPool*> mTerrainPools; 508 std::map<uintptr_t, LLDrawPool*> mTerrainPools;
497 std::map<uintptr_t, LLDrawPool*> mTreePools; 509 std::map<uintptr_t, LLDrawPool*> mTreePools;
498 LLDrawPool* mAlphaPool; 510 LLDrawPool* mAlphaPool;
499 LLDrawPool* mAlphaPoolPostWater;
500 LLDrawPool* mSkyPool; 511 LLDrawPool* mSkyPool;
501 LLDrawPool* mStarsPool;
502 LLDrawPool* mTerrainPool; 512 LLDrawPool* mTerrainPool;
503 LLDrawPool* mWaterPool; 513 LLDrawPool* mWaterPool;
504 LLDrawPool* mGroundPool; 514 LLDrawPool* mGroundPool;
505 LLRenderPass* mSimplePool; 515 LLRenderPass* mSimplePool;
516 LLDrawPool* mInvisiblePool;
506 LLDrawPool* mGlowPool; 517 LLDrawPool* mGlowPool;
507 LLDrawPool* mBumpPool; 518 LLDrawPool* mBumpPool;
519 LLDrawPool* mWLSkyPool;
508 // Note: no need to keep an quick-lookup to avatar pools, since there's only one per avatar 520 // Note: no need to keep an quick-lookup to avatar pools, since there's only one per avatar
509 521
510public: 522public:
@@ -519,8 +531,7 @@ protected:
519 U32 mLightMask; 531 U32 mLightMask;
520 U32 mLightMovingMask; 532 U32 mLightMovingMask;
521 S32 mLightingDetail; 533 S32 mLightingDetail;
522 F32 mSunShadowFactor; 534
523
524 static BOOL sRenderPhysicalBeacons; 535 static BOOL sRenderPhysicalBeacons;
525 static BOOL sRenderScriptedTouchBeacons; 536 static BOOL sRenderScriptedTouchBeacons;
526 static BOOL sRenderScriptedBeacons; 537 static BOOL sRenderScriptedBeacons;
@@ -536,5 +547,6 @@ void render_bbox(const LLVector3 &min, const LLVector3 &max);
536 547
537extern LLPipeline gPipeline; 548extern LLPipeline gPipeline;
538extern BOOL gRenderForSelect; 549extern BOOL gRenderForSelect;
550extern const LLMatrix4* gGLLastMatrix;
539 551
540#endif 552#endif