Commit graph

14987 commits

Author SHA1 Message Date
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
013ac247ca Merge branch 'modern' of https://github.com/coelckers/gzdoom into modern 2018-06-19 23:52:19 +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