diff options
author | Kyle Ambroff <ambroff@lindenlab.com> | 2011-01-27 15:14:18 -0800 |
---|---|---|
committer | Kyle Ambroff <ambroff@lindenlab.com> | 2011-01-27 15:14:18 -0800 |
commit | 5161b500c97878179cc4f8c9a0df717a25c5cb14 (patch) | |
tree | 1e95b17c64f050a8179935a0ad69393f3d044a5b /indra/llrender/llimagegl.cpp | |
parent | a4de39381ffcfeb455c3860ace7e7da7f756f774 (diff) |
Prevent crashiness from DisableRendering setting.
When DisableRendering is set, bypass all of the new rendering code that would
have crashed otherwise, since the GL manager isn't initialized.
Many of these blocks will be removed once I get LLWindowHeadless working with
the viewer.
--HG--
branch : headless
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
-rw-r--r-- | indra/llrender/llimagegl.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index e8e98211f1..4dfae948a8 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -1100,6 +1100,12 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt //the texture is assiciate with some image by calling glTexImage outside LLImageGL BOOL LLImageGL::createGLTexture() { + // KWA FIXME remove this when MESA llwindow works in the viewer. + if (gNoRender) + { + return FALSE; + } + if (gGLManager.mIsDisabled) { llwarns << "Trying to create a texture while GL is disabled!" << llendl; @@ -1128,6 +1134,12 @@ BOOL LLImageGL::createGLTexture() BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename/*=0*/, BOOL to_create, S32 category) { + // KWA FIXME remove this when MESA llwindow works in the viewer. + if (gNoRender) + { + return FALSE; + } + if (gGLManager.mIsDisabled) { llwarns << "Trying to create a texture while GL is disabled!" << llendl; @@ -1202,6 +1214,12 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_hasmips, S32 usename) { + // KWA FIXME remove this when MESA llwindow works in the viewer. + if (gNoRender) + { + return FALSE; + } + llassert(data_in); if (discard_level < 0) |