Commit graph

1019 commits

Author SHA1 Message Date
Christoph Oelckers
a3265c2963 - more direct native entry points. 2018-12-04 23:12:16 +01:00
Christoph Oelckers
a0c0e8bdfe Merge remote-tracking branch 'remotes/origin/weapon_scriptification' into asmjit
# Conflicts:
#	src/g_inventory/a_pickups.cpp
2018-11-30 21:28:44 +01:00
Magnus Norddahl
8b852ce4d8 - move the jit runtime to its own file 2018-11-26 10:46:09 +01:00
Christoph Oelckers
47b1fa774d Merge branch 'asmjit' into weapon_scriptification
# Conflicts:
#	src/gi.cpp
#	wadsrc/static/zscript/base.txt
2018-11-26 00:14:44 +01:00
Christoph Oelckers
dc16c1d44e - moved VM thunks from p_sectors.cpp to a separate file and started adding direct native implementations.
For a few larger functions I took them out of sector_t and made them global functions to avoid creating more unnecessary stubs.
2018-11-25 11:34:50 +01:00
Christoph Oelckers
6fc63b9b78 - started with a ScriptUtil class which will allow moving function implementations for ACS and FraggleScript to zscript.txt
So far 3 functions for testing implemented.
2018-11-24 13:06:01 +01:00
Christoph Oelckers
fb7345e470 Merge branch 'master' into asmjit 2018-11-09 22:36:16 +01:00
Christoph Oelckers
9661c3b53c - moved hw_Sections to r_data, because this is an essential component of the dynamic light system now so it is needed for all renderers. 2018-11-07 00:53:44 +01:00
Christoph Oelckers
625eb1e76a - FVertexBuilder's output looks correct now. 2018-11-05 21:11:54 +01:00
Christoph Oelckers
49bfdbef9f - create an intermediate structure between sectors and subsectors.
A section is a continuous part of a sector or in some case of several nearby continuous parts. For sectors with far away parts multiple sections will be created, especially when they lie in disjoint parts of the map.
This is mainly supposed to cut down on time for linking dynamic lights. Since they need to traverse subsectors to find all touching sidedefs a more coarse data structure that only contains the info needed for this is more suitable. In particular, this does not contain any intra-sector lines, i.e. those with both sides in the same sector.
2018-11-04 20:10:51 +01:00
Magnus Norddahl
369dcfd57f Merge remote-tracking branch 'origin/master' into asmjit 2018-11-01 21:23:26 +01:00
ZZYZX
b911bbc424 Single commit - destructible geometry feature 2018-10-31 17:22:09 +01:00
Christoph Oelckers
190a225301 - minor cleanup. 2018-10-29 13:00:12 +01:00
Christoph Oelckers
8991537e57 - moved the 2D drawer tp hwrenderer. 2018-10-29 12:14:36 +01:00
Christoph Oelckers
5528981a77 - CreateScene, too. 2018-10-28 23:32:13 +01:00
Christoph Oelckers
cb4ffbf053 - moved the draw lists back to the API independent side.
The original idea was to let Vulkan do this completely differently, but if that comes to pass it should be done without having generic data maintenance code on the API side.
2018-10-28 19:06:29 +01:00
Christoph Oelckers
e6efee61b1 - moved the last remaining function from gl_shadowmap.cpp elsewhere so that the file can be deleted. 2018-10-28 17:09:22 +01:00
Christoph Oelckers
b2776c9351 - moved lightbuffer files to hwrenderer. 2018-10-28 15:09:33 +01:00
Christoph Oelckers
c5b3b9e107 - moved the viewpoint buffer to hwrenderer. 2018-10-28 13:26:47 +01:00
Christoph Oelckers
3b26e64404 - renamed the 'vertexbuffer' files to 'buffers' because it's now generic for all buffer types. 2018-10-28 12:04:20 +01:00
Christoph Oelckers
a1fb1f60f4 - replaced IUniformBuffer with IDataBuffer, which reuses the code for the other buffer types and is more flexible. 2018-10-28 11:54:26 +01:00
Christoph Oelckers
9e109995cd - moved model renderer to hwrenderer after removing the remaining traces of OpenGL. 2018-10-28 00:40:41 +02:00
Christoph Oelckers
83e706afe7 - - removed the remains of the old FVertexBuffer class. 2018-10-27 22:04:13 +02:00
Christoph Oelckers
bb09f5488f - added an abstract base vertex buffer class. 2018-10-27 09:07:26 +02:00
Christoph Oelckers
3940f17980 - portals are now completely on the hwrenderer side.
The only thing that still needs to be on the backend side is the one function that manages the rendering.
2018-10-25 00:25:55 +02:00
Christoph Oelckers
93599e483f - moved weapon drawing to hwrenderer. 2018-10-22 23:40:44 +02:00
Christoph Oelckers
3775c4756e - moved sprite drawer to hwrenderer as well. 2018-10-21 17:50:01 +02:00
Christoph Oelckers
a3aaa5cc8b - removed old RenderStyle management. 2018-10-21 14:18:08 +02:00
Christoph Oelckers
3b7a5da83e - moved AddFlat to gl_drawinfo.cpp and deleted gl_flats.cpp. 2018-10-21 00:38:56 +02:00
Christoph Oelckers
e8f48e7535 - moved the color/fog setters to hwrenderer. 2018-10-20 23:33:07 +02:00
Christoph Oelckers
9253118bdc - removed the quad drawer class
This isn't needed anymore.
2018-10-20 11:59:12 +02:00
Magnus Norddahl
c5a5265e40 Merge remote-tracking branch 'origin/master' into asmjit 2018-10-07 06:32:13 +02:00
Vitaly Novichkov
59c8d8ff64 Upgrade libADLMIDI and libOPNMIDI
Added full-panning stereo, improvement of channel management, and many other things.

