Magnus Norddahl
a7529ce3b4
Merge remote-tracking branch 'gzdoom/modern' into hw_postprocess
2018-06-29 20:24:32 +02:00
alexey.lysiuk
651e735246
Merge branch 'master' into modern
2018-06-29 17:51:10 +03:00
alexey.lysiuk
ecb5bfec13
- removed obsolete code from POSIX backends
2018-06-29 17:50:19 +03:00
alexey.lysiuk
1ebc169d56
- fixed potential crash on fatal error in Cocoa backend
...
Early fatal error can be triggered when native OpenGL frame buffer is not created yet and DDummyFrameBuffer is still used
2018-06-29 17:50:19 +03:00
alexey.lysiuk
907ce777a3
- added extra validation for status bar classes
...
Print a message when status bar class defined in GAMEINFO is missing or when it's not derived from BaseStatusBar
Validate internal status bar classes for basic consistency in Debug configuration
2018-06-29 13:47:06 +03:00
alexey.lysiuk
0703030be3
- simplified key repeat detection in SDL backend
2018-06-29 12:26:30 +03:00
alexey.lysiuk
0342bf532d
- fixed excess keyboard events in SDL backend
...
https://forum.zdoom.org/viewtopic.php?t=61104
2018-06-29 12:20:49 +03:00
alexey.lysiuk
6e4c0fc416
- disabled annoying macOS spaces in SDL backend
2018-06-29 12:20:49 +03:00
alexey.lysiuk
c30505d02a
- fixed excess keyboard events in Cocoa backend
...
https://forum.zdoom.org/viewtopic.php?t=61104
2018-06-29 12:20:49 +03:00
alexey.lysiuk
a968aeba8a
- added detection of macOS Mojave
2018-06-28 11:06:19 +03:00
Christoph Oelckers
cbe4c9c5c1
Added lump size validation to the WAD loader
2018-06-27 08:51:45 +02:00
Christoph Oelckers
8ac864b007
Merge branch 'master' into modern
2018-06-26 09:28:23 +02:00
Christoph Oelckers
446be98f37
- fixed light application logic for flats.
...
The light mode check wasn't done properly anymore after merging GLPASS_ALL and GLPASS_PLAIN.
2018-06-26 09:28:10 +02:00
Christoph Oelckers
0ed1077f29
- correct checks for HasDynamicLights
2018-06-26 08:51:21 +02:00
Christoph Oelckers
e402babfc0
Fixed: Software rendered models checked the wrong CVAR for enabled dynamic lights.
2018-06-26 08:23:07 +02:00
Magnus Norddahl
f8272287d2
- make softpoly use the r_dynlights cvar
2018-06-26 02:19:47 +02:00
Magnus Norddahl
1c5f73727e
- fix missing include
2018-06-26 02:14:08 +02:00
Magnus Norddahl
61d69f5561
Merge remote-tracking branch 'gzdoom/modern' into hw_postprocess
2018-06-26 02:12:49 +02:00
Christoph Oelckers
ff1eb7f3f2
- calculate a proper opening range when encountering a sector portal on a one-sided line in the sight checking code
2018-06-25 10:27:02 +02:00
Christoph Oelckers
5d14ae68a6
- missed two added files.
2018-06-24 23:54:25 +02:00
Christoph Oelckers
daf8703fc9
- split up Win32's SystemGLFrameBuffer as well to get the shareable parts between OpenGL and Vulkan into a base class.
2018-06-24 21:26:32 +02:00
Christoph Oelckers
66d13b6e80
- renamed another file.
2018-06-24 20:55:05 +02:00
Christoph Oelckers
1519514dd7
- split Win32GLVideo in two so that the OpenGL independent part can be used for Vulkan as well.
2018-06-24 20:47:00 +02:00
Christoph Oelckers
c2d24e1dd3
- renamed a file.
2018-06-24 20:31:35 +02:00
Christoph Oelckers
e7365be0d1
- renamed SystemFrameBuffer to SystemGLFrameBuffer.
...
... because with Vulkan there needs to be some hint what API this is for.
2018-06-24 20:16:30 +02:00
Christoph Oelckers
52102f3d4a
- moved the Win32GLVideo class to its own file.
...
This and SystemFrameBuffer need splitting up to support both Vulkan and OpenGL
2018-06-24 20:11:08 +02:00
Magnus Norddahl
32d837cdf1
Merge remote-tracking branch 'gzdoom/modern' into hw_postprocess
2018-06-24 17:57:02 +02:00
Christoph Oelckers
491898fe2c
- fixed calculation of projection matrix for weapon sprites.
...
- fixed color mask for green/magenta.
- fixed crash when initializing video, because it was accessing 'screen' before it was set from within the framebuffer's constructor.
2018-06-24 17:16:07 +02:00
Christoph Oelckers
c3d5b960ee
- refactored the entire Stereo3D system to get rid of the class hierarchy and all its ugly implications.
...
Ultimately all this needs is a small data table describing the geometric properties of each mode and a single Present function that calls the mode specific variants.
Code size got reduced from 50kb to less than 20kb with proper separation of the generic parts from the OpenGL parts.
2018-06-24 17:16:07 +02:00
alexey.lysiuk
036307927a
- refactored video part of Cocoa backend
...
Window related functionality is moved to framebuffer class
Video settings are now applied properly on startup
2018-06-24 14:20:20 +03:00
Christoph Oelckers
4ef7b66c4b
- partial consolidation of the EyePose classes.
...
The SBS versions can just as easily be handled with an additional parameter.
2018-06-24 11:45:40 +02:00
Christoph Oelckers
840c2c8958
- fixed warning in ADLMidi.
2018-06-24 10:48:04 +02:00
Christoph Oelckers
532fba5c26
- moved the Stereo3D EyePose to their own file in hwrenderer/.
2018-06-24 10:47:42 +02:00
Christoph Oelckers
65849441e5
- disable the wipe code entirely when a stereo3D mode is active.
...
This simply cannot work right so let's better outright disable it.
2018-06-24 09:32:46 +02:00
Christoph Oelckers
a4622e70d0
Merge remote-tracking branch 'remotes/origin/master' into modern
2018-06-23 23:03:51 +02:00
Christoph Oelckers
e7a0ccf879
- fixed remaining issues with portal refactoring.
2018-06-23 23:03:34 +02:00
Christoph Oelckers
6ebec37baf
- moved all portal code that sets up a scene to be rendered into API independent code and let it be handled by a common wrapper class.
2018-06-23 23:03:34 +02:00
Magnus Norddahl
b2fad453fa
- change tonemaps to steps
2018-06-23 19:25:49 +02:00
alexey.lysiuk
3936e3018d
- added window position and size restoration to SDL backend
2018-06-23 16:22:29 +03:00
alexey.lysiuk
663ac919bd
- removed unused header file
2018-06-23 16:21:35 +03:00
Christoph Oelckers
1cf3af9c41
- moved the current portal pointer to HWDrawInfo so that the portal managed does not need to save and restore a global variable for each portal.
2018-06-23 13:51:19 +02:00
Christoph Oelckers
282fdac660
- made the static portal state a struct inside the Renderer object
2018-06-23 13:25:59 +02:00
alexey.lysiuk
009acf3fb2
- added window position and size restoration to Cocoa backend
2018-06-23 12:45:44 +03:00
alexey.lysiuk
573758bc55
- removed obsolete code from Cocoa backend
2018-06-23 12:44:48 +03:00
Christoph Oelckers
82d7e5970f
- moved the clipline uniform to the viewpoint buffer.
...
This was the final one of the per-scene values that could be taken out of the render state.
2018-06-22 23:49:39 +02:00
Christoph Oelckers
7f0e29db48
- fixed clip plane setup.
...
This had to be reordered so that the clip plane gets set before applying the uniforms.
2018-06-22 22:50:33 +02:00
Christoph Oelckers
80a9028938
- mirror clip planes moved - not working yet.
2018-06-22 22:45:05 +02:00
Christoph Oelckers
e7531bb579
- fixed camerapos setup.
2018-06-22 21:44:53 +02:00
Christoph Oelckers
d5af939119
- more uniforms moved.
...
(not working yet.)
2018-06-22 21:32:38 +02:00
Christoph Oelckers
43e1a2d249
- moved uViewHeight and uCameraPos to the viewpoint uniform struct.
2018-06-22 21:05:36 +02:00
Vitaly Novichkov
a5b4d9d9a9
ADLMIDI: Fix one small MSVC Win64 warning
2018-06-22 17:30:51 +02:00
Vitaly Novichkov
ceec12056a
Upgrade libADLMIDI and libOPNMIDI
...
Added ability to switch emulator and it's accuracy level ("enabling of 'run at PCM rate' reduces accuracy, and also reduces CPU usage")
Added draft code for future external banks support (WOPL format for ADLMIDI and WOPN format for OPNMIDI)
ADLMIDI 1.3.3 2018-06-19
* Fixed an inability to load another custom bank without of library re-initialization
* Optimizing the MIDI banks management system for MultiBanks (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima ) for a work!)
* Fixed incorrect 4-op counter which is still catch 4-op instruments on 2-op banks
* Fixed an incorrect processing of auto-flags
* Fixed incorrect initial MIDI tempo when MIDI file doesn't includes the tempo event
* Channel and Note Aftertouch features are now supported correctly! Aftertouch is the tremolo / vibrato, NOT A VOLUME!
* Updated DosBox OPL3 emulator up to r4111 of official DosBox trunk (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima ) for a work!)
* The automatical choosing of 4 operator channels count has been improved (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima ) for a work!)
* Added optional HQ resampler for Nuked OPL3 emulators which does usage of Zita-Resampler library (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima ) for a work!)
ADLMIDI 1.3.2 2018-04-24
* Added ability to disable MUS and XMI converters
* Added ability to disable embedded MIDI sequencer to use library as RealTime synthesizer only or use any custom MIDI sequencer plugins.
* Fixed blank instruments fallback in multi-bank support. When using non-zero bank, if instrument is blank, then, instrument will be taken from a root (I.e. zero bank).
* Added support for real-time switching the emulator
* Added support for CC-120 - "All sound off" on the MIDI channel
* Changed logic of CC-74 Brightness to affect sound only between 0 and 64 like real XG synthesizers. Ability to turn on a full-ranged brightness (to use full 0...127 range) is kept.
* Added support for different output sample formats (PCM8, PCM8U, PCM16, PCM16U, PCM32, PCM32U, Float32, and Float64) (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima ) for a work!)
* Reworked MIDI channels management to avoid any memory reallocations while music processing for a hard real time. (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima ) for a work!)
OPNMIDI 1.3.0 2018-06-19
* Optimizing the MIDI banks management system for MultiBanks (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima ) for a work!)
* Fixed incorrect initial MIDI tempo when MIDI file doesn't includes the tempo event
* Fixed an incorrect processing of auto-flags
* MAME YM2612 now results a more accurate sound as internal using of native sample rate makes more correct sound generation
* Channel and Note Aftertouch features are now supported correctly! Aftertouch is the tremolo / vibrato, NOT A VOLUME!
* Added optional HQ resampler for Nuked OPL3 emulators which does usage of Zita-Resampler library (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima ) for a work!)
OPNMIDI 1.2.0 2018-04-24
* Added ability to disable MUS and XMI converters
* Added ability to disable embedded MIDI sequencer to use library as RealTime synthesizer only or use any custom MIDI sequencer plugins.
* Fixed blank instruments fallback in multi-bank support. When using non-zero bank, if instrument is blank, then, instrument will be taken from a root (I.e. zero bank).
* Added support for real-time switching the emulator
* Added support for MAME YM2612 Emulator
* Added support for CC-120 - "All sound off" on the MIDI channel
* Changed logic of CC-74 Brightness to affect sound only between 0 and 64 like real XG synthesizers. Ability to turn on a full-ranged brightness (to use full 0...127 range) is kept.
* Added support for different output sample formats (PCM8, PCM8U, PCM16, PCM16U, PCM32, PCM32U, Float32, and Float64) (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima ) for a work!)
* Reworked MIDI channels management to avoid any memory reallocations while music processing for a hard real time. (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima ) for a work!)
2018-06-22 17:30:51 +02:00
alexey.lysiuk
9b4e8efcb9
- fixed potential access to freed memory on map loading
...
MapData could destruct FResourceLump objects before accessing them
Loading of map .wad from .pk3 file is example of this case
https://forum.zdoom.org/viewtopic.php?t=60972
2018-06-22 15:42:00 +03:00
Magnus Norddahl
ebf0cef283
- convert colormap shader to postprocess steps
2018-06-22 00:51:58 +02:00
Magnus Norddahl
83f50f5808
- port bloom, blur and camera exposure to postprocess steps and remove the old implementation
2018-06-22 00:29:50 +02:00
Christoph Oelckers
9486180843
- simplify the interface.
2018-06-21 21:36:12 +02:00
Christoph Oelckers
1967165633
- move view and projection matrices to DrawInfo.
2018-06-21 21:02:14 +02:00
Christoph Oelckers
b106f72741
- don't route calls to FMaterial::FlushAll through the framebuffer interface.
2018-06-20 22:18:31 +02:00
Magnus Norddahl
fd2037bd6c
- removed the rest of the old lens and fxaa code
2018-06-20 20:09:37 +02:00
Magnus Norddahl
151ed22967
- write OpenGL backend for hw_postprocess (FGLRenderBuffers::RenderEffect)
...
- remove old fxaa and lens shader classes
- render the fxaa and lens effects
2018-06-20 19:56:30 +02:00
Christoph Oelckers
eb277cc101
- calculate the normal view matrix at a higher level.
2018-06-20 13:49:06 +02:00
Christoph Oelckers
7f5272c23f
Deleted GLSceneDrawer
...
Since it didn't contain any data anymore it was relatively pointless. Code has been moved to FDrawInfo and GLRenderer, depending on its scope.
2018-06-20 13:14:50 +02:00
Christoph Oelckers
f229b05675
- Took more functions out of GLSceneDrawer
2018-06-20 12:57:41 +02:00
Christoph Oelckers
469c9241eb
Moved WriteSavePic implementation to FGLRenderer
2018-06-20 12:29:52 +02:00
Christoph Oelckers
64ce4d5072
- The Teardown virtuals aren't implemented anywhere so they can go away
2018-06-20 11:46:25 +02:00
Christoph Oelckers
f7d8f32114
- removed some unused code from RenderViewpoint
2018-06-20 11:43:10 +02:00
Christoph Oelckers
3a80160ca0
More code from GLSceneDrawer to FDrawInfo
2018-06-20 11:38:45 +02:00
Christoph Oelckers
b244fa2c8b
Took the main render function out of GLSceneDrawer and moved them into FDrawInfo
...
First step of eliminating the intermediate SceneDrawer class which has become mostly redundant.
2018-06-20 11:17:38 +02:00
Christoph Oelckers
677eba3392
- fix the header
2018-06-20 10:48:24 +02:00
Christoph Oelckers
2060402671
Moved the viewpoint setup code in RenderViewpoint to R_SetupFrame
2018-06-20 10:47:03 +02:00
Christoph Oelckers
9bdb5f1a5d
Moved ProcessLowerMinisegs back toAPI independent code.
2018-06-20 10:10:30 +02:00
Magnus Norddahl
e3997d5f11
- convert FXAA and Lens Distort
2018-06-20 01:12:59 +02:00
Magnus Norddahl
684a97f300
- add some helper functions
2018-06-20 00:40:11 +02:00
Christoph Oelckers
922c3a8d75
- moved the basic methofs of HWDrawInfo to a dedicated file instead of storing them somewhere else.
2018-06-19 23:52:01 +02:00
Christoph Oelckers
54970b60e8
- use locally stored viewpoint variables in the hardware renderer.
...
- move a few variables from SceneDrawer to FRenderViewpoint.
The global r_viewpoint variable is left alone now to always represent the current viewpoint to the play code.
The main reason behind this change is to reduce the amount of global variables being used by the hardware renderer's scene processing code.
2018-06-19 23:45:17 +02:00
Magnus Norddahl
da5ecf1e5b
- create bloom pass in declarative postprocess form
2018-06-19 22:16:50 +02:00
Christoph Oelckers
d2309af3d5
Merge remote-tracking branch 'remotes/origin/master' into modern
...
# Conflicts:
# src/d_main.cpp
# src/hwrenderer/scene/hw_weapon.cpp
2018-06-19 19:40:52 +02:00
Christoph Oelckers
eddb179e36
- moved ViewActor variable into FRenderViewpoint.
2018-06-19 18:51:46 +02:00
Christoph Oelckers
87dfa34f1f
- save r_viewpoint as a whole when processing portals.
2018-06-19 17:55:42 +02:00
Christoph Oelckers
753cd0aede
- made R_SetViewAngle a member of r_viewpoint
2018-06-19 17:44:11 +02:00
Christoph Oelckers
2c655322c3
… and in gl_sprites.cpp
2018-06-19 11:21:32 +02:00
Christoph Oelckers
22b8d0a8d7
- r_viewpoint reduction in hwrenderer
2018-06-19 11:21:13 +02:00
Christoph Oelckers
548ccb1df4
- removed some references to r_viewpoint in game code
...
Mainly to reduce number of search results.
2018-06-19 11:20:36 +02:00
Christoph Oelckers
86975a71e8
- don't use r_viewpoint directly when sorting translucent geometry.
...
Better store the view Z in a member variable and use that.
2018-06-19 10:50:48 +02:00
Christoph Oelckers
ae7053ee98
- another small optimization
2018-06-19 10:40:50 +02:00
Christoph Oelckers
12ad0caec0
- small optimization
2018-06-19 10:33:59 +02:00
Christoph Oelckers
fba5b872be
- reduced number of references to r_viewpoint in hw_flats
2018-06-19 10:31:25 +02:00
Christoph Oelckers
3eb4b137f3
- reduced number of references to r_viewpoint in hw_fakeflat.cpp
2018-06-19 10:30:18 +02:00
Christoph Oelckers
18f43dea1e
- reduced number of references to r_viewpoint in hw_sprites.cpp
2018-06-19 10:29:09 +02:00
Christoph Oelckers
cf1641d0f6
- reduce number of places in weapon code which access r_viewpoint directly.
2018-06-19 10:25:11 +02:00
Christoph Oelckers
f857d14e76
-Code shortening
2018-06-19 10:22:27 +02:00
Christoph Oelckers
74d8c929cc
Give the clipper a reference to the current viewpoint
...
This is both for efficiency and encapsulation. At last on MSVC in 64 bit, accessing global variables is very inefficient and the clipper was doing it repeatedly in its worker functions.
It is also one less place where the global viewpoint gets checked.
2018-06-19 09:37:49 +02:00
Christoph Oelckers
46d73e7b4b
Pass ticFrac to the model renderer as a parameter
...
This also removes the rather pointless gl_RenderModel functions because with their two lines of content they can just be placed inline.
2018-06-19 09:18:27 +02:00
Christoph Oelckers
8787905fed
Fixed: DBaseStatusBar::Draw did not use its ticFrac parameter when being called from scripts
...
Instead it directly went to the global viewpoint again which would be inconsistent.
2018-06-19 09:00:50 +02:00
Christoph Oelckers
d73d89762d
Don't let DEarthquake depend on r_viewpoint.
...
The ticFrac value should be passed as a parameter, especially since this gets called from code that sets up r_viewpoint.
2018-06-19 08:32:25 +02:00
Christoph Oelckers
f2aecd47a5
Merge branch 'master' into modern
2018-06-19 08:16:48 +02:00
Christoph Oelckers
c8db149c06
Merge branch 'master' into modern
2018-06-19 00:11:59 +02:00
Magnus Norddahl
01bda6348e
- change swrender mapping to use two buffers/textures and glTexSubImage2D for uploads
2018-06-19 00:09:39 +02:00
alexey.lysiuk
c6e4d6a333
- implemented fullscreen toggle in SDL backend
...
Made window resizable but its size and position are not saved yet
2018-06-18 22:53:19 +03:00
alexey.lysiuk
37a0c1d6c1
- implemented fullscreen toggle in Cocoa backend
...
Window size and position are not saved yet
2018-06-18 22:52:37 +03:00
Magnus Norddahl
67733ed6e6
- change swrender mapping to use two buffers/textures and glTexSubImage2D for uploads
2018-06-18 21:15:52 +02:00
drfrag666
42bb9b7e59
- Fixed zdoom.rc for MinGW.
2018-06-18 20:57:52 +02:00
drfrag666
8afd331275
- Fixed -iwad parameter working only with VS on Windows.
2018-06-18 20:57:52 +02:00
drfrag666
958b3c303a
- Fixed missing manifest for MinGW.
2018-06-18 20:57:52 +02:00
drfrag666
aef4003de2
- Restored dependency on dxguid library for MinGW.
2018-06-18 20:57:52 +02:00
drfrag666
b38e67a53d
- Applied Blzut3's patch to compile with MinGW.
2018-06-18 20:57:52 +02:00
drfrag666
9a4ae6eb80
- Missing include again due to the VS preprocessor.
2018-06-18 20:57:52 +02:00
drfrag666
d8a1d1b89c
- Missing formatting macro definitions for MinGW.
2018-06-18 20:57:52 +02:00
drfrag666
703d2bc0cd
- Fixed missing include due to non conformant preprocessor in VS.
2018-06-18 20:57:52 +02:00
Christoph Oelckers
6b92b95068
- moved vertex creation for skybox sector to backend independent code.
2018-06-18 18:41:59 +02:00
Christoph Oelckers
34ee04f2ce
- moved the matrix math for the sky dome into backend independent code.
2018-06-18 18:18:28 +02:00
Christoph Oelckers
211bd0b1b0
Remove unnecessary check for the ending brace.
2018-06-18 08:51:33 +02:00
Christoph Oelckers
243787d19a
Fixed: End of file detection in MAPINFO parser was not correct
...
It should check for the special "End" flag instead of trusting that if the last token was a closing brace, all was correct. This can fail if the last token in a multiline string is a brace.
2018-06-18 08:26:14 +02:00
Christoph Oelckers
bac435333b
Merge remote-tracking branch 'remotes/origin/master' into modern
2018-06-18 00:24:49 +02:00
Erick Tenorio
c91d4750f3
Save item statistics
...
Items are now saved into save games and are displayed on the statfile
2018-06-18 00:24:23 +02:00
Christoph Oelckers
af0e11f377
- implemented fullscreen toggle for Windows and fixed the window position saver so that it can save and restore the window size as well.
...
This code was written when the window wasn't resizable and didn't actually manage to restore it before. With today's changes this design flaw caused totally incorrect results.
2018-06-17 23:33:22 +02:00
Christoph Oelckers
babe55819e
- fullscreen toggle and some cleanup. Not fully working yet.
2018-06-17 22:11:35 +02:00
alexey.lysiuk
89ce74443b
- adapted SDL backend to new video mode handling
2018-06-17 22:41:05 +03:00
alexey.lysiuk
42587761c7
- adapted Cocoa backend to new video mode handling
2018-06-17 22:35:50 +03:00
Christoph Oelckers
b65b83edb3
- removed the hard screen resolution switch that still was present on Windows and cleaned up the entire video backend code from the remaining support code for this.
...
Like Linux and macOS this will only support borderless fullscreen in the active desktop resolution now, which is what modern systems need.
The list of discrete resolutions has been removed as it makes no sense anymore with a fixed video mode - all the other scaling options remain active, though.
2018-06-17 20:08:35 +02:00
Christoph Oelckers
322488d1d1
- fixed: Horizon portals must be drawn in the context of their containing drawinfo.
...
This data, however, was not passed along to the portal processor and resulted in null pointers when trying to access it.
2018-06-17 18:33:59 +02:00
alexey.lysiuk
33753955ac
- initialized view width and height explicitly
...
It was just a black screen and no menu on startup otherwise
2018-06-17 18:16:04 +02:00
Magnus Norddahl
bce49ad7c8
- fix Software models don't display over nonexistent sprites
2018-06-17 14:56:34 +02:00
alexey.lysiuk
5cf3dbfd5b
- fixed compilation of SDL backend
...
src/posix/sdl/sdlglvideo.cpp:200:4: error: use of undeclared identifier 'I_ClosestResolution'
2018-06-17 14:51:04 +03:00
alexey.lysiuk
832de42c24
- prevented crashes caused by inconsistent status bar
...
Incorrectly initialized or deliberately broken status bar could lead to integer division by zero and null pointer dereference
class BuggyStatusBar : DoomStatusBar
{
override void Init()
{
// No super.Init()
}
}
2018-06-17 14:39:42 +03:00
alexey.lysiuk
f2918b748f
- deleted leftover declaration in Cocoa backend
2018-06-17 14:39:05 +03:00
Christoph Oelckers
dc2a5b0cc9
- consolidated the 3 identical versions of I_CheckResolution and I_ClosestResolution.
2018-06-17 12:30:01 +02:00
Christoph Oelckers
e9e1911fa5
- made the scene scale and offset calculations inline functions of DFrameBuffer.
...
These got repeated quite often.
2018-06-17 12:23:29 +02:00
Christoph Oelckers
1fdf6a20d1
- fixed incomplete null pointer check.
2018-06-17 10:53:55 +02:00
Christoph Oelckers
acdb7e391f
- fixed bad pointer use in stereo3d code.
2018-06-17 10:53:33 +02:00
Christoph Oelckers
684dd8f716
- moved the palette tester to its own file.
2018-06-17 09:55:30 +02:00
Christoph Oelckers
6adff55b5d
- fixed typo in screen blend rendering.
2018-06-17 07:57:29 +02:00
Magnus Norddahl
b4351e538f
- fix weapon missing when bloom was off (scene was already copied to post processing, but nothing had bound the PP frame buffer)
2018-06-17 01:45:20 +02:00
Christoph Oelckers
523104b2a8
- simplify some code.
2018-06-16 23:35:12 +02:00
Christoph Oelckers
4937848123
- refactoring of fixed colormap stuff to have it better organized and to reduce the number of uniforms in the main shader.
...
This removes 3 uniforms, consisting of 9 floats. Those were merged into other values that never get used at the same time.
It also moves the costly setup of the fixed colormap out of the render state into the 2D processing code.
Since 3D forces use of render buffers now, it is no longer necessary to draw the entire scene with the colormap active, meaning it can be handled more efficiently.
2018-06-16 22:40:44 +02:00
Christoph Oelckers
9ff7e5a4ef
- force render buffers to be active.
...
For modern hardware the fallback path really makes no sense and this allows to simplify some things quite a bit.
2018-06-16 09:37:01 +02:00
Christoph Oelckers
8ab68264c1
- removal of all code to handle OpenGL 2. From this commit on the main build of GZDoom will be OpenGL 3.3 or higher.
...
# Conflicts:
# src/gl/renderer/gl_renderer.cpp
# src/gl/shaders/gl_shader.cpp
# src/gl/system/gl_framebuffer.cpp
# src/gl_load/gl_interface.cpp
2018-06-15 21:45:05 +02:00
Christoph Oelckers
1455111ddc
- removed unused declarations.
2018-06-14 22:57:08 +02:00
Christoph Oelckers
612fb40f3a
- don't use uniforms related to fixed colormaps for other things.
...
The fixed colormap is a per-scene global setting that normally does not need to change ever during rendering of a scene so it's easily shoved aside into a static uniform buffer.
Having to change this buffer for inconsequential stuff should be avoided, especially when there's other uniforms that are just as good to hold these values.
2018-06-14 21:28:03 +02:00
alexey.lysiuk
0643b2b1aa
- updated list of headers for CMake generated projects
2018-06-14 15:11:36 +03:00
alexey.lysiuk
19ca416d09
- fixed compilation with GCC and Clang
...
error: no template named 'unique_ptr' in namespace 'std'
2018-06-14 15:10:49 +03:00
Christoph Oelckers
2f4c2e0425
- fixed some includes which did not cause VC++ to error out.
2018-06-13 23:32:43 +02:00
Christoph Oelckers
9a7f9bdb4c
- moved postprocessing shader classes to hwrenderer after removing all dependencies on OpenGL.
2018-06-13 22:37:01 +02:00
Christoph Oelckers
3401876476
- use FShaderProgram through an abstract interface and remove all dependencies on the GL renderer from the shader definition source files.
2018-06-13 22:08:55 +02:00
Christoph Oelckers
8bf009bd89
- added a RenderQueue parameter to all Bind functions of the postprocessing shaders. This is unused for now. All places calling these pass a dummy NOQUEUE value which is just a nullptr.
...
This is for Vulkan preparation where all of this needs to run in a user-specified context so that this code can be moved out of the GL folder without depending on OpenGL's global state model.
2018-06-13 20:30:51 +02:00
Christoph Oelckers
0b9eaac5e1
- fixed SSAO shader texture assignments.
2018-06-13 19:04:19 +02:00
Christoph Oelckers
ce50b0e46b
- read sampler bindings from the shader instead of tagging along a large amount of support data.
...
Works for most shaders, except SSAO.
2018-06-13 17:44:49 +02:00
Christoph Oelckers
59827cd601
- use layout binding qualifiers on uniform buffers when GLSL version >= 4.2
...
This has no performance benefits but allows checking shader generation correctness without having to implement Vulkan first.
2018-06-13 13:16:07 +02:00
Christoph Oelckers
d2dea17e81
- specify vertex attributes in the shader source for Vulkan compatibility.
2018-06-13 08:40:04 +02:00
Christoph Oelckers
ad7aaa8f2a
- specify fragment output locations in the shader source.
...
OpenGL has been supporting this since version 3.3 and Vulkan requires it so it's the way to go.
2018-06-12 23:52:33 +02:00
Magnus Norddahl
832e7818c8
- rewrote the blur shader so that it works the same way as the rest
2018-06-12 22:14:44 +02:00
Christoph Oelckers
cb5caa757b
- moved ShaderUniforms to hwrenderer/ .
2018-06-12 22:08:31 +02:00
Christoph Oelckers
f166624eb2
- some fixes to the PP shader interface.
...
The binding point needs to be part of the ShaderUniforms class because Vulkan will need this value to generate the declaration in the shader source.
There's still one issue here: Since OpenGL has no local render state, the buffer must be bound every time it is used. Once the code is better abstracted this should be moved to a higher level class that knows all associated data and how to set it up.
2018-06-12 21:43:35 +02:00
Christoph Oelckers
4ddd9dde79
Use IUniformBuffer
2018-06-12 17:55:34 +02:00
Christoph Oelckers
20e84fff5a
- fixed crash with GL 3.x and fixed colormap active.
...
This must skip all light processing. On GL 4.5 it will only collect useless data but on GL 3.x it will run into an unmapped buffer situation.
2018-06-12 17:55:20 +02:00
Christoph Oelckers
6fced1865f
Moved ScopedViewShifter to hwrenderer/ .
2018-06-12 14:47:05 +02:00
Christoph Oelckers
f33ddd8cce
Made the ScopedViewShifter fully inline
2018-06-12 14:44:58 +02:00
Christoph Oelckers
5a20de829b
fixed compiler warning
2018-06-12 10:59:17 +02:00
Christoph Oelckers
3385e28611
Make it compile
2018-06-12 10:58:32 +02:00
Christoph Oelckers
b8b5802599
Added a uniform buffer abstraction class
...
May get some more methods later, this is just a start to get going.
2018-06-12 10:42:03 +02:00
Magnus Norddahl
9155b773cc
- change ShaderUniforms so that it just contains the uniform block and not the binding point
2018-06-11 22:33:55 +02:00
Magnus Norddahl
49073489e5
- uniform buffers for the fxaa, blur and bloom shaders
2018-06-11 22:06:46 +02:00
Magnus Norddahl
48f753061a
- uniform buffers for the present and shadowmap shaders
2018-06-11 21:42:09 +02:00
Magnus Norddahl
6fcc79d72a
- uniform buffers for the tonemap shaders
2018-06-11 21:18:20 +02:00
Magnus Norddahl
2bde741a7e
- Uniform buffer for colormap shader
2018-06-11 21:03:55 +02:00
Magnus Norddahl
d22fb24e28
- Uniform buffers for lens shader
2018-06-11 20:58:20 +02:00
Magnus Norddahl
763c5c9769
- change ssao pass to use an uniform block
2018-06-11 20:48:43 +02:00
alexey.lysiuk
29d2e77840
- fixed portal restoration on revisiting level in hub
...
Added function to FLevelLocals to test if map is being reentered
https://forum.zdoom.org/viewtopic.php?t=60455
2018-06-11 11:55:49 +03:00
Christoph Oelckers
bd1525eb9d
- fixed: ADynamicLight's shadowmap index must be reset when loading a savegame.
2018-06-10 22:57:34 +02:00
Magnus Norddahl
a91147a3a5
- move DrawArray and DrawElements to PolyTriangleDrawer
2018-06-10 15:58:01 +02:00
Magnus Norddahl
9ba26a5ece
- add support for using FModelVertex as input to the softpoly vertex shader
2018-06-10 15:29:31 +02:00
Magnus Norddahl
c9fd52340e
- add GroupMemoryBarrierCommand
2018-06-10 13:35:15 +02:00
Magnus Norddahl
efa434d47b
- remove unused VectoredTryCatch
2018-06-10 13:15:31 +02:00
Magnus Norddahl
628f6c32d9
- remove unused DrawerCommand::DebugInfo
2018-06-10 12:54:37 +02:00
Magnus Norddahl
de67393b4e
- use the worker threads to clear the stencil buffer
2018-06-10 12:42:19 +02:00
Christoph Oelckers
8486cd2c0e
- fixed generation of brightmaps for sprites.
...
This forgot to take the added empty border for filtering improvement into account.
2018-06-10 08:22:07 +02:00
Rachael Alexanderson
77956fc485
- remove ARM specific gl_es definition since it's not even really much different from the main line definition, anyhow
2018-06-09 13:40:39 -04:00
Christoph Oelckers
ae1fe041ee
- ZScript used the wrong variable for compatflags2.
...
ii_* is merely the storage for info from the compatibility.txt lump.
2018-06-09 17:59:21 +02:00
alexey.lysiuk
4a1f36623b
- fixed: flag CVars in ZScript referenced wrong addresses
2018-06-09 17:21:55 +03:00
Magnus Norddahl
85f5f897d7
- enable model rendering in the software renderer
2018-06-09 12:29:33 +02:00
Christoph Oelckers
1fdcacc337
- redirect script access to the compatflags CVARs to their internal shadow variables.
...
This is needed so that MAPINFO settings for these flags don't get ignored.
2018-06-08 22:55:44 +02:00
Christoph Oelckers
a312f5a7c1
- update version info.
2018-06-07 00:04:53 +02:00
Magnus Norddahl
2abf700c29
- fix missing include
2018-06-06 00:30:59 +02:00
Magnus Norddahl
5464d2a577
- add dynamic lights to softpoly and software renderer models
2018-06-05 22:43:11 +02:00
Magnus Norddahl
61f379c88f
- fix null pointer crash in softpoly
2018-06-05 22:42:21 +02:00
Christoph Oelckers
2baed338f7
- flat rendering must check for missing vertex buffer data.
2018-06-05 21:44:38 +02:00
Christoph Oelckers
60b6dbadb2
- fixed autoaiming for unranged attacks.
...
The abort condition for the extended checks must completely stop any further processing but the check for this was missing.
2018-06-05 20:35:01 +02:00
Magnus Norddahl
f5386a706f
- fix software renderer dynamic lights not working properly in mirrors
2018-06-05 20:09:02 +02:00
Magnus Norddahl
b74a9965b8
- draw models in mirrors and portals at the right location in the software renderer
2018-06-05 19:36:57 +02:00
Marisa Kirisame
477cf23fd2
Adds "OnGiveSecret" virtual function on Actor for customizing behavior of secret finding.
2018-06-05 10:06:53 -04:00
Magnus Norddahl
674b6ee85c
- avoid using global variables in the inner fuzz drawer loop
2018-06-05 15:43:03 +02:00
Magnus Norddahl
51fd715404
- fix dynlight color not being applied on sprites
2018-06-05 15:32:27 +02:00
Magnus Norddahl
9cd751ae7a
- fix softpoly colored fog bug in the new drawers
2018-06-05 15:16:04 +02:00
alexey.lysiuk
7009755c52
- fix crash on dying when player class has no death states
...
https://forum.zdoom.org/viewtopic.php?t=60815
2018-06-05 11:06:31 +03:00
Marisa Kirisame
fae514f30d
BLOCKASPLAYER flag: treat non-player actors as blockable by "block players" lines
2018-06-04 22:18:51 +02:00
Christoph Oelckers
2f6dc46f14
- fixed FMemArena to always return 16 byte aligned pointers.
...
Unfortunately this turned out harder than expected because of FSharedStringArena making some strong assumptions about the underlying implementation.
2018-06-04 21:51:16 +02:00
Christoph Oelckers
af3d17af8b
Revert "- fix memory arena allocation alignment for 32 bit systems."
...
This reverts commit 23fce56b5e
.
This did not do what it was supposed to because of how the block header was created.
2018-06-04 21:51:16 +02:00
Rachael Alexanderson
780ddd21bd
- fixed - sector sounds were not translated through portal groups properly
2018-06-04 13:10:58 -04:00
Magnus Norddahl
e3c78ab838
- use a light array to simplify inner light math
2018-06-04 00:36:14 +02:00
Magnus Norddahl
97f4cc1951
- use affine dynlights in softpoly
2018-06-03 22:24:44 +02:00
Christoph Oelckers
d18f5eecb4
- Fixed: Dehacked must not validate parameters for MBF special functions.
...
These won't match the conditions.
Additionally this adds disassembly output for the synthesized replacement functions for diagnostics purposes.
2018-06-03 19:28:16 +02:00
Magnus Norddahl
d425fb2d4a
- replace the old rect drawers with new ones based on render styles
2018-06-03 18:36:37 +02:00
Christoph Oelckers
23fce56b5e
- fix memory arena allocation alignment for 32 bit systems.
2018-06-03 18:20:50 +02:00
Christoph Oelckers
a851a5d151
- fixed: For melee attacks with a short attack range P_AimLineAttack must check for hits from above and below.
...
This is necessary to be in line with P_LineAttack which does check for those.
2018-06-03 17:49:00 +02:00
alexey.lysiuk
352f93c066
- deleted now useless code from Cocoa backend
...
Let's rely on cross-platform code to manage window dimensions and screen resolution
2018-06-03 17:48:58 +03:00
alexey.lysiuk
f8f1148c59
- fixed mouse cursor positioning in menu for Cocoa backend
...
With video resolution scaling enabled engine coordinates of mouse cursor were wrong
2018-06-03 17:48:58 +03:00
alexey.lysiuk
b5274534d7
- fixed linking with sanitizer(s) enabled
...
no more unresolved references to various functions
2018-06-03 16:05:14 +03:00
Marisa Kirisame
f74e74ac4b
Mirroring should be flipped on HUD models since the view to world space transform already inverts one axis
2018-06-03 14:20:42 +02:00
Magnus Norddahl
f03c02df43
- fix gamepic render buffer issues
2018-06-03 13:59:40 +02:00
Marisa Kirisame
dea1d0259d
Swap front face culling for GL model drawer (CCW should be the default).
...
Added mirroring handling to software models.
2018-06-03 07:26:55 +02:00
Magnus Norddahl
a186677092
- removed the 8x8 block drawing code from softpoly
2018-06-03 01:44:56 +02:00
Christoph Oelckers
d0aacd3ba8
- fixed: The translucent border draw list must be rendered with depth writing active.
...
This gets exclusively used by portal borders which means that for walls the setting is irrelevant but for flats it is needed to cover the portal surface so that translucent parts of the outer scene do not bleed through.
2018-06-02 23:09:51 +02:00
Magnus Norddahl
0dbcdc8a9c
- fix negative rotation speed not working
2018-06-02 20:35:51 +02:00
Christoph Oelckers
94d1a73ae8
- pass mirroring info to model drawers.
...
Actual evaluation only implemented in OpenGL. Not tested yet because the bug report had no testable example.
2018-06-02 13:07:47 +02:00
Christoph Oelckers
decea97a34
- use a linear light ramp on the textured automap for light modes 0 and 1.
2018-06-02 12:34:21 +02:00
Christoph Oelckers
0c5a47ac90
- fixed: MF3_DONTSPLASH disabled all terrain effects, not just the splash.
...
Untested for now because the report came without any example to check it with.
2018-06-02 12:10:44 +02:00
Marisa Kirisame
58f4af6ded
Transform UE1 vertex coords to GZDoom's when importing, rather than leaving it up to the end user.
2018-06-02 10:00:31 +02:00
alexey.lysiuk
81f042f08b
- fixed compilation with Clang and GCC
...
src/gl/scene/gl_flats.cpp:215:3: error: cannot jump from this goto statement to its label
src/r_data/models/models.cpp💯 18: error: no member named 'floor' in namespace 'std'
2018-06-02 09:43:33 +03:00
Christoph Oelckers
7d515e72c2
- fixed: FxFloatCast must transfer the outer expression's value type to the inner expression if it performs a float->float cast.
...
This violated an important rule that a cast may not alter the expression's type and led to failed asserts elsewhere.
2018-06-02 07:50:23 +02:00
Christoph Oelckers
058c5426cd
- fixed: OpenGL2 should not use the precalculated vertex buffer data for flat rendering.
...
This wasn't set up properly anymore because the new index-based buffer code is not efficient on GL2, but the render function forgot to skip the buffer checks and jump right to the fallback path.
2018-06-02 07:25:41 +02:00
Magnus Norddahl
359b13b783
- fix rotationSpeed being ignored after the model interpolation fix
2018-06-01 20:48:24 +02:00
alexey.lysiuk
7b619bc78c
- fixed crash with legacy render path
...
https://forum.zdoom.org/viewtopic.php?t=60727
2018-06-01 12:28:27 +03:00
alexey.lysiuk
edabe43bca
- fixed typo in previous commit
...
https://forum.zdoom.org/viewtopic.php?t=60739
2018-06-01 12:24:29 +03:00
Christoph Oelckers
2d50f535ff
- fixed and simplified the vertex counter for wall polygons.
...
This is now allowed to overestimate the number of vertices to reduce computation time for a rarely occuring special case that was eating most of the time and was causing errors with some walls.
2018-05-31 22:14:57 +02:00
alexey.lysiuk
bff2c8cf74
- limited length of server CVAR name to 63 characters
...
Due to limitation of network protocol server CVARs with longer names cannot propogate changes of their values properly
https://forum.zdoom.org/viewtopic.php?t=60729
2018-05-31 10:29:58 +03:00
alexey.lysiuk
0546c86716
- fixed Windows XP compatibility for MSVC 2017 targets
...
Workaround initially implemented for MSVC 2015 is enabled with all Windows XP compatible toolsets regardless of Visual Studio version
https://forum.zdoom.org/viewtopic.php?t=60675
2018-05-31 10:24:16 +03:00
alexey.lysiuk
4f5911da21
- fixed rendering of environment map on mirrors
...
With temporarily mapped buffer this feature seems to never work correctly
With persistently mapped buffer it was broken in 9a1603b246
2018-05-30 15:46:53 +03:00
Magnus Norddahl
4e6226fc2d
- replace softpoly block drawers with span drawers and make them use blending rules directly from render styles
...
- add dynlights to softpoly pal mode
2018-05-29 23:32:57 +02:00
Magnus Norddahl
ac207cce85
Merge branch 'master' of https://github.com/coelckers/gzdoom into gzdoom
2018-05-29 23:30:38 +02:00
Christoph Oelckers
ad343892f3
- fixed: When deserializing the object list, the array must be nulled before using it so that a premature abort does not end up working on random data.
2018-05-29 19:00:41 +02:00
alexey.lysiuk
f06ee10495
- use proper map section for wall mirror portal
...
https://forum.zdoom.org/viewtopic.php?t=60671
2018-05-29 12:16:20 +03:00
alexey.lysiuk
a0695cbb48
- fixed blinking frame after saving a game
...
Viewport was not reseted after creation of saved game thumbnail, so one junk frame was rendered right after saving a game
https://forum.zdoom.org/viewtopic.php?t=60412
2018-05-29 12:07:45 +03:00
alexey.lysiuk
0187b0aa5b
- fixed mirrors and reflections in hardware renderer
...
https://forum.zdoom.org/viewtopic.php?t=60671
2018-05-28 11:51:43 +03:00
alexey.lysiuk
36779cf88c
- restore startup game state on restart
...
At least values of custom server CVARs were not restored because of this
https://forum.zdoom.org/viewtopic.php?t=60711
2018-05-27 16:42:48 +03:00
alexey.lysiuk
e085a8d58a
- garbage collect static event handlers on restart
...
Remaining object(s) led to a potential crash on the next garbage collection cycle
Assertion failure was triggered during restarting in Debug configuration
2018-05-27 16:42:48 +03:00
Magnus Norddahl
190b673890
- Modify TriBlendMode enum to match the render styles
2018-05-26 23:06:23 +02:00
Magnus Norddahl
9fb34fd8e6
- add SSE2 version of softpoly span drawer
2018-05-26 16:15:14 +02:00
Magnus Norddahl
7f908ce75d
- implement render styles for the softpoly span drawers
2018-05-26 14:27:54 +02:00
alexey.lysiuk
91f440378e
- fixed minor issues with new line specials
2018-05-26 10:37:01 +03:00
Cacodemon345
b02736c705
Add missing line specials.
2018-05-26 10:36:16 +03:00
Magnus Norddahl
31f29bbe8a
- force model light to be attenuated
2018-05-25 19:23:47 +02:00
alexey.lysiuk
1634b78280
- fixed typo in error message
2018-05-25 11:05:30 +03:00
alexey.lysiuk
a936592cfd
- fixed compilation warning reported by MSVC
...
src\r_videoscale.cpp(105): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data
2018-05-25 10:59:48 +03:00
Raccoon
475d3f0829
Adds line specials
2018-05-24 21:46:32 +02:00
Magnus Norddahl
cadc4f2a30
- add #include support to TEXTURES lump
2018-05-24 21:18:20 +02:00
alexey.lysiuk
7576068202
- fixed compilation warning with MSVC 2015
...
src\polyrenderer\scene/poly_portal.cpp(142): warning C4800: 'line_t *': forcing value to bool 'true' or 'false' (performance warning)
2018-05-24 11:58:51 +03:00
Magnus Norddahl
8098657cf4
- add two-sided culling support in software and poly
2018-05-24 01:39:36 +02:00
Magnus Norddahl
771931db9f
- forgot to remove the remarked comment
2018-05-24 01:00:31 +02:00
Magnus Norddahl
fb9cf33af6
- enable #include support in modeldef files
2018-05-24 00:59:45 +02:00
Christoph Oelckers
496e6e2e8f
- fixed: The vertex height updater was using the index buffer offsets to access the vertex buffer.
...
I missed this part when repurposing the vboindex members to store the index buffer offsets.
However, since both indices are needed, they need another set of variables.
2018-05-24 00:01:56 +02:00