Commit graph

14844 commits

Author SHA1 Message Date
Magnus Norddahl
31abe3df7e - avoid reusing the same mVBuf pointer for the different renderers as that causes too many problems when switching between them
- remove gl_ prefix for model functions that are no longer GL specific
2018-05-21 17:52:03 +02:00
Magnus Norddahl
cc4a09a3d2 - fix model interpolation bug 2018-05-21 14:23:30 +02:00
Christoph Oelckers
31263eeac2 - removed gl_drawinfo-> from FDrawInfo member functions and pass it to some other functions as a parameter.
This really shouldn't be handled as a global variable. The mere fact that several member functions used it incorrectly is ample proof of that.
2018-05-21 11:36:07 +02:00
alexey.lysiuk
2cdc9f9dda - fixed applying of alpha to weapon sprites
https://forum.zdoom.org/viewtopic.php?t=60638
https://forum.zdoom.org/viewtopic.php?t=60642
2018-05-21 10:53:02 +03:00
alexey.lysiuk
ad31da20e5 - added new linedef properties to UDMF spec
https://forum.zdoom.org/viewtopic.php?t=59808
2018-05-20 14:48:44 +03:00
alexey.lysiuk
526711f5d8 - replaced tabs with spaces in UDMF spec 2018-05-20 13:08:29 +03:00
Christoph Oelckers
2d4b8549c6 - per-sector plane rendering needs to be disabled when processing a line portal with hardware that has no working clip plane support.
In this case there are no means to discard the parts of the rendered sectors that lie behind the portal so it should only render the parts that are flagged as visible.
2018-05-20 08:56:29 +02:00
Christoph Oelckers
3069b53804 - disable shader storage blocks if none get reported for vertex shaders. 2018-05-20 00:16:06 +02:00
Christoph Oelckers
1266339c0f - fixed shader compilation. 2018-05-19 21:17:58 +02:00
Christoph Oelckers
3dc6ddbcc3 - check light direction in the shader.
There are situations where lights on the wrong side of a linedef may be passed and those need to be skipped in the shader code.
2018-05-19 19:20:45 +02:00
Christoph Oelckers
5cffa8873a - added a CVAR to disable per-plane rendering.
This will require some comparisons on older hardware. On my Geforce 1060 rendering the full plane with one draw call is clearly faster in all cases I tested.
2018-05-19 19:19:48 +02:00
Christoph Oelckers
cc65490062 - added CVAR to disable WGL_EXT_swap_control_tear.
At least on faster NVidia hardware, setting this to false and gl_finishbeforeswap to true gives a better experience because it reduces screen tearing - but the same setting will reduce frame rate quite dramatically on Intel and can cause bad stalls on some older GPUs when rendering camera textures.
2018-05-19 19:18:38 +02:00
alexey.lysiuk
c6f7d92c76 - added forced automap style to linedef, UDMF only
https://forum.zdoom.org/viewtopic.php?t=59808
2018-05-19 17:09:26 +02:00
RockstarRaccoon
90cb0b3215 - added 'revealed on automap' linedef flag, UDMF only
https://forum.zdoom.org/viewtopic.php?t=59808
2018-05-19 17:09:26 +02:00
Marisa Kirisame
0c4a08460f Cleaned UE1 math by using FVector classes.
Reversed winding order on vertex buffer creation as UE1 uses CCW.
2018-05-19 17:09:06 +02:00
Christoph Oelckers
f54cf561ab - missed this. 2018-05-19 15:40:33 +02:00
Christoph Oelckers
3e204080ae - render sector planes in one draw call.
On a fast and modern graphics card this is a lot faster than doing it per subsector but it may not be without drawbacks on older hardware so it will require some testing on older hardware.
For me Frozen Time's view over the bridge went from 46 fps to 51 fps with this change, the time saved was roughly 2 ms.
2018-05-19 15:20:46 +02:00
Christoph Oelckers
352279a52f - removed the non-indexed flat setup.
This won't be needed any longer.
2018-05-19 14:44:16 +02:00
Christoph Oelckers
2125f8b9d1 - use triangles instead of triangle fans to render flats. 2018-05-19 14:42:25 +02:00
Christoph Oelckers
fd3681dae2 - use an indexed vertex buffer to render the flats.
Right now this has no advantage but it allows optimizing the data, e.g. rendering an entire sector in one go instead of per subsector.
2018-05-19 13:33:28 +02:00
alexey.lysiuk
9257c9cc0c - fixed compilation warnings reported by GCC/Clang
src/r_data/models/models.cpp:418:33: warning: comparison of integers of different signs: 'long' and 'unsigned long' [-Wsign-compare]
src/r_data/models/models.cpp:427:38: warning: comparison of integers of different signs: 'long' and 'unsigned long' [-Wsign-compare]
src/r_data/models/models_ue1.cpp:49:37: warning: comparison of integers of different signs: 'long' and 'unsigned long' [-Wsign-compare]
2018-05-19 13:28:53 +03:00
alexey.lysiuk
ace5ee3c41 - fixed crash after saving a screenshot
https://forum.zdoom.org/viewtopic.php?t=60616
2018-05-19 13:19:24 +03:00
Christoph Oelckers
5ec47d8b4f - removed some leftover data in sector_t. 2018-05-19 08:25:26 +02:00
Christoph Oelckers
ab3bacdaf5 - added missing files to project. 2018-05-18 23:00:10 +02:00
Christoph Oelckers
ebbe52082a - fixed vr_enable_quadbuffered for real
I did not consider that this is an init-only option. So changing the CVAR may not affect game behavior at all. Instead its value must be moved to some globally accessible variable on startup that never gets changed again.
2018-05-18 08:44:32 +02:00
Rachael Alexanderson
f2e6ca4ced - add 'vid_showcurrentscaling' ccmd, expanded output for 'vid_scaletowidth' and 'vid_scaletoheight' commands
- made the vid_scaleto____ commands less hacky - after finding out I could route the calls through screen->, found the correct screen-> commands, and do scaling based on the real screen dimensions
2018-05-17 19:25:32 -04:00
Christoph Oelckers
1656bbf9ec - route the BlurScene call in the menu through DFrameBuffer.
Game code should never ever call the renderer directly. This must be done through the video interface so that it can also work with other framebuffers later.
2018-05-18 00:22:57 +02:00
Christoph Oelckers
2962fe9f08 - silence some warnings. 2018-05-18 00:12:58 +02:00
Christoph Oelckers
b197bfc964 - avoid checking for vr_enable_quadbuffered directly.
This option only exists on Windows, so on the other platforms it should not be in the menu and not affect the setup of the VR mode.
2018-05-18 00:12:45 +02:00
Christoph Oelckers
3f56e02352 Revert "- fix compile on non-Windows targets"
This reverts commit 781cc62f89.