Also, I have implemented an ability to use custom WOPL (for libADLMIDI) and WOPN (for libOPNMIDI) banks from the same path as "soundfonts", but also, in the same environment, the "fm_banks" folder was added for WOPL/WOPN storing purposes.
To toggle usage of embedded or custom bank, I have added togglable booleans. When bank fails to be loaded, the default embedded bank is getting to be used as fallback.

ADLMIDI 1.4.0   2018-10-01
 * Implemented a full support for Portamento! (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
 * Added support for SysEx event handling! (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
 * Added support for GS way of custom drum channels (through SysEx events)
 * Ignore some NRPN events and lsb bank number when using GS standard (after catching of GS Reset SysEx call)
 * Added support for CC66-Sostenuto controller (Pedal hold of currently-pressed notes only while CC64 holds also all next notes)
 * Added support for CC67-SoftPedal controller (SoftPedal lowers the volume of notes played)
 * Fixed correctness of CMF files playing
 * Fixed unnecessary overuse of chip channels by blank notes
 * Added API to disable specific MIDI tracks or play one of MIDI tracks solo
 * Added support for more complex loop (loopStart=XX, loopEnd=0). Where XX - count of loops, or 0 - infinite. Nested loops are supported without of any limits.
 * Added working implementation of TMB's velocity offset
 * Added support for full-panning stereo option (Thanks to [Christopher Snowhill](https://github.com/kode54) for a work!)
 * Fixed inability to play high notes due physical tone frequency out of range on the OPL3 chip

OPNMIDI 1.4.0   2018-10-01
 * Implemented a full support for Portamento! (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
 * Added support for SysEx event handling! (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
 * Added support for GS way of custom drum channels (through SysEx events)
 * Ignore some NRPN events and lsb bank number when using GS standard (after catching of GS Reset SysEx call)
 * Added support for CC66-Sostenuto controller (Pedal hold of currently-pressed notes only while CC64 holds also all next notes)
 * Added support for CC67-SoftPedal controller (SoftPedal lowers the volume of notes played)
 * Resolved a trouble which sometimes makes a junk noise sound and unnecessary overuse of chip channels
 * Volume models support taken from libADLMIDI has been adapted to OPN2's chip speficis
 * Fixed inability to play high notes due physical tone frequency out of range on the OPN2 chip
 * Added support for full-panning stereo option

ADL&OPN Hotfix: re-calculated default banks
The fix on side of measurer of OPL3-BE and OPN2-BE where some instruments getting zero releasing time.
2018-10-04 08:58:47 -04:00
Magnus Norddahl
4e85134d8e Merge remote-tracking branch 'gzdoom/master' into asmjit 2018-09-14 02:09:17 +02:00
Magnus Norddahl
ef170883ef - split JitCompiler into multiple files 2018-09-13 02:29:04 +02:00
Christoph Oelckers
5e39890118 - use a uniform buffer for per-scene data like rotation matrices. 2018-09-02 18:40:36 +02:00
Christoph Oelckers
bec588eaf4 - moved the two remaining functions from gl_wipe.cpp to gl_framebuffer.cpp and deleted the file.
The single most hideous thing in the GL renderer is finally gone. :)
2018-09-02 12:03:18 +02:00
Magnus Norddahl
55955b9c22 Merge remote-tracking branch 'gzdoom/master' into asmjit 2018-09-02 03:46:06 +02:00
Kevin Caccamo
1c15fb2408 Initial work on OBJ model support
What works:
- Parsing the model
- Constructing geometry (surfaces) for triangulated models

What doesn't:
- Rendering the model
- Building the vertex buffer
- Triangulating quads
2018-09-01 07:28:26 +02:00
Magnus Norddahl
cbb945d8a7 - embed and use asmjit to JIT ZScript VM functions 2018-08-12 02:11:13 +02:00
Rachael Alexanderson
bd1e484c1e - redo the menu a bit, add in some C++ support code to make it a little bit more flexible
- further tweaks. reduce clutter in custom resolution submenu by moving it to another
- add 'prevmenu' ccmd
2018-08-02 07:37:07 -04:00
Rachael Alexanderson
21575bc3df - re-enable stats sending
- re-direct stats sending to new stats script
2018-07-21 07:21:37 -04:00
Christoph Oelckers
1294f3df64 - replaced the procedural backdrop texture with some warped noise texture.
This was done because the backdrop as implemented was the only texture in the entire game that had to be deleted and recreated each frame.
However, with Vulkan this would have necessitated quite a bit of synchronization with the render pipeline which wasn't really feasible just for this one single texture.
Now the texture manager can assume that once a texture was created it will be immutable and never has to change.
2018-07-15 00:00:00 +02:00
Christoph Oelckers
ed856085f4 - use the Dim function to draw the palette tester.
This looks better, consumes less resources and removes one ugly special texture from the engine.
2018-07-14 18:28:12 +02:00
Magnus Norddahl
35c13763db - convert the SSAO pass to use hw_postprocess 2018-06-30 15:24:13 +02:00
Magnus Norddahl
61d69f5561 Merge remote-tracking branch 'gzdoom/modern' into hw_postprocess 2018-06-26 02:12:49 +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
Magnus Norddahl
32d837cdf1 Merge remote-tracking branch 'gzdoom/modern' into hw_postprocess 2018-06-24 17:57:02 +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
Christoph Oelckers
532fba5c26 - moved the Stereo3D EyePose to their own file in hwrenderer/. 2018-06-24 10:47:42 +02:00
Christoph Oelckers
a4622e70d0 Merge remote-tracking branch 'remotes/origin/master' into modern 2018-06-23 23:03:51 +02:00
Magnus Norddahl
b2fad453fa - change tonemaps to steps 2018-06-23 19:25:49 +02:00
Christoph Oelckers
282fdac660 - made the static portal state a struct inside the Renderer object 2018-06-23 13:25:59 +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
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
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
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
Magnus Norddahl
da5ecf1e5b - create bloom pass in declarative postprocess form 2018-06-19 22:16:50 +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
drfrag666
aef4003de2 - Restored dependency on dxguid library for MinGW. 2018-06-18 20:57:52 +02:00
Christoph Oelckers
babe55819e - fullscreen toggle and some cleanup. Not fully working yet. 2018-06-17 22:11:35 +02: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
684dd8f716 - moved the palette tester to its own file. 2018-06-17 09:55:30 +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
alexey.lysiuk
0643b2b1aa - updated list of headers for CMake generated projects 2018-06-14 15:11:36 +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
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
f33ddd8cce Made the ScopedViewShifter fully inline 2018-06-12 14:44:58 +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
alexey.lysiuk
b5274534d7 - fixed linking with sanitizer(s) enabled
no more unresolved references to various functions
2018-06-03 16:05:14 +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
Christoph Oelckers
3f6789ecac - moved gl_bsp.cpp to its proper place. 2018-05-22 21:36:42 +02:00
Christoph Oelckers
ab3bacdaf5 - added missing files to project. 2018-05-18 23:00:10 +02: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
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
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
alexey.lysiuk
ce18ff1df3 - use libc++ for all targets on macOS
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9
2018-05-06 09:44:13 +03:00
Christoph Oelckers
74b624002c - moved the software renderer's drawer to the swrenderer directory. 2018-05-05 11:44:42 +02:00
Christoph Oelckers
c2ac985357 - split off the utility functions from gl_weapon.cpp.
Meaning there's only half as much code left to clean up.
2018-04-29 23:38:26 +02:00
Christoph Oelckers
9350eee0c0 - GLDrawList moved to hwrenderer/. 2018-04-29 12:56:06 +02:00
Christoph Oelckers
634b3cf413 - moved gl_spritelight out of gl/. This required a few more changes:
* split gl_shadowmap.cpp into a GL dependent and an API independent part.
* gl_drawinfo must be kept around for the HUD sprite because it connects the renderer with the hardware indpendent part of the engine.
2018-04-29 11:00:34 +02:00
Christoph Oelckers
64b108ff44 - hw_sprites extracted
- moved the variables for OpenGL's special textures to the texture manager because it is far better suited as a container than the GLRenderer.
2018-04-29 00:09:44 +02:00
Christoph Oelckers
243e12bd8f - split gl_flats.cpp 2018-04-28 13:24:45 +02:00
Magnus Norddahl
5cdea39b35 - add the missing header files in the vs solution explorer 2018-04-28 13:11:55 +02:00
Christoph Oelckers
d694e19f01 - split off the data generation parts of gl_skydome.cpp 2018-04-28 00:50:42 +02:00
Christoph Oelckers
785a6c2ce5 - moved gl_sky.cpp 2018-04-28 00:22:25 +02:00
Christoph Oelckers
fe2bfc6f11 - moved the API-independent parts of the decal code to hwrenderer/. 2018-04-27 20:34:20 +02:00
Christoph Oelckers
fc0d673935 - moved the files 2018-04-27 00:28:30 +02:00
Christoph Oelckers
dd524b046e - GLWall is mostly clean, except some smaller things in gl_sky.cpp 2018-04-27 00:22:00 +02:00
Christoph Oelckers
306b630de2 - merged the remains of gl_texture.cpp into hw_cvars.cpp.
- eliminated hqresize.cpp's dependency on GL headers.
- cleaned up the logic for CreateTexBuffer so that hqresize.cpp does not need to check for software warped textures anymore.
2018-04-25 21:02:50 +02:00
Christoph Oelckers
ceeb479261 - moved the CVAR definitions from gl/ to hwrenderer/.
- disabled gl_texture_format because in its existing form it is mostly a useless feature.
2018-04-25 20:33:55 +02:00
Christoph Oelckers
cf8ee3130b - gl_clock moved to hwrenderer. 2018-04-25 18:39:54 +02:00
Christoph Oelckers
bc8f47444f - texture precaching also moved to hwrenderer/. 2018-04-25 00:07:46 +02:00
Christoph Oelckers
1a024a9f54 - moved gl_material into hwrenderer/. 2018-04-24 23:39:58 +02:00