Commit graph

14396 commits

Author SHA1 Message Date
alexey.lysiuk
8cd3cf04e7 Fixed a few compilation warnings
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
2018-04-08 13:55:46 +03:00
alexey.lysiuk
018f5b8d05 Removed deleted virtual functions
They led to link errors with the current Apple's toolchain
2018-04-08 13:55:46 +03:00
alexey.lysiuk
5a4307160e Fixed compilation of SDL backend 2018-04-08 13:55:46 +03:00
alexey.lysiuk
1c89de25dd Fixed compilation of Cocoa backend 2018-04-08 13:55:46 +03:00
alexey.lysiuk
a434f9bc91 Added missing _access() macro for POSIX targets
src/textures/hires/hirestex.cpp:338:8: error: use of undeclared identifier '_access'
2018-04-08 13:55:46 +03:00
alexey.lysiuk
472fdb26ad Removed erroneous function declarations
src/r_data/gldefs.cpp:69:13: error: static declaration of 'ParseVavoomSkybox' follows non-static declaration
2018-04-08 13:55:46 +03:00
alexey.lysiuk
b8ee9d88ba Fixed non-constant condition for static assertion
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
2018-04-08 13:55:46 +03:00
alexey.lysiuk
6144ca930d Fixed POSIX definition of rdtsc() function
src/stats.h:121:24: error: expected ';' after top level declarator
2018-04-08 13:55:46 +03:00
Christoph Oelckers
b12a6fded9 - added the code for legacy shaders.
- force texture filtering for 2D to off when in software rendering.
2018-04-08 12:11:51 +02:00
Christoph Oelckers
5eb898107f - now that all 2D is guaranteed to be drawn in true color, the Heretic E2 end pic can be handled with less hacks.
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.
2018-04-08 10:10:26 +02:00
alexey.lysiuk
3dd7f17ded Deleted MPL text from docs
It was the last remnant of tmpfileplus
2018-04-08 09:55:48 +03:00
Christoph Oelckers
1897073b60 -fixed: When performing a restart the SW scene drawer's resources should be reset because they are outside the control of higher level containers. 2018-04-08 08:03:46 +02:00
Magnus Norddahl
b1355d472c - Fix model projection matrix 2018-04-08 03:57:05 +02:00
Magnus Norddahl
7f25913b2d - Fix depth values written by sloped planes 2018-04-08 02:22:01 +02:00
Christoph Oelckers
0a2c415dbe - deleted some copypasted but ultimately unused definitions. 2018-04-07 23:52:46 +02:00
Christoph Oelckers
df4f435952 - merged vid_renderer, swtruecolor and r_polyrender into one CVAR to reduce menu clutter.
- 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.
2018-04-07 23:30:28 +02:00
Magnus Norddahl
fde87c40d2 - fix crash when in software truecolor mode - the pitch is in pixels, not bytes 2018-04-07 19:56:54 +02:00
Christoph Oelckers
1fc1fac2c2 - added missing header. 2018-04-07 19:41:21 +02:00
Magnus Norddahl
c15328de2f - Remove include that shouldn't be there (also caused macOS builds to fail) 2018-04-07 19:35:32 +02:00
Christoph Oelckers
adbeb3f251 Merge remote-tracking branch 'remotes/origin/master' into 2D_Refactor 2018-04-07 18:50:24 +02:00
Christoph Oelckers
cd00f1fb45 - fixed incorrect check for SW texture recreation. 2018-04-07 18:41:25 +02:00
Magnus Norddahl
2d51fa5b43 - Clean up PolyTriangleDrawer API so that it can better support both softpoly and the swrenderer
- 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
2018-04-07 15:48:48 +02:00
Christoph Oelckers
5fbc723842 - live switching of the renderer works. 2018-04-07 12:59:04 +02:00
Christoph Oelckers
221beec979 - added palette shader and fixed a few things. 2018-04-07 12:17:23 +02:00
alexey.lysiuk
cb3650ed9e Added message for absent explicitly referenced dialog file 2018-04-07 12:52:38 +03:00
alexey.lysiuk
3239a9eaa6 Added loading of ZSDF lumps by full paths
https://forum.zdoom.org/viewtopic.php?t=60139
2018-04-07 12:43:10 +03:00
Christoph Oelckers
211a7f2569 - made the screen blend work for the software renderer.
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.
2018-04-07 10:53:20 +02:00
Christoph Oelckers
b34d7f9e08 - added a software scene drawer to the GL renderer.
It still looks like shit and only works on the modern render path but at least the basics are working.
2018-04-07 10:20:59 +02:00
alexey.lysiuk
5177868773 Revert "Removed workaround for MSVC 2017 compiler bug"
This reverts commit 9da92facda.
2018-04-07 08:05:50 +03:00
alexey.lysiuk
7bd281ddc9 Added zero initialization of implicit dynamic array items
https://forum.zdoom.org/viewtopic.php?t=60111
2018-04-05 12:22:41 +03:00
Magnus Norddahl
b1d33d1bba - Fix mid texture rendering for self-referencing sector lines 2018-04-05 01:40:58 +02:00
alexey.lysiuk
b6f184491b Restored vanilla behavior of lightning for original Hexen
https://forum.zdoom.org/viewtopic.php?t=60103
2018-04-04 16:46:01 +03:00
alexey.lysiuk
2e7d196f8b Fixed crash when vid_setmode CCMD is used from command line
It's impossible to validate video mode at such early stage of initialization
Added sanity check for mode's width and height as well

