diff options
| author | Xiaohong Bao <bao@lindenlab.com> | 2011-03-07 15:02:48 -0700 | 
|---|---|---|
| committer | Xiaohong Bao <bao@lindenlab.com> | 2011-03-07 15:02:48 -0700 | 
| commit | e64096da697d57d5b00f79ecda649ed76d4a70ba (patch) | |
| tree | 40e1f491c2e11ed334afcf091243408f85cdaba5 | |
| parent | 0787aecd68b0340bec70b44a0143676d6d397e19 (diff) | |
fix for STORM-1026: Viewer crahes while trying to reset Graphics quality.
reviewed by davep
| -rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 13 | 
1 files changed, 12 insertions, 1 deletions
| diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 7b5907a668..b515e4fcab 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -310,7 +310,18 @@ void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const  //static  void LLVertexBuffer::initClass(bool use_vbo, bool no_vbo_mapping)  { -	sEnableVBOs = use_vbo; +	sEnableVBOs = use_vbo && gGLManager.mHasVertexBufferObject ; +	if(sEnableVBOs) +	{ +		llassert_always(glBindBufferARB) ; //double check the extention for VBO is loaded. + +		llinfos << "VBO is enabled." << llendl ; +	} +	else +	{ +		llinfos << "VBO is disabled." << llendl ; +	} +  	sDisableVBOMapping = sEnableVBOs && no_vbo_mapping ;  	LLGLNamePool::registerPool(&sDynamicVBOPool);  	LLGLNamePool::registerPool(&sDynamicIBOPool); | 
