summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-08-28 23:57:41 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-08-28 23:57:41 +0000
commit4a6bacea0f8dcff959028f285bc533852da608b5 (patch)
tree7f49b429051e550f70917ccbcdd1c27bf86f5bdf /indra/llrender
parentac4766d4354ee1945f1569a94d755e3e7c0cd566 (diff)
merge viewer/viewer_1-21 94170-94770 -> release
merge viewer/viewer_1-21-0 94830-95157 -> release Includes: QAR-786 Sandbox buildme for viewer + server Release Notes on the wiki! QAR-797 teleport failures (DEV-6198 / SVC-972) mergeme
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llgl.cpp15
-rw-r--r--indra/llrender/llgl.h6
-rw-r--r--indra/llrender/llrendertarget.cpp5
3 files changed, 17 insertions, 9 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index bd7cdf3d70..42beddc5c7 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -1004,6 +1004,9 @@ void LLGLState::initClass()
//make sure multisample defaults to disabled
sStateMap[GL_MULTISAMPLE_ARB] = GL_FALSE;
glDisable(GL_MULTISAMPLE_ARB);
+
+ //default vertex arrays to enabled.
+ glEnableClientState(GL_VERTEX_ARRAY);
}
//static
@@ -1039,7 +1042,7 @@ void LLGLState::dumpStates()
}
}
-void LLGLState::checkStates()
+void LLGLState::checkStates(const std::string& msg)
{
if (!gDebugGL)
{
@@ -1063,7 +1066,7 @@ void LLGLState::checkStates()
if (src != GL_SRC_ALPHA || dst != GL_ONE_MINUS_SRC_ALPHA)
{
- LL_GL_ERRS << "Blend function corrupted: " << std::hex << src << " " << std::hex << dst << LL_ENDL;
+ LL_GL_ERRS << "Blend function corrupted: " << std::hex << src << " " << std::hex << dst << " " << msg << LL_ENDL;
}
for (std::map<LLGLenum, LLGLboolean>::iterator iter = sStateMap.begin();
@@ -1082,7 +1085,7 @@ void LLGLState::checkStates()
stop_glerror();
}
-void LLGLState::checkTextureChannels()
+void LLGLState::checkTextureChannels(const std::string& msg)
{
if (!gDebugGL)
{
@@ -1183,11 +1186,11 @@ void LLGLState::checkTextureChannels()
if (error)
{
- LL_GL_ERRS << "GL texture state corruption detected." << LL_ENDL;
+ LL_GL_ERRS << "GL texture state corruption detected. " << msg << LL_ENDL;
}
}
-void LLGLState::checkClientArrays(U32 data_mask)
+void LLGLState::checkClientArrays(const std::string& msg, U32 data_mask)
{
if (!gDebugGL)
{
@@ -1299,7 +1302,7 @@ void LLGLState::checkClientArrays(U32 data_mask)
if (error)
{
- LL_GL_ERRS << "GL client array corruption detected." << LL_ENDL;
+ LL_GL_ERRS << "GL client array corruption detected. " << msg << LL_ENDL;
}
}
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h
index cff54cc342..bab5e5245f 100644
--- a/indra/llrender/llgl.h
+++ b/indra/llrender/llgl.h
@@ -223,9 +223,9 @@ public:
static void resetTextureStates();
static void dumpStates();
- static void checkStates();
- static void checkTextureChannels();
- static void checkClientArrays(U32 data_mask = 0x0001);
+ static void checkStates(const std::string& msg = "");
+ static void checkTextureChannels(const std::string& msg = "");
+ static void checkClientArrays(const std::string& msg = "", U32 data_mask = 0x0001);
protected:
static std::map<LLGLenum, LLGLboolean> sStateMap;
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index 885ccde2d1..cfb7496795 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -99,11 +99,16 @@ void LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, BOOL depth, U32
glGenFramebuffersEXT(1, (GLuint *) &mFBO);
+ stop_glerror();
+
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, mFBO);
+ stop_glerror();
+
if (mDepth)
{
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, mUsage, mDepth, 0);
+ stop_glerror();
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT, mUsage, mDepth, 0);
stop_glerror();
}