With the software renderer not being used for 2D anymore it would be quite annoying if every texture class had to implement these.
If done properly, the SW renderer should actually be forced to dynamic_cast any texture to a FWorldTexture before using this stuff, but that'd be some pointless overhead better saved.
src/gl/renderer/gl_renderer.cpp:775:39: warning: comparison of two values with different enumeration types ('F2DDrawer::ETextureDrawMode' and 'TexMode') [-Wenum-compare]
src/gl/renderer/gl_renderer.cpp:776:39: warning: comparison of two values with different enumeration types ('F2DDrawer::ETextureDrawMode' and 'TexMode') [-Wenum-compare]
src/gl/renderer/gl_renderer.cpp:777:39: warning: comparison of two values with different enumeration types ('F2DDrawer::ETextureDrawMode' and 'TexMode') [-Wenum-compare]
src/gl/renderer/gl_renderer.cpp:778:45: warning: comparison of two values with different enumeration types ('F2DDrawer::ETextureDrawMode' and 'TexMode') [-Wenum-compare]
src/gl/renderer/gl_renderer.cpp:779:40: warning: comparison of two values with different enumeration types ('F2DDrawer::ETextureDrawMode' and 'TexMode') [-Wenum-compare]
src/gl/renderer/gl_renderer.cpp:780:45: warning: comparison of two values with different enumeration types ('F2DDrawer::ETextureDrawMode' and 'TexMode') [-Wenum-compare]
src/v_draw.cpp:1144:51: warning: '&' within '|' [-Wbitwise-op-parentheses]
src/textures/texture.cpp:1050:20: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
src\intermission\intermission.cpp(80): warning C4101: 'lumpnum': unreferenced local variable
GCC 7:
src/gl/renderer/gl_renderer.cpp:702:2: error: non-constant condition for static assertion
src/gl/renderer/gl_renderer.cpp:702:2: error: value ‘12’ of type ‘float*’ is not a constant expression
src/gl/renderer/gl_renderer.cpp:703:2: error: non-constant condition for static assertion
src/gl/renderer/gl_renderer.cpp:703:2: error: value ‘20’ of type ‘PalEntry*’ is not a constant expression
Clang:
src/gl/renderer/gl_renderer.cpp:701:16: error: static_assert expression is not an integral constant expression
src/gl/renderer/gl_renderer.cpp:701:23: note: cannot access field of null pointer
This removes the entire palette switch and all the special checks to ensure that no menu can be drawn over this image.
Instead it gives this texture its special palette in the texture manager so that the proper image is created right away.
I decided against exposing this as an editing feature because it is far too specific to this particular image and the raw page format it uses.
A quick check of /idgames shows no project ever replacing it - especially no ZDoom-based project - so no extended handling is needed to make this work with other texture formats.
- with renderers freely switchable, some shortcuts in the 3D floor code had to be removed, because now the hardware renderer can get FF_THISINSIDE-flagged 3D floors.
- changed handling of attenuated lights in the legacy renderer to be adjusted when being rendered instead of when being spawned. For the software renderer the light needs to retain its original values.
- Slightly improve how softpoly processes portals
- Pass the vertex transform matrix via a command rather than being part of the drawer args
- Improve zbuffer drawers in the software renderer
- Misc model rendering fixes
It may use the same calculations as the hardware renderer but must use the 2D drawer for display.
It should be investigated if the hardware renderer can do this as well.
This does not work with a setup where the same backend is driving both renderers.
Most of this is now routed through 'screen', and the decision between renderers has to be made inside the actual render functions.
The software renderer is still driven by a thin opaque interface to keep it mostly an isolated module.