From 20104a8516a794701b6764f32573634ecb20737b Mon Sep 17 00:00:00 2001 From: LHoG <1476261+lhog@users.noreply.github.com> Date: Mon, 1 Apr 2024 21:46:09 +0400 Subject: [PATCH] Don't show GL errors on headless --- rts/Lua/LuaVAO.cpp | 2 ++ rts/Rendering/UniformConstants.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/rts/Lua/LuaVAO.cpp b/rts/Lua/LuaVAO.cpp index 871fbd7c7b..90d0212690 100644 --- a/rts/Lua/LuaVAO.cpp +++ b/rts/Lua/LuaVAO.cpp @@ -85,9 +85,11 @@ LuaVAOs::~LuaVAOs() int LuaVAOs::GetVAO(lua_State* L) { if (!LuaVAOImpl::Supported()) { + #ifndef HEADLESS LOG_L(L_ERROR, "[LuaVAOs::%s] Important OpenGL extensions are not supported by the system\n \tGL_ARB_vertex_buffer_object = %d; GL_ARB_vertex_array_object = %d; GL_ARB_instanced_arrays = %d; GL_ARB_draw_elements_base_vertex = %d; GL_ARB_multi_draw_indirect = %d", __func__, (GLEW_ARB_vertex_buffer_object), (GLEW_ARB_vertex_array_object), (GLEW_ARB_instanced_arrays), (GLEW_ARB_draw_elements_base_vertex), (GLEW_ARB_multi_draw_indirect) ); + #endif return 0; } diff --git a/rts/Rendering/UniformConstants.cpp b/rts/Rendering/UniformConstants.cpp index e8ceba56c4..218a404065 100644 --- a/rts/Rendering/UniformConstants.cpp +++ b/rts/Rendering/UniformConstants.cpp @@ -118,7 +118,9 @@ void UniformConstants::Init() return; if (!Supported()) { + #ifndef HEADLESS LOG_L(L_ERROR, "[UniformConstants::%s] Important OpenGL extensions are not supported by the system\n GLEW_ARB_uniform_buffer_object = %d\n GLEW_ARB_shading_language_420pack = %d", __func__, GLEW_ARB_uniform_buffer_object, GLEW_ARB_shading_language_420pack); + #endif return; }