summaryrefslogtreecommitdiff
path: root/indra/llrender/llrendertarget.cpp
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2011-06-03 23:58:58 +0000
committerDon Kjer <don@lindenlab.com>2011-06-03 23:58:58 +0000
commitc32b0122ab915ce9bd0cfd8ec330495f2832d97d (patch)
tree064e3ab7b7b2a378302d3a993c62e0ee11abaf2f /indra/llrender/llrendertarget.cpp
parent357062a196e69a41f12afc156c3be225438f7a85 (diff)
parent7dbf6ebb74e8f9c5b683529cc037cdb21b7d9550 (diff)
Merge
Diffstat (limited to 'indra/llrender/llrendertarget.cpp')
-rw-r--r--indra/llrender/llrendertarget.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index 715f466314..e773a639b0 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -154,11 +154,15 @@ void LLRenderTarget::addColorAttachment(U32 color_fmt)
stop_glerror();
+#ifdef GL_ARB_texture_multisample
if (mSamples > 1)
{
glTexImage2DMultisample(LLTexUnit::getInternalType(mUsage), mSamples, color_fmt, mResX, mResY, GL_TRUE);
}
else
+#else
+ llassert_always(mSamples <= 1);
+#endif
{
LLImageGL::setManualImage(LLTexUnit::getInternalType(mUsage), 0, color_fmt, mResX, mResY, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
}
@@ -234,10 +238,14 @@ void LLRenderTarget::allocateDepth()
gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
LLImageGL::setManualImage(internal_type, 0, GL_DEPTH_COMPONENT32, mResX, mResY, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
}
+#ifdef GL_ARB_texture_multisample
else
{
glTexImage2DMultisample(LLTexUnit::getInternalType(mUsage), mSamples, GL_DEPTH_COMPONENT32, mResX, mResY, GL_TRUE);
}
+#else
+ llassert_always(mSamples <= 1);
+#endif
}
}