Merge branch 'animesh' of git://github.com/Shyotl/SingularityViewer into animesh
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "llvolumemgr.h"
|
||||
#include "llvolume.h"
|
||||
#include "llthread.h"
|
||||
|
||||
|
||||
const F32 BASE_THRESHOLD = 0.03f;
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
|
||||
#include "llvolume.h"
|
||||
#include "llpointer.h"
|
||||
#include "llthread.h"
|
||||
|
||||
class LLVolumeParams;
|
||||
class LLVolumeLODGroup;
|
||||
|
||||
@@ -1132,9 +1132,7 @@ bool LLModel::loadModel(std::istream& is)
|
||||
"physics_mesh",
|
||||
}};
|
||||
|
||||
const S32 MODEL_LODS = lod_name.size();
|
||||
|
||||
S32 lod = llclamp((S32) mDetail, 0, MODEL_LODS);
|
||||
S32 lod = llclamp((S32) mDetail, 0, (S32)lod_name.size() - 1);
|
||||
|
||||
if (header[lod_name[lod]]["offset"].asInteger() == -1 ||
|
||||
header[lod_name[lod]]["size"].asInteger() == 0 )
|
||||
|
||||
@@ -74,10 +74,10 @@ U32 vbo_block_size(U32 size)
|
||||
|
||||
U32 vbo_block_index(U32 size)
|
||||
{
|
||||
return vbo_block_size(size)/LL_VBO_BLOCK_SIZE;
|
||||
return ((vbo_block_size(size)-1)/LL_VBO_BLOCK_SIZE);
|
||||
}
|
||||
|
||||
const U32 LL_VBO_POOL_SEED_COUNT = vbo_block_index(LL_VBO_POOL_MAX_SEED_SIZE);
|
||||
const U32 LL_VBO_POOL_SEED_COUNT = vbo_block_index(LL_VBO_POOL_MAX_SEED_SIZE)+1;
|
||||
|
||||
|
||||
//============================================================================
|
||||
@@ -88,14 +88,14 @@ LLVBOPool LLVertexBuffer::sDynamicVBOPool(GL_DYNAMIC_DRAW_ARB, GL_ARRAY_BUFFER_A
|
||||
LLVBOPool LLVertexBuffer::sStreamIBOPool(GL_STREAM_DRAW_ARB, GL_ELEMENT_ARRAY_BUFFER_ARB);
|
||||
LLVBOPool LLVertexBuffer::sDynamicIBOPool(GL_DYNAMIC_DRAW_ARB, GL_ELEMENT_ARRAY_BUFFER_ARB);
|
||||
|
||||
U32 LLVBOPool::sBytesPooled = 0;
|
||||
U32 LLVBOPool::sIndexBytesPooled = 0;
|
||||
U64 LLVBOPool::sBytesPooled = 0;
|
||||
U64 LLVBOPool::sIndexBytesPooled = 0;
|
||||
std::vector<U32> LLVBOPool::sPendingDeletions;
|
||||
|
||||
std::list<U32> LLVertexBuffer::sAvailableVAOName;
|
||||
U32 LLVertexBuffer::sCurVAOName = 1;
|
||||
|
||||
U32 LLVertexBuffer::sAllocatedIndexBytes = 0;
|
||||
U64 LLVertexBuffer::sAllocatedIndexBytes = 0;
|
||||
U32 LLVertexBuffer::sIndexCount = 0;
|
||||
|
||||
U32 LLVertexBuffer::sBindCount = 0;
|
||||
@@ -111,7 +111,7 @@ U32 LLVertexBuffer::sGLRenderIndices = 0;
|
||||
U32 LLVertexBuffer::sLastMask = 0;
|
||||
bool LLVertexBuffer::sVBOActive = false;
|
||||
bool LLVertexBuffer::sIBOActive = false;
|
||||
U32 LLVertexBuffer::sAllocatedBytes = 0;
|
||||
U64 LLVertexBuffer::sAllocatedBytes = 0;
|
||||
U32 LLVertexBuffer::sVertexCount = 0;
|
||||
bool LLVertexBuffer::sMapped = false;
|
||||
bool LLVertexBuffer::sUseStreamDraw = true;
|
||||
@@ -341,7 +341,7 @@ void LLVBOPool::seedPool()
|
||||
{
|
||||
if (mMissCount[i] > mFreeList[i].size())
|
||||
{
|
||||
U32 size = i * LL_VBO_BLOCK_SIZE;
|
||||
U32 size = i * LL_VBO_BLOCK_SIZE + LL_VBO_BLOCK_SIZE;
|
||||
|
||||
S32 count = mMissCount[i] - mFreeList[i].size();
|
||||
for (S32 j = 0; j < count; ++j)
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
class LLVBOPool
|
||||
{
|
||||
public:
|
||||
static U32 sBytesPooled;
|
||||
static U32 sIndexBytesPooled;
|
||||
static U64 sBytesPooled;
|
||||
static U64 sIndexBytesPooled;
|
||||
static std::vector<U32> sPendingDeletions;
|
||||
|
||||
// Periodically call from render loop. Batches VBO deletions together in a single call.
|
||||
@@ -347,8 +347,8 @@ public:
|
||||
static bool sVBOActive;
|
||||
static bool sIBOActive;
|
||||
static U32 sLastMask;
|
||||
static U32 sAllocatedBytes;
|
||||
static U32 sAllocatedIndexBytes;
|
||||
static U64 sAllocatedBytes;
|
||||
static U64 sAllocatedIndexBytes;
|
||||
static U32 sVertexCount;
|
||||
static U32 sIndexCount;
|
||||
static U32 sBindCount;
|
||||
|
||||
@@ -68,9 +68,6 @@ public:
|
||||
void setSkyTex(LLSkyTex* const st) { mSkyTex = st; }
|
||||
|
||||
void renderSkyCubeFace(U8 side);
|
||||
void renderHeavenlyBody(U8 hb, LLFace* face);
|
||||
void renderSunHalo(LLFace* face);
|
||||
|
||||
};
|
||||
|
||||
#endif // LL_LLDRAWPOOLSKY_H
|
||||
|
||||
@@ -183,10 +183,15 @@ namespace
|
||||
{
|
||||
if (mDone) return;
|
||||
|
||||
// A HTTP_BAD_GATEWAY (502) error is our standard timeout response
|
||||
// we get this when there are no events.
|
||||
if ( mStatus == HTTP_BAD_GATEWAY )
|
||||
{
|
||||
// Timeout
|
||||
if (is_internal_http_error_that_warrants_a_retry(mStatus))
|
||||
{ // A standard timeout response we get this when there are no events.
|
||||
mErrorCount = 0;
|
||||
makeRequest();
|
||||
}
|
||||
else if ( mStatus == HTTP_BAD_GATEWAY )
|
||||
{ // LEGACY: A HTTP_BAD_GATEWAY (502) error is our standard timeout response
|
||||
// we get this when there are no events.
|
||||
mErrorCount = 0;
|
||||
makeRequest();
|
||||
}
|
||||
|
||||
@@ -6850,7 +6850,6 @@ void LLSelectMgr::pauseAssociatedAvatars()
|
||||
}
|
||||
else
|
||||
{
|
||||
object->print();
|
||||
// Is a regular attachment. Pause the avatar it's attached to.
|
||||
LLVOAvatar* avatar = object->getAvatar();
|
||||
if (avatar)
|
||||
|
||||
@@ -222,12 +222,12 @@ std::string gPoolNames[] =
|
||||
{
|
||||
// Correspond to LLDrawpool enum render type
|
||||
"NONE",
|
||||
"POOL_SIMPLE",
|
||||
"POOL_GROUND",
|
||||
"POOL_TERRAIN",
|
||||
"POOL_SIMPLE",
|
||||
"POOL_FULLBRIGHT",
|
||||
"POOL_BUMP",
|
||||
"POOL_MATERIALS",
|
||||
"POOL_TERRAIN",
|
||||
"POOL_TREE", // Singu Note: Before sky for zcull.
|
||||
"POOL_ALPHA_MASK",
|
||||
"POOL_FULLBRIGHT_ALPHA_MASK",
|
||||
|
||||
Reference in New Issue
Block a user