https://forum.zdoom.org/viewtopic.php?t=59990
2018-04-04 11:46:14 +03:00
Christoph Oelckers
d474b849a5 - removed the remaining calls from the FRenderer interface from the main game code.
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.
2018-04-04 00:21:25 +02:00
Christoph Oelckers
927b351174 - added missing validation to SetCameraToTexture ZScript function. 2018-04-03 23:01:15 +02:00
Christoph Oelckers
fcc33f0a09 - moved around more stuff from the FRenderer interface. 2018-04-03 22:50:47 +02:00
Christoph Oelckers
91813ec43d - moved part of the fade init for LEVEL_HASFADETABLE to the common colormap initialization to have all of it in one place.
Otherwise this is easily overlooked when changing things later and potentially causing problems.
2018-04-03 20:55:36 +02:00
Christoph Oelckers
9ba32cb994 - with the new order of things we need the software renderer to be always available. 2018-04-03 20:14:26 +02:00
Christoph Oelckers
51bf2eb9fa - took GetMaxViewPitch out of renderer interfaces.
With live switching and both renderers on the same backend the old approach will no longer work.
2018-04-03 19:18:16 +02:00
alexey.lysiuk
d3cacbf246 Fixed potential crash on usage of Mystic Ambit Incant
https://forum.zdoom.org/viewtopic.php?t=60080
2018-04-03 12:41:51 +03:00
alexey.lysiuk
9da92facda Removed workaround for MSVC 2017 compiler bug
Apparently Microsoft fixed it in the recent update
2018-04-03 12:13:40 +03:00
alexey.lysiuk
5c8a82d6b2 Set proper version numbers in 7-Zip header file
Source code was at 18.01 already, the latest stable version at the moment
2018-04-03 12:13:37 +03:00
alexey.lysiuk
de2ad7a5d9 Updated zlib to 1.2.11
https://zlib.net/zlib1211.zip
2018-04-03 11:30:04 +03:00
Christoph Oelckers
9a919960c9 - fixd bad comparators for std::sort 2018-04-03 01:01:10 +02:00
Christoph Oelckers
7589dfda25 - removed test and debug code. 2018-04-03 00:53:45 +02:00
Christoph Oelckers
853903bb7e - removed the border refresh counter.
This was just a relic of DirectDraw as main backend and is no longer needed.
2018-04-03 00:50:40 +02:00
Christoph Oelckers
942460ba55 - changed voxel remapping to make a copy instead of destroying the original.
With live renderer switching both sets of data are needed.
2018-04-03 00:30:02 +02:00
Christoph Oelckers
2f96d3c61a - moved global variable definitions to the top of a few files.
Most of these are not critical because they only get used in non-multithreaded contexts but it's definitely easier to look them up this way.
2018-04-02 23:42:45 +02:00
Christoph Oelckers
821c2ec4c7 - removed access to deleted variable. 2018-04-02 20:38:12 +02:00
Christoph Oelckers
b0460eee19 - regenerated gl_load with full OpenGL 4.5 declarations, mostly to get the direct state access functions. 2018-04-02 20:37:31 +02:00