MantisBT - Zandronum
View Issue Details
0004128Zandronum[All Projects] Bugpublic2023-04-22 02:502024-04-08 01:10
TDRR 
Kaminsky 
normaltrivialalways
resolvedfixed 
3.1 
3.23.2 
0004128: Shaders for lights can't be enabled unless compiling with MSVC
In gl_framebuffer.cpp > OpenGLFrameBuffer::InitializeState, gl_PrintStartupLog is guarded behind a _MSC_VER ifdef, so it never gets called at all unless compiling with MSVC. Which is, well, impossible for every platform except Windows.

gl_PrintStartupLog handles printing the OpenGL info at startup time and also (for some reason) setting gl.maxuniforms. gl.maxuniforms is required to be at least 1024 to allow enabling shaders for lights, however it'll remain at 0 if the function is never called.

That could be moved outside of gl_PrintStartupLog, or the _MSC_VER check could be removed (or alternatively replaced with #ifndef __MINGW32__), since the source only mentions it being a problem for MinGW, and I can confirm there's no crash when compiling with GCC on Linux. That way the startup GL info will also be shown.

gl_dynlight_shader allows for much higher framerates and makes it possible to make user shaders interact with dynamic lights, so I believe it's at least somewhat important to have it working on Linux too.
No tags attached.
Issue History
2023-04-22 02:50TDRRNew Issue
2024-04-08 00:21TDRRNote Added: 0023544
2024-04-08 00:25KaminskyStatusnew => resolved
2024-04-08 00:25KaminskyFixed in Version => 3.2
2024-04-08 00:25KaminskyResolutionopen => fixed
2024-04-08 00:25KaminskyAssigned To => Kaminsky
2024-04-08 01:10Ru5tK1ngStatusresolved => feedback
2024-04-08 01:10Ru5tK1ngResolutionfixed => reopened
2024-04-08 01:10Ru5tK1ngStatusfeedback => resolved
2024-04-08 01:10Ru5tK1ngResolutionreopened => fixed
2024-04-08 01:10Ru5tK1ngTarget Version => 3.2

Notes
(0023544)
TDRR   
2024-04-08 00:21   
Fix was recently merged, so the issue has been resolved.
'https://foss.heptapod.net/zandronum/zandronum-stable/-/commit/d6971f687d1ee8625163f71117d682bfc8cc326f [^]'