This gets in the way of a real fix.
2018-05-18 00:03:58 +02:00
Rachael Alexanderson
781cc62f89 - fix compile on non-Windows targets 2018-05-17 17:47:42 -04:00
Rachael Alexanderson
872cd529c7 - define zdoom.rc as a proper Windows text file, stop Git from mismanaging it 2018-05-17 17:39:18 -04:00
Christoph Oelckers
46a57fdfa1 - moved the postprocessing CVARs to hwrenderer. 2018-05-17 20:51:42 +02:00
Christoph Oelckers
ea98fe3c4d - moved the hardware independent part of custom postprocessing shaders from gl to hwrenderer. 2018-05-17 20:23:01 +02:00
Christoph Oelckers
da1cdf65c3 Merge branch 'master' of https://github.com/coelckers/gzdoom 2018-05-17 20:12:44 +02:00
Rachael Alexanderson
bcadd2bf04 - also remove unused forward declarations 2018-05-17 06:30:36 -04:00
Rachael Alexanderson
0f36b9d63f - cleaned up vid_scaleto____ code a bit, also set a sane lower limit for vid_scalefactor, removed some code redundancy 2018-05-17 06:24:21 -04:00
alexey.lysiuk
42668c6a5a - fixed seeking end of file in memory reader
https://forum.zdoom.org/viewtopic.php?t=60611
2018-05-17 10:19:29 +03:00
Christoph Oelckers
c0837f42bd - gl_system.h as well, in particular this has no place in hw_* files. 2018-05-16 23:34:52 +02:00
Christoph Oelckers
401c9ab8ca - moved gl_interface.cpp/h to gl_load folder.
These files are not part of the actual renderer but part of the system code.
This means, for separated modern and legacy GL renderers, there still will only be one set of this, unlike everything else.
2018-05-16 23:21:21 +02:00
Christoph Oelckers
6e20ece3f4 - moved vr_enable_quadbuffered definition to win32gliface.cpp because this is where it gets used. 2018-05-16 23:14:30 +02:00
Christoph Oelckers
fb876852bb - fix warnings. 2018-05-16 22:56:02 +02:00
Marisa Kirisame
1bb00ed4f0 Fix for Unreal meshes that don't have sequential texture numbers 2018-05-16 22:11:24 +02:00
Christoph Oelckers
44dd48c7fa - moved the palette stuff and some remaining scaling code from OpenGLFrameBuffer to DFrameBuffer and fixed GetFlashedPalette 2018-05-16 22:10:24 +02:00
alexey.lysiuk
fc91827900 - trigger WorldThingDamaged event before WorldThingDied
https://forum.zdoom.org/viewtopic.php?t=60597
2018-05-16 20:48:59 +02:00
Jonathan Russell
e9050a38b3 - added LevelLocals vec2/3Offset(Z) functions for portal-aware offsetting without needing actors 2018-05-16 20:47:43 +02:00
Marisa Kirisame
98f279b651 Remove unnecessary checks. 2018-05-16 20:47:11 +02:00
Marisa Kirisame
ffc12eec29 Discarded "UMSH" packed format, now loads _d.3d + _a.3d pairs 2018-05-16 20:47:11 +02:00
Marisa Kirisame
f285e550d6 Add support for packed Unreal Engine 1 vertex mesh format.
(concatenated "UMSH" signature + datafile + anivfile)
This is pretty much 100% functional by now.
Hasn't been tested on platforms other than Linux yet, though.
Code definitely deserves some cleaning.
2018-05-16 20:47:11 +02:00
Rachael Alexanderson
0fae13bab4 - added vid_scaletowidth and vid_scaletoheight to calculate vid_scalefactor to reach a certain value on screen dynamics 2018-05-16 11:54:35 -04:00