Skip to content

Commit

Permalink
Don't show GL errors on headless
Browse files Browse the repository at this point in the history
  • Loading branch information
lhog committed Apr 1, 2024
1 parent f1234a9 commit 20104a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rts/Lua/LuaVAO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions rts/Rendering/UniformConstants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 20104a8

Please sign in to comment.