SL-17967 - _ARB constant removal
parent
2082443220
commit
01d03edd85
|
|
@ -1658,8 +1658,8 @@ void LLGLState::initClass()
|
|||
// sStateMap[GL_TEXTURE_2D] = GL_TRUE;
|
||||
|
||||
//make sure multisample defaults to disabled
|
||||
sStateMap[GL_MULTISAMPLE_ARB] = GL_FALSE;
|
||||
glDisable(GL_MULTISAMPLE_ARB);
|
||||
sStateMap[GL_MULTISAMPLE] = GL_FALSE;
|
||||
glDisable(GL_MULTISAMPLE);
|
||||
}
|
||||
|
||||
//static
|
||||
|
|
@ -1766,7 +1766,7 @@ void LLGLState::checkTextureChannels(const std::string& msg)
|
|||
stop_glerror();
|
||||
|
||||
GLint activeTexture;
|
||||
glGetIntegerv(GL_ACTIVE_TEXTURE_ARB, &activeTexture);
|
||||
glGetIntegerv(GL_ACTIVE_TEXTURE, &activeTexture);
|
||||
stop_glerror();
|
||||
|
||||
BOOL error = FALSE;
|
||||
|
|
@ -1794,12 +1794,12 @@ void LLGLState::checkTextureChannels(const std::string& msg)
|
|||
"GL_TEXTURE_2D",
|
||||
"GL_TEXTURE_COORD_ARRAY",
|
||||
"GL_TEXTURE_1D",
|
||||
"GL_TEXTURE_CUBE_MAP_ARB",
|
||||
"GL_TEXTURE_CUBE_MAP",
|
||||
"GL_TEXTURE_GEN_S",
|
||||
"GL_TEXTURE_GEN_T",
|
||||
"GL_TEXTURE_GEN_Q",
|
||||
"GL_TEXTURE_GEN_R",
|
||||
"GL_TEXTURE_RECTANGLE_ARB",
|
||||
"GL_TEXTURE_RECTANGLE",
|
||||
"GL_TEXTURE_2D_MULTISAMPLE"
|
||||
};
|
||||
|
||||
|
|
@ -1808,12 +1808,12 @@ void LLGLState::checkTextureChannels(const std::string& msg)
|
|||
GL_TEXTURE_2D,
|
||||
GL_TEXTURE_COORD_ARRAY,
|
||||
GL_TEXTURE_1D,
|
||||
GL_TEXTURE_CUBE_MAP_ARB,
|
||||
GL_TEXTURE_CUBE_MAP,
|
||||
GL_TEXTURE_GEN_S,
|
||||
GL_TEXTURE_GEN_T,
|
||||
GL_TEXTURE_GEN_Q,
|
||||
GL_TEXTURE_GEN_R,
|
||||
GL_TEXTURE_RECTANGLE_ARB,
|
||||
GL_TEXTURE_RECTANGLE,
|
||||
GL_TEXTURE_2D_MULTISAMPLE
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public:
|
|||
mLineStipple(GL_LINE_STIPPLE),
|
||||
mNormalize(GL_NORMALIZE),
|
||||
mPolygonSmooth(GL_POLYGON_SMOOTH),
|
||||
mGLMultisample(GL_MULTISAMPLE_ARB)
|
||||
mGLMultisample(GL_MULTISAMPLE)
|
||||
{ }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -69,9 +69,9 @@ static const U32 LL_NUM_LIGHT_UNITS = 8;
|
|||
static const GLenum sGLTextureType[] =
|
||||
{
|
||||
GL_TEXTURE_2D,
|
||||
GL_TEXTURE_RECTANGLE_ARB,
|
||||
GL_TEXTURE_CUBE_MAP_ARB,
|
||||
GL_TEXTURE_CUBE_MAP_ARRAY_ARB,
|
||||
GL_TEXTURE_RECTANGLE,
|
||||
GL_TEXTURE_CUBE_MAP,
|
||||
GL_TEXTURE_CUBE_MAP_ARRAY,
|
||||
GL_TEXTURE_2D_MULTISAMPLE,
|
||||
GL_TEXTURE_3D
|
||||
};
|
||||
|
|
@ -340,7 +340,7 @@ bool LLTexUnit::bind(LLCubeMap* cubeMap)
|
|||
activate();
|
||||
enable(LLTexUnit::TT_CUBE_MAP);
|
||||
mCurrTexture = cubeMap->mImages[0]->getTexName();
|
||||
glBindTexture(GL_TEXTURE_CUBE_MAP_ARB, mCurrTexture);
|
||||
glBindTexture(GL_TEXTURE_CUBE_MAP, mCurrTexture);
|
||||
mHasMipMaps = cubeMap->mImages[0]->mHasMipMaps;
|
||||
cubeMap->mImages[0]->updateBindStats();
|
||||
if (cubeMap->mImages[0]->mTexOptionsDirty)
|
||||
|
|
@ -470,7 +470,7 @@ void LLTexUnit::setTextureAddressMode(eTextureAddressMode mode)
|
|||
glTexParameteri (sGLTextureType[mCurrTexType], GL_TEXTURE_WRAP_T, sGLAddressMode[mode]);
|
||||
if (mCurrTexType == TT_CUBE_MAP)
|
||||
{
|
||||
glTexParameteri (GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_R, sGLAddressMode[mode]);
|
||||
glTexParameteri (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, sGLAddressMode[mode]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -545,7 +545,7 @@ GLint LLTexUnit::getTextureSource(eTextureBlendSrc src)
|
|||
case TBS_PREV_ALPHA:
|
||||
case TBS_ONE_MINUS_PREV_COLOR:
|
||||
case TBS_ONE_MINUS_PREV_ALPHA:
|
||||
return GL_PREVIOUS_ARB;
|
||||
return GL_PREVIOUS;
|
||||
|
||||
// All four cases should return the same value.
|
||||
case TBS_TEX_COLOR:
|
||||
|
|
@ -559,18 +559,18 @@ GLint LLTexUnit::getTextureSource(eTextureBlendSrc src)
|
|||
case TBS_VERT_ALPHA:
|
||||
case TBS_ONE_MINUS_VERT_COLOR:
|
||||
case TBS_ONE_MINUS_VERT_ALPHA:
|
||||
return GL_PRIMARY_COLOR_ARB;
|
||||
return GL_PRIMARY_COLOR;
|
||||
|
||||
// All four cases should return the same value.
|
||||
case TBS_CONST_COLOR:
|
||||
case TBS_CONST_ALPHA:
|
||||
case TBS_ONE_MINUS_CONST_COLOR:
|
||||
case TBS_ONE_MINUS_CONST_ALPHA:
|
||||
return GL_CONSTANT_ARB;
|
||||
return GL_CONSTANT;
|
||||
|
||||
default:
|
||||
LL_WARNS() << "Unknown eTextureBlendSrc: " << src << ". Using Vertex Color instead." << LL_ENDL;
|
||||
return GL_PRIMARY_COLOR_ARB;
|
||||
return GL_PRIMARY_COLOR;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -639,7 +639,7 @@ void LLTexUnit::debugTextureUnit(void)
|
|||
if (mIndex < 0) return;
|
||||
|
||||
GLint activeTexture;
|
||||
glGetIntegerv(GL_ACTIVE_TEXTURE_ARB, &activeTexture);
|
||||
glGetIntegerv(GL_ACTIVE_TEXTURE, &activeTexture);
|
||||
if ((GL_TEXTURE0 + mIndex) != activeTexture)
|
||||
{
|
||||
U32 set_unit = (activeTexture - GL_TEXTURE0);
|
||||
|
|
|
|||
|
|
@ -83,11 +83,11 @@ const U32 LL_VBO_POOL_SEED_COUNT = vbo_block_index(LL_VBO_POOL_MAX_SEED_SIZE);
|
|||
//============================================================================
|
||||
|
||||
//static
|
||||
LLVBOPool LLVertexBuffer::sStreamVBOPool(GL_STREAM_DRAW_ARB, GL_ARRAY_BUFFER_ARB);
|
||||
LLVBOPool LLVertexBuffer::sDynamicVBOPool(GL_DYNAMIC_DRAW_ARB, GL_ARRAY_BUFFER_ARB);
|
||||
LLVBOPool LLVertexBuffer::sDynamicCopyVBOPool(GL_DYNAMIC_COPY_ARB, GL_ARRAY_BUFFER_ARB);
|
||||
LLVBOPool LLVertexBuffer::sStreamIBOPool(GL_STREAM_DRAW_ARB, GL_ELEMENT_ARRAY_BUFFER_ARB);
|
||||
LLVBOPool LLVertexBuffer::sDynamicIBOPool(GL_DYNAMIC_DRAW_ARB, GL_ELEMENT_ARRAY_BUFFER_ARB);
|
||||
LLVBOPool LLVertexBuffer::sStreamVBOPool(GL_STREAM_DRAW, GL_ARRAY_BUFFER);
|
||||
LLVBOPool LLVertexBuffer::sDynamicVBOPool(GL_DYNAMIC_DRAW, GL_ARRAY_BUFFER);
|
||||
LLVBOPool LLVertexBuffer::sDynamicCopyVBOPool(GL_DYNAMIC_COPY, GL_ARRAY_BUFFER);
|
||||
LLVBOPool LLVertexBuffer::sStreamIBOPool(GL_STREAM_DRAW, GL_ELEMENT_ARRAY_BUFFER);
|
||||
LLVBOPool LLVertexBuffer::sDynamicIBOPool(GL_DYNAMIC_DRAW, GL_ELEMENT_ARRAY_BUFFER);
|
||||
|
||||
U32 LLVBOPool::sBytesPooled = 0;
|
||||
U32 LLVBOPool::sIndexBytesPooled = 0;
|
||||
|
|
@ -183,7 +183,7 @@ U8* LLVBOPool::allocate(U32& name, U32 size, bool for_seed)
|
|||
mMissCount[i]++;
|
||||
}
|
||||
|
||||
if (mType == GL_ARRAY_BUFFER_ARB)
|
||||
if (mType == GL_ARRAY_BUFFER)
|
||||
{
|
||||
LLVertexBuffer::sAllocatedBytes += size;
|
||||
}
|
||||
|
|
@ -192,10 +192,10 @@ U8* LLVBOPool::allocate(U32& name, U32 size, bool for_seed)
|
|||
LLVertexBuffer::sAllocatedIndexBytes += size;
|
||||
}
|
||||
|
||||
if (LLVertexBuffer::sDisableVBOMapping || mUsage != GL_DYNAMIC_DRAW_ARB)
|
||||
if (LLVertexBuffer::sDisableVBOMapping || mUsage != GL_DYNAMIC_DRAW)
|
||||
{
|
||||
glBufferData(mType, size, 0, mUsage);
|
||||
if (mUsage != GL_DYNAMIC_COPY_ARB)
|
||||
if (mUsage != GL_DYNAMIC_COPY)
|
||||
{ //data will be provided by application
|
||||
ret = (U8*) ll_aligned_malloc<64>(size);
|
||||
if (!ret)
|
||||
|
|
@ -212,7 +212,7 @@ U8* LLVBOPool::allocate(U32& name, U32 size, bool for_seed)
|
|||
}
|
||||
else
|
||||
{ //always use a true hint of static draw when allocating non-client-backed buffers
|
||||
glBufferData(mType, size, 0, GL_STATIC_DRAW_ARB);
|
||||
glBufferData(mType, size, 0, GL_STATIC_DRAW);
|
||||
}
|
||||
|
||||
glBindBuffer(mType, 0);
|
||||
|
|
@ -225,7 +225,7 @@ U8* LLVBOPool::allocate(U32& name, U32 size, bool for_seed)
|
|||
rec.mGLName = name;
|
||||
rec.mClientData = ret;
|
||||
|
||||
if (mType == GL_ARRAY_BUFFER_ARB)
|
||||
if (mType == GL_ARRAY_BUFFER)
|
||||
{
|
||||
sBytesPooled += size;
|
||||
}
|
||||
|
|
@ -241,7 +241,7 @@ U8* LLVBOPool::allocate(U32& name, U32 size, bool for_seed)
|
|||
name = mFreeList[i].front().mGLName;
|
||||
ret = mFreeList[i].front().mClientData;
|
||||
|
||||
if (mType == GL_ARRAY_BUFFER_ARB)
|
||||
if (mType == GL_ARRAY_BUFFER)
|
||||
{
|
||||
sBytesPooled -= size;
|
||||
}
|
||||
|
|
@ -263,7 +263,7 @@ void LLVBOPool::release(U32 name, U8* buffer, U32 size)
|
|||
deleteBuffer(name);
|
||||
ll_aligned_free_fallback((U8*) buffer);
|
||||
|
||||
if (mType == GL_ARRAY_BUFFER_ARB)
|
||||
if (mType == GL_ARRAY_BUFFER)
|
||||
{
|
||||
LLVertexBuffer::sAllocatedBytes -= size;
|
||||
}
|
||||
|
|
@ -322,7 +322,7 @@ void LLVBOPool::cleanup()
|
|||
|
||||
l.pop_front();
|
||||
|
||||
if (mType == GL_ARRAY_BUFFER_ARB)
|
||||
if (mType == GL_ARRAY_BUFFER)
|
||||
{
|
||||
sBytesPooled -= size;
|
||||
LLVertexBuffer::sAllocatedBytes -= size;
|
||||
|
|
@ -763,12 +763,12 @@ void LLVertexBuffer::unbind()
|
|||
|
||||
if (sVBOActive)
|
||||
{
|
||||
glBindBuffer(GL_ARRAY_BUFFER_ARB, 0);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
sVBOActive = false;
|
||||
}
|
||||
if (sIBOActive)
|
||||
{
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
||||
sIBOActive = false;
|
||||
}
|
||||
|
||||
|
|
@ -801,32 +801,32 @@ S32 LLVertexBuffer::determineUsage(S32 usage)
|
|||
ret_usage = 0;
|
||||
}
|
||||
|
||||
if (ret_usage == GL_STREAM_DRAW_ARB && !sUseStreamDraw)
|
||||
if (ret_usage == GL_STREAM_DRAW && !sUseStreamDraw)
|
||||
{
|
||||
ret_usage = 0;
|
||||
}
|
||||
|
||||
if (ret_usage == GL_DYNAMIC_DRAW_ARB && sPreferStreamDraw)
|
||||
if (ret_usage == GL_DYNAMIC_DRAW && sPreferStreamDraw)
|
||||
{
|
||||
ret_usage = GL_STREAM_DRAW_ARB;
|
||||
ret_usage = GL_STREAM_DRAW;
|
||||
}
|
||||
|
||||
if (ret_usage == 0 && LLRender::sGLCoreProfile)
|
||||
{ //MUST use VBOs for all rendering
|
||||
ret_usage = GL_STREAM_DRAW_ARB;
|
||||
ret_usage = GL_STREAM_DRAW;
|
||||
}
|
||||
|
||||
if (ret_usage && ret_usage != GL_STREAM_DRAW_ARB)
|
||||
if (ret_usage && ret_usage != GL_STREAM_DRAW)
|
||||
{ //only stream_draw and dynamic_draw are supported when using VBOs, dynamic draw is the default
|
||||
if (ret_usage != GL_DYNAMIC_COPY_ARB)
|
||||
if (ret_usage != GL_DYNAMIC_COPY)
|
||||
{
|
||||
if (sDisableVBOMapping)
|
||||
{ //always use stream draw if VBO mapping is disabled
|
||||
ret_usage = GL_STREAM_DRAW_ARB;
|
||||
ret_usage = GL_STREAM_DRAW;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret_usage = GL_DYNAMIC_DRAW_ARB;
|
||||
ret_usage = GL_DYNAMIC_DRAW;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -859,7 +859,7 @@ LLVertexBuffer::LLVertexBuffer(U32 typemask, S32 usage)
|
|||
mMappable(false),
|
||||
mFence(NULL)
|
||||
{
|
||||
mMappable = (mUsage == GL_DYNAMIC_DRAW_ARB && !sDisableVBOMapping);
|
||||
mMappable = (mUsage == GL_DYNAMIC_DRAW && !sDisableVBOMapping);
|
||||
|
||||
//zero out offsets
|
||||
for (U32 i = 0; i < TYPE_MAX; i++)
|
||||
|
|
@ -982,11 +982,11 @@ void LLVertexBuffer::genBuffer(U32 size)
|
|||
{
|
||||
mSize = vbo_block_size(size);
|
||||
|
||||
if (mUsage == GL_STREAM_DRAW_ARB)
|
||||
if (mUsage == GL_STREAM_DRAW)
|
||||
{
|
||||
mMappedData = sStreamVBOPool.allocate(mGLBuffer, mSize);
|
||||
}
|
||||
else if (mUsage == GL_DYNAMIC_DRAW_ARB)
|
||||
else if (mUsage == GL_DYNAMIC_DRAW)
|
||||
{
|
||||
mMappedData = sDynamicVBOPool.allocate(mGLBuffer, mSize);
|
||||
}
|
||||
|
|
@ -1003,7 +1003,7 @@ void LLVertexBuffer::genIndices(U32 size)
|
|||
{
|
||||
mIndicesSize = vbo_block_size(size);
|
||||
|
||||
if (mUsage == GL_STREAM_DRAW_ARB)
|
||||
if (mUsage == GL_STREAM_DRAW)
|
||||
{
|
||||
mMappedIndexData = sStreamIBOPool.allocate(mGLIndices, mIndicesSize);
|
||||
}
|
||||
|
|
@ -1017,7 +1017,7 @@ void LLVertexBuffer::genIndices(U32 size)
|
|||
|
||||
void LLVertexBuffer::releaseBuffer()
|
||||
{
|
||||
if (mUsage == GL_STREAM_DRAW_ARB)
|
||||
if (mUsage == GL_STREAM_DRAW)
|
||||
{
|
||||
sStreamVBOPool.release(mGLBuffer, mMappedData, mSize);
|
||||
}
|
||||
|
|
@ -1034,7 +1034,7 @@ void LLVertexBuffer::releaseBuffer()
|
|||
|
||||
void LLVertexBuffer::releaseIndices()
|
||||
{
|
||||
if (mUsage == GL_STREAM_DRAW_ARB)
|
||||
if (mUsage == GL_STREAM_DRAW)
|
||||
{
|
||||
sStreamIBOPool.release(mGLIndices, mMappedIndexData, mIndicesSize);
|
||||
}
|
||||
|
|
@ -1499,7 +1499,7 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_ran
|
|||
#ifdef GL_ARB_map_buffer_range
|
||||
S32 offset = mOffsets[type] + sTypeSize[type]*index;
|
||||
S32 length = (sTypeSize[type]*count+0xF) & ~0xF;
|
||||
src = (U8*) glMapBufferRange(GL_ARRAY_BUFFER_ARB, offset, length,
|
||||
src = (U8*) glMapBufferRange(GL_ARRAY_BUFFER, offset, length,
|
||||
GL_MAP_WRITE_BIT |
|
||||
GL_MAP_FLUSH_EXPLICIT_BIT |
|
||||
GL_MAP_INVALIDATE_RANGE_BIT);
|
||||
|
|
@ -1512,7 +1512,7 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_ran
|
|||
if (gDebugGL)
|
||||
{
|
||||
GLint size = 0;
|
||||
glGetBufferParameteriv(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SIZE_ARB, &size);
|
||||
glGetBufferParameteriv(GL_ARRAY_BUFFER, GL_BUFFER_SIZE, &size);
|
||||
|
||||
if (size < mSize)
|
||||
{
|
||||
|
|
@ -1520,7 +1520,7 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_ran
|
|||
}
|
||||
}
|
||||
|
||||
src = (U8*) glMapBufferRange(GL_ARRAY_BUFFER_ARB, 0, mSize,
|
||||
src = (U8*) glMapBufferRange(GL_ARRAY_BUFFER, 0, mSize,
|
||||
GL_MAP_WRITE_BIT |
|
||||
GL_MAP_FLUSH_EXPLICIT_BIT);
|
||||
#endif
|
||||
|
|
@ -1531,20 +1531,20 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_ran
|
|||
if (map_range)
|
||||
{
|
||||
#ifndef LL_MESA_HEADLESS
|
||||
glBufferParameteriAPPLE(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_FALSE);
|
||||
glBufferParameteriAPPLE(GL_ARRAY_BUFFER_ARB, GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE);
|
||||
glBufferParameteriAPPLE(GL_ARRAY_BUFFER, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_FALSE);
|
||||
glBufferParameteriAPPLE(GL_ARRAY_BUFFER, GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE);
|
||||
#endif
|
||||
src = (U8*) glMapBuffer(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
|
||||
src = (U8*) glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY);
|
||||
}
|
||||
else
|
||||
{
|
||||
src = (U8*) glMapBuffer(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
|
||||
src = (U8*) glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
map_range = false;
|
||||
src = (U8*) glMapBuffer(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
|
||||
src = (U8*) glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY);
|
||||
}
|
||||
|
||||
llassert(src != NULL);
|
||||
|
|
@ -1568,8 +1568,8 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_ran
|
|||
//print out more debug info before crash
|
||||
LL_INFOS() << "vertex buffer size: (num verts : num indices) = " << getNumVerts() << " : " << getNumIndices() << LL_ENDL;
|
||||
GLint size;
|
||||
glGetBufferParameteriv(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SIZE_ARB, &size);
|
||||
LL_INFOS() << "GL_ARRAY_BUFFER_ARB size is " << size << LL_ENDL;
|
||||
glGetBufferParameteriv(GL_ARRAY_BUFFER, GL_BUFFER_SIZE, &size);
|
||||
LL_INFOS() << "GL_ARRAY_BUFFER size is " << size << LL_ENDL;
|
||||
//--------------------
|
||||
|
||||
GLint buff;
|
||||
|
|
@ -1684,7 +1684,7 @@ U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range)
|
|||
#ifdef GL_ARB_map_buffer_range
|
||||
S32 offset = sizeof(U16)*index;
|
||||
S32 length = sizeof(U16)*count;
|
||||
src = (U8*) glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length,
|
||||
src = (U8*) glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER, offset, length,
|
||||
GL_MAP_WRITE_BIT |
|
||||
GL_MAP_FLUSH_EXPLICIT_BIT |
|
||||
GL_MAP_INVALIDATE_RANGE_BIT);
|
||||
|
|
@ -1693,7 +1693,7 @@ U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range)
|
|||
else
|
||||
{
|
||||
#ifdef GL_ARB_map_buffer_range
|
||||
src = (U8*) glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, 0, sizeof(U16)*mNumIndices,
|
||||
src = (U8*) glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER, 0, sizeof(U16)*mNumIndices,
|
||||
GL_MAP_WRITE_BIT |
|
||||
GL_MAP_FLUSH_EXPLICIT_BIT);
|
||||
#endif
|
||||
|
|
@ -1704,20 +1704,20 @@ U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range)
|
|||
if (map_range)
|
||||
{
|
||||
#ifndef LL_MESA_HEADLESS
|
||||
glBufferParameteriAPPLE(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_FALSE);
|
||||
glBufferParameteriAPPLE(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE);
|
||||
glBufferParameteriAPPLE(GL_ELEMENT_ARRAY_BUFFER, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_FALSE);
|
||||
glBufferParameteriAPPLE(GL_ELEMENT_ARRAY_BUFFER, GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE);
|
||||
#endif
|
||||
src = (U8*) glMapBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
|
||||
src = (U8*) glMapBuffer(GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY);
|
||||
}
|
||||
else
|
||||
{
|
||||
src = (U8*) glMapBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
|
||||
src = (U8*) glMapBuffer(GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
map_range = false;
|
||||
src = (U8*) glMapBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
|
||||
src = (U8*) glMapBuffer(GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY);
|
||||
}
|
||||
|
||||
llassert(src != NULL);
|
||||
|
|
@ -1793,12 +1793,12 @@ void LLVertexBuffer::unmapBuffer()
|
|||
S32 length = sTypeSize[region.mType]*region.mCount;
|
||||
if (mSize >= length + offset)
|
||||
{
|
||||
glBufferSubData(GL_ARRAY_BUFFER_ARB, offset, length, (U8*)mMappedData + offset);
|
||||
glBufferSubData(GL_ARRAY_BUFFER, offset, length, (U8*)mMappedData + offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
GLint size = 0;
|
||||
glGetBufferParameteriv(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SIZE_ARB, &size);
|
||||
glGetBufferParameteriv(GL_ARRAY_BUFFER, GL_BUFFER_SIZE, &size);
|
||||
LL_WARNS() << "Attempted to map regions to a buffer that is too small, "
|
||||
<< "mapped size: " << mSize
|
||||
<< ", gl buffer size: " << size
|
||||
|
|
@ -1814,7 +1814,7 @@ void LLVertexBuffer::unmapBuffer()
|
|||
else
|
||||
{
|
||||
stop_glerror();
|
||||
glBufferSubData(GL_ARRAY_BUFFER_ARB, 0, getSize(), (U8*) mMappedData);
|
||||
glBufferSubData(GL_ARRAY_BUFFER, 0, getSize(), (U8*) mMappedData);
|
||||
stop_glerror();
|
||||
}
|
||||
}
|
||||
|
|
@ -1833,13 +1833,13 @@ void LLVertexBuffer::unmapBuffer()
|
|||
if (gGLManager.mHasMapBufferRange)
|
||||
{
|
||||
#ifdef GL_ARB_map_buffer_range
|
||||
glFlushMappedBufferRange(GL_ARRAY_BUFFER_ARB, offset, length);
|
||||
glFlushMappedBufferRange(GL_ARRAY_BUFFER, offset, length);
|
||||
#endif
|
||||
}
|
||||
else if (gGLManager.mHasFlushBufferRange)
|
||||
{
|
||||
#ifndef LL_MESA_HEADLESS
|
||||
glFlushMappedBufferRangeAPPLE(GL_ARRAY_BUFFER_ARB, offset, length);
|
||||
glFlushMappedBufferRangeAPPLE(GL_ARRAY_BUFFER, offset, length);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
@ -1848,7 +1848,7 @@ void LLVertexBuffer::unmapBuffer()
|
|||
}
|
||||
}
|
||||
stop_glerror();
|
||||
glUnmapBuffer(GL_ARRAY_BUFFER_ARB);
|
||||
glUnmapBuffer(GL_ARRAY_BUFFER);
|
||||
stop_glerror();
|
||||
|
||||
mMappedData = NULL;
|
||||
|
|
@ -1873,12 +1873,12 @@ void LLVertexBuffer::unmapBuffer()
|
|||
S32 length = sizeof(U16)*region.mCount;
|
||||
if (mIndicesSize >= length + offset)
|
||||
{
|
||||
glBufferSubData(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length, (U8*) mMappedIndexData+offset);
|
||||
glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, offset, length, (U8*) mMappedIndexData+offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
GLint size = 0;
|
||||
glGetBufferParameteriv(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_BUFFER_SIZE_ARB, &size);
|
||||
glGetBufferParameteriv(GL_ELEMENT_ARRAY_BUFFER, GL_BUFFER_SIZE, &size);
|
||||
LL_WARNS() << "Attempted to map regions to a buffer that is too small, "
|
||||
<< "mapped size: " << mIndicesSize
|
||||
<< ", gl buffer size: " << size
|
||||
|
|
@ -1894,7 +1894,7 @@ void LLVertexBuffer::unmapBuffer()
|
|||
else
|
||||
{
|
||||
stop_glerror();
|
||||
glBufferSubData(GL_ELEMENT_ARRAY_BUFFER_ARB, 0, getIndicesSize(), (U8*) mMappedIndexData);
|
||||
glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, getIndicesSize(), (U8*) mMappedIndexData);
|
||||
stop_glerror();
|
||||
}
|
||||
}
|
||||
|
|
@ -1913,14 +1913,14 @@ void LLVertexBuffer::unmapBuffer()
|
|||
if (gGLManager.mHasMapBufferRange)
|
||||
{
|
||||
#ifdef GL_ARB_map_buffer_range
|
||||
glFlushMappedBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length);
|
||||
glFlushMappedBufferRange(GL_ELEMENT_ARRAY_BUFFER, offset, length);
|
||||
#endif
|
||||
}
|
||||
else if (gGLManager.mHasFlushBufferRange)
|
||||
{
|
||||
#ifdef GL_APPLE_flush_buffer_range
|
||||
#ifndef LL_MESA_HEADLESS
|
||||
glFlushMappedBufferRangeAPPLE(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length);
|
||||
glFlushMappedBufferRangeAPPLE(GL_ELEMENT_ARRAY_BUFFER, offset, length);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
|
@ -1931,7 +1931,7 @@ void LLVertexBuffer::unmapBuffer()
|
|||
}
|
||||
}
|
||||
|
||||
glUnmapBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB);
|
||||
glUnmapBuffer(GL_ELEMENT_ARRAY_BUFFER);
|
||||
|
||||
mMappedIndexData = NULL;
|
||||
}
|
||||
|
|
@ -2085,7 +2085,7 @@ bool LLVertexBuffer::bindGLBuffer(bool force_bind)
|
|||
if (useVBOs() && (force_bind || (mGLBuffer && (mGLBuffer != sGLRenderBuffer || !sVBOActive))))
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
|
||||
glBindBuffer(GL_ARRAY_BUFFER_ARB, mGLBuffer);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, mGLBuffer);
|
||||
sGLRenderBuffer = mGLBuffer;
|
||||
sBindCount++;
|
||||
sVBOActive = true;
|
||||
|
|
@ -2102,7 +2102,7 @@ bool LLVertexBuffer::bindGLBufferFast()
|
|||
{
|
||||
if (mGLBuffer != sGLRenderBuffer || !sVBOActive)
|
||||
{
|
||||
glBindBuffer(GL_ARRAY_BUFFER_ARB, mGLBuffer);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, mGLBuffer);
|
||||
sGLRenderBuffer = mGLBuffer;
|
||||
sBindCount++;
|
||||
sVBOActive = true;
|
||||
|
|
@ -2125,7 +2125,7 @@ bool LLVertexBuffer::bindGLIndices(bool force_bind)
|
|||
{
|
||||
LL_ERRS() << "VBO bound while another VBO mapped!" << LL_ENDL;
|
||||
}*/
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, mGLIndices);
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mGLIndices);
|
||||
sGLRenderIndices = mGLIndices;
|
||||
stop_glerror();
|
||||
sBindCount++;
|
||||
|
|
@ -2140,7 +2140,7 @@ bool LLVertexBuffer::bindGLIndicesFast()
|
|||
{
|
||||
if (mGLIndices != sGLRenderIndices || !sIBOActive)
|
||||
{
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, mGLIndices);
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mGLIndices);
|
||||
sGLRenderIndices = mGLIndices;
|
||||
sBindCount++;
|
||||
sIBOActive = true;
|
||||
|
|
@ -2302,7 +2302,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
|
|||
{
|
||||
if (sVBOActive)
|
||||
{
|
||||
glBindBuffer(GL_ARRAY_BUFFER_ARB, 0);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
sBindCount++;
|
||||
sVBOActive = false;
|
||||
setup = true; // ... or a VBO is deactivated
|
||||
|
|
@ -2317,7 +2317,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
|
|||
{
|
||||
if (sIBOActive)
|
||||
{
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
||||
sBindCount++;
|
||||
sIBOActive = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ public:
|
|||
U8* getMappedIndices() const { return mMappedIndexData; }
|
||||
S32 getOffset(S32 type) const { return mOffsets[type]; }
|
||||
S32 getUsage() const { return mUsage; }
|
||||
bool isWriteable() const { return (mMappable || mUsage == GL_STREAM_DRAW_ARB) ? true : false; }
|
||||
bool isWriteable() const { return (mMappable || mUsage == GL_STREAM_DRAW) ? true : false; }
|
||||
|
||||
void draw(U32 mode, U32 count, U32 indices_offset) const;
|
||||
void drawArrays(U32 mode, U32 offset, U32 count) const;
|
||||
|
|
|
|||
|
|
@ -1252,7 +1252,7 @@ LLSpatialPartition* LLDrawable::getSpatialPartition()
|
|||
|
||||
LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask, LLViewerRegion* regionp) :
|
||||
LLDrawable(root->getVObj(), true),
|
||||
LLSpatialPartition(data_mask, render_by_group, GL_STREAM_DRAW_ARB, regionp)
|
||||
LLSpatialPartition(data_mask, render_by_group, GL_STREAM_DRAW, regionp)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
#include "llviewertexturelist.h"
|
||||
|
||||
static U32 sDataMask = LLDrawPoolAvatar::VERTEX_DATA_MASK;
|
||||
static U32 sBufferUsage = GL_STREAM_DRAW_ARB;
|
||||
static U32 sBufferUsage = GL_STREAM_DRAW;
|
||||
static U32 sShaderLevel = 0;
|
||||
|
||||
LLGLSLShader* LLDrawPoolAvatar::sVertexProgram = NULL;
|
||||
|
|
@ -146,11 +146,11 @@ void LLDrawPoolAvatar::prerender()
|
|||
|
||||
if (sShaderLevel > 0)
|
||||
{
|
||||
sBufferUsage = GL_DYNAMIC_DRAW_ARB;
|
||||
sBufferUsage = GL_DYNAMIC_DRAW;
|
||||
}
|
||||
else
|
||||
{
|
||||
sBufferUsage = GL_STREAM_DRAW_ARB;
|
||||
sBufferUsage = GL_STREAM_DRAW;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -934,7 +934,7 @@ LLColor3 LLDrawPoolAvatar::getDebugColor() const
|
|||
|
||||
LLVertexBufferAvatar::LLVertexBufferAvatar()
|
||||
: LLVertexBuffer(sDataMask,
|
||||
GL_STREAM_DRAW_ARB) //avatars are always stream draw due to morph targets
|
||||
GL_STREAM_DRAW) //avatars are always stream draw due to morph targets
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1224,7 +1224,7 @@ void LLFace::cacheFaceInVRAM(const LLVolumeFace& vf)
|
|||
mask |= LLVertexBuffer::MAP_WEIGHT4;
|
||||
}
|
||||
|
||||
LLVertexBuffer* buff = new LLVertexBuffer(mask, GL_STATIC_DRAW_ARB);
|
||||
LLVertexBuffer* buff = new LLVertexBuffer(mask, GL_STATIC_DRAW);
|
||||
vf.mVertexBuffer = buff;
|
||||
|
||||
buff->allocateBuffer(vf.mNumVertices, 0, true);
|
||||
|
|
@ -1539,7 +1539,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
|
||||
#ifdef GL_TRANSFORM_FEEDBACK_BUFFER
|
||||
if (use_transform_feedback &&
|
||||
mVertexBuffer->getUsage() == GL_DYNAMIC_COPY_ARB &&
|
||||
mVertexBuffer->getUsage() == GL_DYNAMIC_COPY &&
|
||||
gTransformPositionProgram.mProgramObject && //transform shaders are loaded
|
||||
mVertexBuffer->useVBOs() && //target buffer is in VRAM
|
||||
!rebuild_weights && //TODO: add support for weights
|
||||
|
|
|
|||
|
|
@ -1084,7 +1084,7 @@ F32 gpu_benchmark()
|
|||
delete [] pixels;
|
||||
|
||||
//make a dummy triangle to draw with
|
||||
LLPointer<LLVertexBuffer> buff = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX, GL_STREAM_DRAW_ARB);
|
||||
LLPointer<LLVertexBuffer> buff = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX, GL_STREAM_DRAW);
|
||||
|
||||
if (!buff->allocateBuffer(3, 0, true))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6029,7 +6029,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
|
|||
auto renderMeshSelection_f = [fogCfx, wireframe_selection](LLSelectNode* node, LLViewerObject* objectp, LLColor4 hlColor)
|
||||
{
|
||||
//Need to because crash on ATI 3800 (and similar cards) MAINT-5018
|
||||
LLGLDisable multisample(LLPipeline::RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
|
||||
LLGLDisable multisample(LLPipeline::RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0);
|
||||
|
||||
LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
|
||||
|
||||
|
|
|
|||
|
|
@ -1581,7 +1581,7 @@ void renderOctree(LLSpatialGroup* group)
|
|||
if (group->mBuilt > 0.f)
|
||||
{
|
||||
group->mBuilt -= 2.f * gFrameIntervalSeconds.value();
|
||||
if (group->mBufferUsage == GL_STATIC_DRAW_ARB)
|
||||
if (group->mBufferUsage == GL_STATIC_DRAW)
|
||||
{
|
||||
col.setVec(1.0f, 0, 0, group->mBuilt*0.5f);
|
||||
}
|
||||
|
|
@ -1591,7 +1591,7 @@ void renderOctree(LLSpatialGroup* group)
|
|||
//col.setVec(1.0f, 1.0f, 0, sinf(group->mBuilt*3.14159f)*0.5f);
|
||||
}
|
||||
|
||||
if (group->mBufferUsage != GL_STATIC_DRAW_ARB)
|
||||
if (group->mBufferUsage != GL_STATIC_DRAW)
|
||||
{
|
||||
LLGLDepthTest gl_depth(FALSE, FALSE);
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
||||
|
|
@ -1686,7 +1686,7 @@ void renderOctree(LLSpatialGroup* group)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (group->mBufferUsage == GL_STATIC_DRAW_ARB && !group->isEmpty()
|
||||
if (group->mBufferUsage == GL_STATIC_DRAW && !group->isEmpty()
|
||||
&& group->getSpatialPartition()->mRenderByGroup)
|
||||
{
|
||||
col.setVec(0.8f, 0.4f, 0.1f, 0.1f);
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ void LLSprite::updateFace(LLFace &face)
|
|||
{
|
||||
LLVertexBuffer* buff = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX |
|
||||
LLVertexBuffer::MAP_TEXCOORD0,
|
||||
GL_STREAM_DRAW_ARB);
|
||||
GL_STREAM_DRAW);
|
||||
buff->allocateBuffer(4, 12, TRUE);
|
||||
face.setGeomIndex(0);
|
||||
face.setIndicesIndex(0);
|
||||
|
|
|
|||
|
|
@ -594,7 +594,7 @@ U32 LLVOGrass::getPartitionType() const
|
|||
}
|
||||
|
||||
LLGrassPartition::LLGrassPartition(LLViewerRegion* regionp)
|
||||
: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW_ARB, regionp)
|
||||
: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW, regionp)
|
||||
{
|
||||
mDrawableType = LLPipeline::RENDER_TYPE_GRASS;
|
||||
mPartitionType = LLViewerRegion::PARTITION_GRASS;
|
||||
|
|
@ -602,7 +602,7 @@ LLGrassPartition::LLGrassPartition(LLViewerRegion* regionp)
|
|||
mDepthMask = TRUE;
|
||||
mSlopRatio = 0.1f;
|
||||
mRenderPass = LLRenderPass::PASS_GRASS;
|
||||
mBufferUsage = GL_DYNAMIC_DRAW_ARB;
|
||||
mBufferUsage = GL_DYNAMIC_DRAW;
|
||||
}
|
||||
|
||||
void LLGrassPartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_count, U32& index_count)
|
||||
|
|
@ -626,7 +626,7 @@ void LLGrassPartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_count
|
|||
|
||||
if (drawablep->isAnimating())
|
||||
{
|
||||
group->mBufferUsage = GL_STREAM_DRAW_ARB;
|
||||
group->mBufferUsage = GL_STREAM_DRAW;
|
||||
}
|
||||
|
||||
U32 count = 0;
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ BOOL LLVOGround::updateGeometry(LLDrawable *drawable)
|
|||
if (!face->getVertexBuffer())
|
||||
{
|
||||
face->setSize(5, 12);
|
||||
LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolGround::VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB);
|
||||
LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolGround::VERTEX_DATA_MASK, GL_STREAM_DRAW);
|
||||
if (!buff->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), TRUE))
|
||||
{
|
||||
LL_WARNS() << "Failed to allocate Vertex Buffer for VOGround to "
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ void LLVOPartGroup::restoreGL()
|
|||
{
|
||||
|
||||
//TODO: optimize out binormal mask here. Specular and normal coords as well.
|
||||
sVB = new LLVertexBuffer(VERTEX_DATA_MASK | LLVertexBuffer::MAP_TANGENT | LLVertexBuffer::MAP_TEXCOORD1 | LLVertexBuffer::MAP_TEXCOORD2, GL_STREAM_DRAW_ARB);
|
||||
sVB = new LLVertexBuffer(VERTEX_DATA_MASK | LLVertexBuffer::MAP_TANGENT | LLVertexBuffer::MAP_TEXCOORD1 | LLVertexBuffer::MAP_TEXCOORD2, GL_STREAM_DRAW);
|
||||
U32 count = LL_MAX_PARTICLE_COUNT;
|
||||
if (!sVB->allocateBuffer(count*4, count*6, true))
|
||||
{
|
||||
|
|
@ -738,7 +738,7 @@ U32 LLVOPartGroup::getPartitionType() const
|
|||
}
|
||||
|
||||
LLParticlePartition::LLParticlePartition(LLViewerRegion* regionp)
|
||||
: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW_ARB, regionp)
|
||||
: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW, regionp)
|
||||
{
|
||||
mRenderPass = LLRenderPass::PASS_ALPHA;
|
||||
mDrawableType = LLPipeline::RENDER_TYPE_PARTICLES;
|
||||
|
|
|
|||
|
|
@ -1010,7 +1010,7 @@ BOOL LLVOSky::updateGeometry(LLDrawable *drawable)
|
|||
face->setSize(4, 6);
|
||||
face->setGeomIndex(0);
|
||||
face->setIndicesIndex(0);
|
||||
LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolSky::VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB);
|
||||
LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolSky::VERTEX_DATA_MASK, GL_STREAM_DRAW);
|
||||
buff->allocateBuffer(4, 6, TRUE);
|
||||
face->setVertexBuffer(buff);
|
||||
|
||||
|
|
@ -1139,7 +1139,7 @@ bool LLVOSky::updateHeavenlyBodyGeometry(LLDrawable *drawable, F32 scale, const
|
|||
if (!facep->getVertexBuffer())
|
||||
{
|
||||
facep->setSize(4, 6);
|
||||
LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolSky::VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB);
|
||||
LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolSky::VERTEX_DATA_MASK, GL_STREAM_DRAW);
|
||||
if (!buff->allocateBuffer(facep->getGeomCount(), facep->getIndicesCount(), TRUE))
|
||||
{
|
||||
LL_WARNS() << "Failed to allocate Vertex Buffer for vosky to "
|
||||
|
|
@ -1379,7 +1379,7 @@ void LLVOSky::updateReflectionGeometry(LLDrawable *drawable, F32 H,
|
|||
if (!face->getVertexBuffer() || quads*4 != face->getGeomCount())
|
||||
{
|
||||
face->setSize(quads * 4, quads * 6);
|
||||
LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolWater::VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB);
|
||||
LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolWater::VERTEX_DATA_MASK, GL_STREAM_DRAW);
|
||||
if (!buff->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), TRUE))
|
||||
{
|
||||
LL_WARNS() << "Failed to allocate Vertex Buffer for vosky to "
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class LLVertexBufferTerrain : public LLVertexBuffer
|
|||
{
|
||||
public:
|
||||
LLVertexBufferTerrain() :
|
||||
LLVertexBuffer(MAP_VERTEX | MAP_NORMAL | MAP_TEXCOORD0 | MAP_TEXCOORD1 | MAP_COLOR, GL_DYNAMIC_DRAW_ARB)
|
||||
LLVertexBuffer(MAP_VERTEX | MAP_NORMAL | MAP_TEXCOORD0 | MAP_TEXCOORD1 | MAP_COLOR, GL_DYNAMIC_DRAW)
|
||||
{
|
||||
//texture coordinates 2 and 3 exist, but use the same data as texture coordinate 1
|
||||
};
|
||||
|
|
@ -1001,7 +1001,7 @@ U32 LLVOSurfacePatch::getPartitionType() const
|
|||
}
|
||||
|
||||
LLTerrainPartition::LLTerrainPartition(LLViewerRegion* regionp)
|
||||
: LLSpatialPartition(LLDrawPoolTerrain::VERTEX_DATA_MASK, FALSE, GL_DYNAMIC_DRAW_ARB, regionp)
|
||||
: LLSpatialPartition(LLDrawPoolTerrain::VERTEX_DATA_MASK, FALSE, GL_DYNAMIC_DRAW, regionp)
|
||||
{
|
||||
mOcclusionEnabled = FALSE;
|
||||
mInfiniteFarClip = TRUE;
|
||||
|
|
|
|||
|
|
@ -921,7 +921,7 @@ void LLVOTree::updateMesh()
|
|||
|
||||
LLFace* facep = mDrawable->getFace(0);
|
||||
if (!facep) return;
|
||||
LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolTree::VERTEX_DATA_MASK, GL_STATIC_DRAW_ARB);
|
||||
LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolTree::VERTEX_DATA_MASK, GL_STATIC_DRAW);
|
||||
if (!buff->allocateBuffer(vert_count, index_count, TRUE))
|
||||
{
|
||||
LL_WARNS() << "Failed to allocate Vertex Buffer on mesh update to "
|
||||
|
|
@ -1226,7 +1226,7 @@ U32 LLVOTree::getPartitionType() const
|
|||
}
|
||||
|
||||
LLTreePartition::LLTreePartition(LLViewerRegion* regionp)
|
||||
: LLSpatialPartition(0, FALSE, GL_DYNAMIC_DRAW_ARB, regionp)
|
||||
: LLSpatialPartition(0, FALSE, GL_DYNAMIC_DRAW, regionp)
|
||||
{
|
||||
mDrawableType = LLPipeline::RENDER_TYPE_TREE;
|
||||
mPartitionType = LLViewerRegion::PARTITION_TREE;
|
||||
|
|
|
|||
|
|
@ -5182,7 +5182,7 @@ U32 LLVOVolume::getPartitionType() const
|
|||
}
|
||||
|
||||
LLVolumePartition::LLVolumePartition(LLViewerRegion* regionp)
|
||||
: LLSpatialPartition(LLVOVolume::VERTEX_DATA_MASK, TRUE, GL_DYNAMIC_DRAW_ARB, regionp),
|
||||
: LLSpatialPartition(LLVOVolume::VERTEX_DATA_MASK, TRUE, GL_DYNAMIC_DRAW, regionp),
|
||||
LLVolumeGeometryManager()
|
||||
{
|
||||
mLODPeriod = 32;
|
||||
|
|
@ -5190,7 +5190,7 @@ LLVolumeGeometryManager()
|
|||
mDrawableType = LLPipeline::RENDER_TYPE_VOLUME;
|
||||
mPartitionType = LLViewerRegion::PARTITION_VOLUME;
|
||||
mSlopRatio = 0.25f;
|
||||
mBufferUsage = GL_DYNAMIC_DRAW_ARB;
|
||||
mBufferUsage = GL_DYNAMIC_DRAW;
|
||||
}
|
||||
|
||||
LLVolumeBridge::LLVolumeBridge(LLDrawable* drawablep, LLViewerRegion* regionp)
|
||||
|
|
@ -5202,7 +5202,7 @@ LLVolumeGeometryManager()
|
|||
mDrawableType = LLPipeline::RENDER_TYPE_VOLUME;
|
||||
mPartitionType = LLViewerRegion::PARTITION_BRIDGE;
|
||||
|
||||
mBufferUsage = GL_DYNAMIC_DRAW_ARB;
|
||||
mBufferUsage = GL_DYNAMIC_DRAW;
|
||||
|
||||
mSlopRatio = 0.25f;
|
||||
}
|
||||
|
|
@ -5788,7 +5788,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
|
|||
|
||||
if (drawablep->isAnimating())
|
||||
{ //fall back to stream draw for animating verts
|
||||
useage = GL_STREAM_DRAW_ARB;
|
||||
useage = GL_STREAM_DRAW;
|
||||
}
|
||||
|
||||
LLVOVolume* vobj = drawablep->getVOVolume();
|
||||
|
|
@ -6408,10 +6408,10 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
|
|||
|
||||
if (use_transform_feedback &&
|
||||
gTransformPositionProgram.mProgramObject && //transform shaders are loaded
|
||||
buffer_usage == GL_DYNAMIC_DRAW_ARB && //target buffer is in VRAM
|
||||
buffer_usage == GL_DYNAMIC_DRAW && //target buffer is in VRAM
|
||||
!(mask & LLVertexBuffer::MAP_WEIGHT4)) //TODO: add support for weights
|
||||
{
|
||||
buffer_usage = GL_DYNAMIC_COPY_ARB;
|
||||
buffer_usage = GL_DYNAMIC_COPY;
|
||||
}
|
||||
|
||||
#if LL_DARWIN
|
||||
|
|
@ -6645,9 +6645,9 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
|
|||
}
|
||||
|
||||
|
||||
if (flexi && buffer_usage && buffer_usage != GL_STREAM_DRAW_ARB)
|
||||
if (flexi && buffer_usage && buffer_usage != GL_STREAM_DRAW)
|
||||
{
|
||||
buffer_usage = GL_STREAM_DRAW_ARB;
|
||||
buffer_usage = GL_STREAM_DRAW;
|
||||
}
|
||||
|
||||
//create vertex buffer
|
||||
|
|
@ -7065,7 +7065,7 @@ void LLVolumeGeometryManager::addGeometryCount(LLSpatialGroup* group, U32& verte
|
|||
|
||||
if (drawablep->isAnimating())
|
||||
{ //fall back to stream draw for animating verts
|
||||
usage = GL_STREAM_DRAW_ARB;
|
||||
usage = GL_STREAM_DRAW;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -7094,7 +7094,7 @@ void LLGeometryManager::addGeometryCount(LLSpatialGroup* group, U32 &vertex_coun
|
|||
|
||||
if (drawablep->isAnimating())
|
||||
{ //fall back to stream draw for animating verts
|
||||
usage = GL_STREAM_DRAW_ARB;
|
||||
usage = GL_STREAM_DRAW;
|
||||
}
|
||||
|
||||
//for each face
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ BOOL LLVOWater::updateGeometry(LLDrawable *drawable)
|
|||
LLVertexBuffer* buff = face->getVertexBuffer();
|
||||
if (!buff || !buff->isWriteable())
|
||||
{
|
||||
buff = new LLVertexBuffer(LLDrawPoolWater::VERTEX_DATA_MASK, GL_DYNAMIC_DRAW_ARB);
|
||||
buff = new LLVertexBuffer(LLDrawPoolWater::VERTEX_DATA_MASK, GL_DYNAMIC_DRAW);
|
||||
if (!buff->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), TRUE))
|
||||
{
|
||||
LL_WARNS() << "Failed to allocate Vertex Buffer on water update to "
|
||||
|
|
@ -295,7 +295,7 @@ U32 LLVOVoidWater::getPartitionType() const
|
|||
}
|
||||
|
||||
LLWaterPartition::LLWaterPartition(LLViewerRegion* regionp)
|
||||
: LLSpatialPartition(0, FALSE, GL_DYNAMIC_DRAW_ARB, regionp)
|
||||
: LLSpatialPartition(0, FALSE, GL_DYNAMIC_DRAW, regionp)
|
||||
{
|
||||
mInfiniteFarClip = TRUE;
|
||||
mDrawableType = LLPipeline::RENDER_TYPE_WATER;
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable)
|
|||
|
||||
if (mFsSkyVerts.isNull())
|
||||
{
|
||||
mFsSkyVerts = new LLVertexBuffer(LLDrawPoolWLSky::ADV_ATMO_SKY_VERTEX_DATA_MASK, GL_STATIC_DRAW_ARB);
|
||||
mFsSkyVerts = new LLVertexBuffer(LLDrawPoolWLSky::ADV_ATMO_SKY_VERTEX_DATA_MASK, GL_STATIC_DRAW);
|
||||
|
||||
if (!mFsSkyVerts->allocateBuffer(4, 6, TRUE))
|
||||
{
|
||||
|
|
@ -216,7 +216,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable)
|
|||
|
||||
for (U32 i = 0; i < strips_segments ;++i)
|
||||
{
|
||||
LLVertexBuffer * segment = new LLVertexBuffer(LLDrawPoolWLSky::SKY_VERTEX_DATA_MASK, GL_STATIC_DRAW_ARB);
|
||||
LLVertexBuffer * segment = new LLVertexBuffer(LLDrawPoolWLSky::SKY_VERTEX_DATA_MASK, GL_STATIC_DRAW);
|
||||
mStripsVerts[i] = segment;
|
||||
|
||||
U32 num_stacks_this_seg = stacks_per_seg;
|
||||
|
|
|
|||
|
|
@ -536,7 +536,7 @@ void LLPipeline::init()
|
|||
|
||||
if (mCubeVB.isNull())
|
||||
{
|
||||
mCubeVB = ll_create_cube_vb(LLVertexBuffer::MAP_VERTEX, GL_STATIC_DRAW_ARB);
|
||||
mCubeVB = ll_create_cube_vb(LLVertexBuffer::MAP_VERTEX, GL_STATIC_DRAW);
|
||||
}
|
||||
|
||||
mDeferredVB = new LLVertexBuffer(DEFERRED_VB_MASK, 0);
|
||||
|
|
@ -2418,7 +2418,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, LLPlane* pla
|
|||
{
|
||||
if (mCubeVB.isNull())
|
||||
{ //cube VB will be used for issuing occlusion queries
|
||||
mCubeVB = ll_create_cube_vb(LLVertexBuffer::MAP_VERTEX, GL_STATIC_DRAW_ARB);
|
||||
mCubeVB = ll_create_cube_vb(LLVertexBuffer::MAP_VERTEX, GL_STATIC_DRAW);
|
||||
}
|
||||
mCubeVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
|
||||
}
|
||||
|
|
@ -2677,7 +2677,7 @@ void LLPipeline::doOcclusion(LLCamera& camera)
|
|||
|
||||
if (mCubeVB.isNull())
|
||||
{ //cube VB will be used for issuing occlusion queries
|
||||
mCubeVB = ll_create_cube_vb(LLVertexBuffer::MAP_VERTEX, GL_STATIC_DRAW_ARB);
|
||||
mCubeVB = ll_create_cube_vb(LLVertexBuffer::MAP_VERTEX, GL_STATIC_DRAW);
|
||||
}
|
||||
mCubeVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
|
||||
|
||||
|
|
@ -4063,7 +4063,7 @@ void render_hud_elements()
|
|||
|
||||
if (!LLPipeline::sReflectionRender && gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
|
||||
{
|
||||
LLGLEnable multisample(LLPipeline::RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
|
||||
LLGLEnable multisample(LLPipeline::RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0);
|
||||
gViewerWindow->renderSelections(FALSE, FALSE, FALSE); // For HUD version in render_ui_3d()
|
||||
|
||||
// Draw the tracking overlays
|
||||
|
|
@ -4371,7 +4371,7 @@ void LLPipeline::renderGeom(LLCamera& camera, bool forceVBOUpdate)
|
|||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
|
||||
LLGLSPipeline gls_pipeline;
|
||||
LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
|
||||
LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0);
|
||||
|
||||
LLGLState gls_color_material(GL_COLOR_MATERIAL, mLightingDetail < 2);
|
||||
|
||||
|
|
@ -4592,7 +4592,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
|
|||
}
|
||||
}
|
||||
|
||||
LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
|
||||
LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0);
|
||||
|
||||
LLVertexBuffer::unbind();
|
||||
|
||||
|
|
@ -4682,7 +4682,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera, bool do_occlusion)
|
|||
|
||||
LLGLEnable cull(GL_CULL_FACE);
|
||||
|
||||
LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
|
||||
LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0);
|
||||
|
||||
calcNearbyLights(camera);
|
||||
setupHWLights(NULL);
|
||||
|
|
@ -8078,7 +8078,7 @@ void LLPipeline::renderFinalize()
|
|||
gGL.getTexUnit(0)->bind(&mGlow[1]);
|
||||
gGL.getTexUnit(1)->bind(&mRT->screen);
|
||||
|
||||
LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
|
||||
LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0);
|
||||
|
||||
buff->setBuffer(mask);
|
||||
buff->drawArrays(LLRender::TRIANGLE_STRIP, 0, 3);
|
||||
|
|
@ -8246,8 +8246,8 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
|
|||
gGL.getTexUnit(channel)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
|
||||
stop_glerror();
|
||||
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC_ARB, GL_LEQUAL);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL);
|
||||
stop_glerror();
|
||||
}
|
||||
}
|
||||
|
|
@ -8268,8 +8268,8 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
|
|||
gGL.getTexUnit(channel)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
|
||||
stop_glerror();
|
||||
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC_ARB, GL_LEQUAL);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL);
|
||||
stop_glerror();
|
||||
}
|
||||
}
|
||||
|
|
@ -8448,7 +8448,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget *screen_target)
|
|||
GL_NEAREST);
|
||||
}
|
||||
|
||||
LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
|
||||
LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0);
|
||||
|
||||
if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD))
|
||||
{
|
||||
|
|
@ -8717,7 +8717,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget *screen_target)
|
|||
|
||||
if (mCubeVB.isNull())
|
||||
{
|
||||
mCubeVB = ll_create_cube_vb(LLVertexBuffer::MAP_VERTEX, GL_STATIC_DRAW_ARB);
|
||||
mCubeVB = ll_create_cube_vb(LLVertexBuffer::MAP_VERTEX, GL_STATIC_DRAW);
|
||||
}
|
||||
|
||||
mCubeVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
|
||||
|
|
@ -9224,7 +9224,7 @@ void LLPipeline::unbindDeferredShader(LLGLSLShader &shader)
|
|||
{
|
||||
if (shader.disableTexture(LLShaderMgr::DEFERRED_SHADOW0+i) > -1)
|
||||
{
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -9232,7 +9232,7 @@ void LLPipeline::unbindDeferredShader(LLGLSLShader &shader)
|
|||
{
|
||||
if (shader.disableTexture(LLShaderMgr::DEFERRED_SHADOW0+i) > -1)
|
||||
{
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue