summaryrefslogtreecommitdiff
path: root/indra/llrender/llgl.cpp
diff options
context:
space:
mode:
authormobserveur <mobserveur@gmail.com>2025-08-30 01:59:43 +0200
committermobserveur <mobserveur@gmail.com>2025-08-30 01:59:43 +0200
commit7f0c81918575d3f05e4eadc160b600eaa8b383d1 (patch)
tree4c6bb40e93e38bb8a32964380f97ac2a06490b11 /indra/llrender/llgl.cpp
parent03140ed619c5d49eb3851284ae53bbea73a8b831 (diff)
Performance Optimisations, Bloom effect, Visuals Panel
This commit contains performance optimisations in the the pipeline, framebuffer, vertexbuffer, reflection probes, shadows. It also fixes many opengl errors, modifies the opengl debugging, and adds a visuals effects panel.
Diffstat (limited to 'indra/llrender/llgl.cpp')
-rw-r--r--indra/llrender/llgl.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index ac66faaf5a..cc619e2086 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -2279,26 +2279,28 @@ void rotate_quat(LLQuaternion& rotation)
void flush_glerror()
{
+ if(!gDebugGL) return;
glGetError();
}
-//this function outputs gl error to the log file, does not crash the code.
-void log_glerror()
+void log_glerror(std::string comment)
{
+ if(!gDebugGL) return;
+
if (LL_UNLIKELY(!gGLManager.mInited))
{
return ;
}
- // Create or update texture to be used with this data
+
GLenum error;
error = glGetError();
- while (LL_UNLIKELY(error))
+ if (error != GL_NO_ERROR)
{
#if GLU_VERSION_1_1
GLubyte const * gl_error_msg = gluErrorString(error);
if (NULL != gl_error_msg)
{
- LL_WARNS() << "GL Error: " << error << " GL Error String: " << gl_error_msg << LL_ENDL ;
+ LL_WARNS() << "GL Error (" << comment << ")" << error << ": " << gl_error_msg << LL_ENDL;
}
else
#endif // GLU_VERSION_1_1
@@ -2307,7 +2309,6 @@ void log_glerror()
// you'll probably have to grep for the number in glext.h.
LL_WARNS() << "GL Error: UNKNOWN 0x" << std::hex << error << std::dec << LL_ENDL;
}
- error = glGetError();
}
}
@@ -2385,6 +2386,7 @@ void assert_glerror()
void clear_glerror()
{
+ if(!gDebugGL) return;
glGetError();
glGetError();
}