summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorsimon <none@none>2013-05-09 13:14:49 -0700
committersimon <none@none>2013-05-09 13:14:49 -0700
commitc7f7c4bc4d9155f5e9cd83265e189f689739da62 (patch)
tree2d4c7e5996a2c5af92f45cf43b8b6dab2e03229f /indra/llrender
parent5af5b49a6205c34b8787cd4ecb4bd1d94174663f (diff)
parentd8f00dd1d1d40ec387583575149b1bf9bae79f32 (diff)
Merge viewer-beta
Diffstat (limited to 'indra/llrender')
-rwxr-xr-x[-rw-r--r--]indra/llrender/CMakeLists.txt0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llcubemap.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llcubemap.h0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llfontbitmapcache.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llfontbitmapcache.h0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llfontfreetype.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llfontfreetype.h0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llfontgl.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llfontgl.h0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llfontregistry.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llfontregistry.h0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llgl.cpp2
-rwxr-xr-x[-rw-r--r--]indra/llrender/llgl.h0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llgldbg.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llgldbg.h0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llglheaders.h0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llglslshader.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llglslshader.h0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llglstates.h0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llgltypes.h0
-rw-r--r--indra/llrender/llimagegl.cpp57
-rwxr-xr-x[-rw-r--r--]indra/llrender/llimagegl.h0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llpostprocess.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llpostprocess.h0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llrender.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llrender.h0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llrendernavprim.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llrendernavprim.h0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llrendersphere.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llrendersphere.h0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llrendertarget.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llrendertarget.h0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llshadermgr.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llshadermgr.h0
-rwxr-xr-x[-rw-r--r--]indra/llrender/lltexture.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llrender/lltexture.h0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llvertexbuffer.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llrender/llvertexbuffer.h0
38 files changed, 42 insertions, 17 deletions
diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt
index 669b70aa43..669b70aa43 100644..100755
--- a/indra/llrender/CMakeLists.txt
+++ b/indra/llrender/CMakeLists.txt
diff --git a/indra/llrender/llcubemap.cpp b/indra/llrender/llcubemap.cpp
index 362452d837..362452d837 100644..100755
--- a/indra/llrender/llcubemap.cpp
+++ b/indra/llrender/llcubemap.cpp
diff --git a/indra/llrender/llcubemap.h b/indra/llrender/llcubemap.h
index ee2c41e026..ee2c41e026 100644..100755
--- a/indra/llrender/llcubemap.h
+++ b/indra/llrender/llcubemap.h
diff --git a/indra/llrender/llfontbitmapcache.cpp b/indra/llrender/llfontbitmapcache.cpp
index c985f6b959..c985f6b959 100644..100755
--- a/indra/llrender/llfontbitmapcache.cpp
+++ b/indra/llrender/llfontbitmapcache.cpp
diff --git a/indra/llrender/llfontbitmapcache.h b/indra/llrender/llfontbitmapcache.h
index c93b0c7320..c93b0c7320 100644..100755
--- a/indra/llrender/llfontbitmapcache.h
+++ b/indra/llrender/llfontbitmapcache.h
diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp
index 058bef43a5..058bef43a5 100644..100755
--- a/indra/llrender/llfontfreetype.cpp
+++ b/indra/llrender/llfontfreetype.cpp
diff --git a/indra/llrender/llfontfreetype.h b/indra/llrender/llfontfreetype.h
index f1b23f22d5..f1b23f22d5 100644..100755
--- a/indra/llrender/llfontfreetype.h
+++ b/indra/llrender/llfontfreetype.h
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index c4f36cabd0..c4f36cabd0 100644..100755
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h
index 0988e99deb..0988e99deb 100644..100755
--- a/indra/llrender/llfontgl.h
+++ b/indra/llrender/llfontgl.h
diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp
index f5ca8d5b04..f5ca8d5b04 100644..100755
--- a/indra/llrender/llfontregistry.cpp
+++ b/indra/llrender/llfontregistry.cpp
diff --git a/indra/llrender/llfontregistry.h b/indra/llrender/llfontregistry.h
index 059248fbbd..059248fbbd 100644..100755
--- a/indra/llrender/llfontregistry.h
+++ b/indra/llrender/llfontregistry.h
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index d521114c9e..77cd2ccb35 100644..100755
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -86,7 +86,7 @@ void APIENTRY gl_debug_callback(GLenum source,
}
else
{
- llwarns << "----- GL WARNING -------" << llendl;
+ llwarns << "----- GL WARNING -------" << llendl;
}
llwarns << "Type: " << std::hex << type << llendl;
llwarns << "ID: " << std::hex << id << llendl;
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h
index 823de9d361..823de9d361 100644..100755
--- a/indra/llrender/llgl.h
+++ b/indra/llrender/llgl.h
diff --git a/indra/llrender/llgldbg.cpp b/indra/llrender/llgldbg.cpp
index 4b68194db3..4b68194db3 100644..100755
--- a/indra/llrender/llgldbg.cpp
+++ b/indra/llrender/llgldbg.cpp
diff --git a/indra/llrender/llgldbg.h b/indra/llrender/llgldbg.h
index 963579cb82..963579cb82 100644..100755
--- a/indra/llrender/llgldbg.h
+++ b/indra/llrender/llgldbg.h
diff --git a/indra/llrender/llglheaders.h b/indra/llrender/llglheaders.h
index 509de51f4d..509de51f4d 100644..100755
--- a/indra/llrender/llglheaders.h
+++ b/indra/llrender/llglheaders.h
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index 7cbf39096e..7cbf39096e 100644..100755
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h
index cf21101e35..cf21101e35 100644..100755
--- a/indra/llrender/llglslshader.h
+++ b/indra/llrender/llglslshader.h
diff --git a/indra/llrender/llglstates.h b/indra/llrender/llglstates.h
index 0e2c3bcb44..0e2c3bcb44 100644..100755
--- a/indra/llrender/llglstates.h
+++ b/indra/llrender/llglstates.h
diff --git a/indra/llrender/llgltypes.h b/indra/llrender/llgltypes.h
index 6c217ef727..6c217ef727 100644..100755
--- a/indra/llrender/llgltypes.h
+++ b/indra/llrender/llgltypes.h
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 249b8da880..5c171d372c 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -732,6 +732,12 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
glPixelStorei(GL_UNPACK_SWAP_BYTES, 0);
stop_glerror();
}
+
+ if (LLRender::sGLCoreProfile)
+ {
+ glGenerateMipmap(mTarget);
+ }
+ stop_glerror();
}
}
else
@@ -1098,27 +1104,46 @@ void LLImageGL::deleteTextures(LLTexUnit::eTextureType type, U32 format, S32 mip
{
if (gGLManager.mInited)
{
- if (format == 0 || type == LLTexUnit::TT_CUBE_MAP || mip_levels == -1)
- { //unknown internal format or unknown number of mip levels, not safe to reuse
- glDeleteTextures(numTextures, textures);
- }
- else
+ switch (format)
{
- for (S32 i = 0; i < numTextures; ++i)
- { //remove texture from VRAM by setting its size to zero
- for (S32 j = 0; j <= mip_levels; j++)
- {
- gGL.getTexUnit(0)->bindManual(type, textures[i]);
+ case 0:
+
+ // We get ARB errors in debug when attempting to use glTexImage2D with these deprecated pix formats
+ //
+ case GL_LUMINANCE8:
+ case GL_INTENSITY8:
+ case GL_ALPHA8:
+ glDeleteTextures(numTextures, textures);
+ break;
- glTexImage2D(LLTexUnit::getInternalType(type), j, format, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ default:
+ {
+ if (type == LLTexUnit::TT_CUBE_MAP || mip_levels == -1)
+ { //unknown internal format or unknown number of mip levels, not safe to reuse
+ glDeleteTextures(numTextures, textures);
}
+ else
+ {
+ for (S32 i = 0; i < numTextures; ++i)
+ { //remove texture from VRAM by setting its size to zero
+
+ for (S32 j = 0; j <= mip_levels; j++)
+ {
+ gGL.getTexUnit(0)->bindManual(type, textures[i]);
+ U32 internal_type = LLTexUnit::getInternalType(type);
+ glTexImage2D(internal_type, j, format, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ stop_glerror();
+ }
- llassert(std::find(sDeadTextureList[type][format].begin(),
- sDeadTextureList[type][format].end(), textures[i]) ==
- sDeadTextureList[type][format].end());
+ llassert(std::find(sDeadTextureList[type][format].begin(),
+ sDeadTextureList[type][format].end(), textures[i]) ==
+ sDeadTextureList[type][format].end());
- sDeadTextureList[type][format].push_back(textures[i]);
- }
+ sDeadTextureList[type][format].push_back(textures[i]);
+ }
+ }
+ }
+ break;
}
}
diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h
index 57a052b258..57a052b258 100644..100755
--- a/indra/llrender/llimagegl.h
+++ b/indra/llrender/llimagegl.h
diff --git a/indra/llrender/llpostprocess.cpp b/indra/llrender/llpostprocess.cpp
index c0045c8044..c0045c8044 100644..100755
--- a/indra/llrender/llpostprocess.cpp
+++ b/indra/llrender/llpostprocess.cpp
diff --git a/indra/llrender/llpostprocess.h b/indra/llrender/llpostprocess.h
index e19de44c60..e19de44c60 100644..100755
--- a/indra/llrender/llpostprocess.h
+++ b/indra/llrender/llpostprocess.h
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index c60eb8d9d9..c60eb8d9d9 100644..100755
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h
index 78a310e525..78a310e525 100644..100755
--- a/indra/llrender/llrender.h
+++ b/indra/llrender/llrender.h
diff --git a/indra/llrender/llrendernavprim.cpp b/indra/llrender/llrendernavprim.cpp
index ca72964832..ca72964832 100644..100755
--- a/indra/llrender/llrendernavprim.cpp
+++ b/indra/llrender/llrendernavprim.cpp
diff --git a/indra/llrender/llrendernavprim.h b/indra/llrender/llrendernavprim.h
index a3a5dfec3a..a3a5dfec3a 100644..100755
--- a/indra/llrender/llrendernavprim.h
+++ b/indra/llrender/llrendernavprim.h
diff --git a/indra/llrender/llrendersphere.cpp b/indra/llrender/llrendersphere.cpp
index 26bfe036e8..26bfe036e8 100644..100755
--- a/indra/llrender/llrendersphere.cpp
+++ b/indra/llrender/llrendersphere.cpp
diff --git a/indra/llrender/llrendersphere.h b/indra/llrender/llrendersphere.h
index f8e9e86e7f..f8e9e86e7f 100644..100755
--- a/indra/llrender/llrendersphere.h
+++ b/indra/llrender/llrendersphere.h
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index 25109268e8..25109268e8 100644..100755
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
diff --git a/indra/llrender/llrendertarget.h b/indra/llrender/llrendertarget.h
index 765a727b5b..765a727b5b 100644..100755
--- a/indra/llrender/llrendertarget.h
+++ b/indra/llrender/llrendertarget.h
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index b6a9a6b653..b6a9a6b653 100644..100755
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h
index 7a16b7c20f..7a16b7c20f 100644..100755
--- a/indra/llrender/llshadermgr.h
+++ b/indra/llrender/llshadermgr.h
diff --git a/indra/llrender/lltexture.cpp b/indra/llrender/lltexture.cpp
index 90fbcec2be..90fbcec2be 100644..100755
--- a/indra/llrender/lltexture.cpp
+++ b/indra/llrender/lltexture.cpp
diff --git a/indra/llrender/lltexture.h b/indra/llrender/lltexture.h
index 093bac20d1..093bac20d1 100644..100755
--- a/indra/llrender/lltexture.h
+++ b/indra/llrender/lltexture.h
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 4909b43e8a..4909b43e8a 100644..100755
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h
index 11fa4ab6a0..11fa4ab6a0 100644..100755
--- a/indra/llrender/llvertexbuffer.h
+++ b/indra/llrender/llvertexbuffer.h