diff options
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llimagegl.cpp | 3 | ||||
-rw-r--r-- | indra/llrender/llrender.cpp | 10 | ||||
-rw-r--r-- | indra/llrender/llrender.h | 2 | ||||
-rw-r--r-- | indra/llrender/llrendernavprim.cpp | 10 |
4 files changed, 18 insertions, 7 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index bd24200029..d1f2789b11 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -1404,6 +1404,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt scratch = new(std::nothrow) U32[width * height]; if (!scratch) { + LLError::LLUserWarningMsg::showOutOfMemory(); LL_ERRS() << "Failed to allocate " << (U32)(width * height * sizeof(U32)) << " bytes for a manual image W" << width << " H" << height << LL_ENDL; } @@ -1429,6 +1430,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt scratch = new(std::nothrow) U32[width * height]; if (!scratch) { + LLError::LLUserWarningMsg::showOutOfMemory(); LL_ERRS() << "Failed to allocate " << (U32)(width * height * sizeof(U32)) << " bytes for a manual image W" << width << " H" << height << LL_ENDL; } @@ -1457,6 +1459,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt scratch = new(std::nothrow) U32[width * height]; if (!scratch) { + LLError::LLUserWarningMsg::showOutOfMemory(); LL_ERRS() << "Failed to allocate " << (U32)(width * height * sizeof(U32)) << " bytes for a manual image W" << width << " H" << height << LL_ENDL; } diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 05a98bff1b..67be49963e 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -871,7 +871,7 @@ LLRender::~LLRender() shutdown(); } -void LLRender::init(bool needs_vertex_buffer) +bool LLRender::init(bool needs_vertex_buffer) { #if LL_WINDOWS if (gGLManager.mHasDebugOutput && gDebugGL) @@ -895,6 +895,13 @@ void LLRender::init(bool needs_vertex_buffer) glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS); #endif +#if LL_WINDOWS + if (glGenVertexArrays == nullptr) + { + return false; + } +#endif + { //bind a dummy vertex array object so we're core profile compliant U32 ret; glGenVertexArrays(1, &ret); @@ -905,6 +912,7 @@ void LLRender::init(bool needs_vertex_buffer) { initVertexBuffer(); } + return true; } void LLRender::initVertexBuffer() diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index ff8c3a8ac8..c9ba827c15 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -376,7 +376,7 @@ public: LLRender(); ~LLRender(); - void init(bool needs_vertex_buffer); + bool init(bool needs_vertex_buffer); void initVertexBuffer(); void resetVertexBuffer(); void shutdown(); diff --git a/indra/llrender/llrendernavprim.cpp b/indra/llrender/llrendernavprim.cpp index d610a44bc6..eea3077632 100644 --- a/indra/llrender/llrendernavprim.cpp +++ b/indra/llrender/llrendernavprim.cpp @@ -40,20 +40,20 @@ LLRenderNavPrim gRenderNav; //============================================================================= void LLRenderNavPrim::renderLLTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, const LLColor4U& color ) const { - LLColor4 cV(color); - gGL.color4fv( cV.mV ); - gGL.begin(LLRender::TRIANGLES); + gGL.color4ubv(color.mV); + + gGL.begin(LLRender::TRIANGLES); { gGL.vertex3fv( a.mV ); gGL.vertex3fv( b.mV ); gGL.vertex3fv( c.mV ); } - gGL.end(); + gGL.end(); } //============================================================================= void LLRenderNavPrim::renderNavMeshVB( U32 mode, LLVertexBuffer* pVBO, int vertCnt ) { pVBO->setBuffer(); - pVBO->drawArrays( mode, 0, vertCnt ); + pVBO->drawArrays( mode, 0, vertCnt ); } //============================================================================= |