Commit graph

13171 commits

Author SHA1 Message Date
Christoph Oelckers
14410ae526 - fixed: FDrawInfo must be kept around until DrawEndScene2D finishes.
Otherwise some code crashes on invalid data.
2018-05-01 19:01:01 +02:00
Christoph Oelckers
9bdb0f2e49 - renamed the flag bits for sector_t::MoreFlags, so that they are easier to distinguish from sector_t::Flags.
- precalculate if a sector's floor and ceiling plane overlap. This avoids rechecking this for each single call of hw_FakeFlat.
- vertices must be marked dirty every time they change after map setup. That means that ChangePlaneTexZ must do this as well, because it cannot rely on interpolation taking care of it.
- Having a 'dirty' argument for SetPlaneTexZ's ZScript version makes no sense. If the value changes from the script side the vertices must always be marked to be recalculated.
2018-05-01 11:29:29 +02:00
Christoph Oelckers
f49c6cbde2 - use sector_t::GetHeightSec consistently and optimize it.
This was all over the place, with half of it using the function and half doing incomplete checks on the underlying variables.
Also did some optimization on the IGNOREHEIGHTSEC flag: Putting it on the destination sector instead of the model sector makes the check even simpler and allows to precalculate the effect of 3D floors on the heightsec, which previously had to be run on every call and made the function too complex for inlining.
2018-05-01 09:47:09 +02:00
Christoph Oelckers
3c49804c6c - some Transfer_Heights related optimizations.
* only call hw_CheckViewArea if the result is not known yet.
* check the map up front if it even contains heightsecs. This allows to shortcut the above check entirely for maps without sector transfers and will allow further optimizations.
2018-05-01 09:02:24 +02:00
Christoph Oelckers
b35213741f - don't force the renderer to remain active in windowed mode when in the background.
It's ok to have this as an option, but not as an unconditional forced feature.
2018-05-01 07:48:59 +02:00
Christoph Oelckers
af76e9a9c4 - allow animated title pics.
This also applies to all other images shown in the title loop as well.
2018-04-30 23:48:59 +02:00
Christoph Oelckers
7aea010892 - added a sector index to the subsector struct.
This will be used to process dynamic lights for flats in the processing pass, allowing to remove the lights-only pass entirely.
2018-04-30 23:48:16 +02:00
Christoph Oelckers
ecb1578a7a - changed model lighting setup to be done in the processing pass.
This eliminates the different code paths for GL3 and GL4.5.
2018-04-30 23:06:48 +02:00
Christoph Oelckers
fbbf2f8346 - fixed a few things in the weapon drawer. 2018-04-30 21:42:36 +02:00
Christoph Oelckers
2b5019ea6e - fix for rendering a brightmapped 2D texture with ColorIsFixed render style.
This must disable the brightmap.
2018-04-30 21:28:06 +02:00
Hisymak
07586af6d1 Fix OPL Synth note cutoffs and issues after removal of MusLib
This should fix bug reported in https://forum.zdoom.org/viewtopic.php?
f=104&t=56682.
There were two problems:
1. Algorithm to select a free voice was not appropriate. Changed to a
simple "least-recently-freed voice" algorithm.
2. Sustained voices were treated as used voices and never got replaced.
Now sustained voices are preferentially replaced when there are no free
voices.
2018-04-30 18:21:30 +02:00
alexey.lysiuk
76ed80fe56 Fixed randomly colored weapons 2018-04-30 10:35:18 +03:00
Christoph Oelckers
ebc1c5741b - some more weapon code extracted. 2018-04-30 00:09: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
d904fba05b - trying to clean up the weapon renderer.
Some of the data generation has been offloaded to subfunctions to get the main function down to something manageable for refactoring.
2018-04-29 22:30:52 +02:00
Christoph Oelckers
67cb6e63b5 - cleanup of the 2D interface.
Lots of this was still laid out for DirectDraw. This removes most of Begin2D so that it can be done more cleanlz.
Note that this commit renders weapon sprites and screen blends incorrectly. Those will be fixed in an upcoming commit.
2018-04-29 20:15:19 +02:00
Christoph Oelckers
1345c8e7b4 - fixed: NewDecal should not be called unless it is guaranteed that the decal will be rendered.
This left partially initialized items in the render list.
2018-04-29 19:28:13 +02:00
Christoph Oelckers
4d72214fd5 - fixed a memory leak in the FileReader. 2018-04-29 19:09:51 +02:00
Christoph Oelckers
852c42bbd4 - fixed dynamic lights in legacy mode.
Since they mess around with the texture coordinates, these need to be backed up and restored afterward.
There was also an issue with the ValidNormal check that was suffering from imprecisions that cause walls to be skipped, so the check was removed because it was mostly pointless.
2018-04-29 19:00:17 +02:00
Christoph Oelckers
6cd8b1b3eb - With dynamic light data creation being done in the preparation pass, the light buffer must be mapped while this is running for it to work on older hardware. 2018-04-29 17:36:51 +02:00
Christoph Oelckers
f91511bd84 - removed the leftover code for running walls through GLPASS_LIGHTSONLY.
Unless in legacy mode, all dynamic light setup is now being done in the preparation pass, for both LM_DEFERRED and LM_DIRECT.
2018-04-29 17:27:28 +02:00
alexey.lysiuk
e9d84b8820 Fixed compilation of non-Windows targets
src/hwrenderer/dynlights/hw_aabbtree.h:45:2: error: no template named 'TArray'
src/hwrenderer/dynlights/hw_aabbtree.h:48:2: error: no template named 'TArray'
2018-04-29 16:12:33 +03:00
Christoph Oelckers
06d20e13b8 - cleaned up the gamma correction code.
This had accumulated quite a bit of cruft by now and parts of it should be in non OpenGL code.
2018-04-29 13:45:53 +02:00
Christoph Oelckers
9e6f3787c6 - moved PTM_BestColor to v_palette.cpp and removed its dependencies on CVARs. 2018-04-29 13:10:30 +02:00
Christoph Oelckers
9350eee0c0 - GLDrawList moved to hwrenderer/. 2018-04-29 12:56:06 +02:00
Christoph Oelckers
77b301612a - some refactoring of GLDrawList to remove implementation-specific parts from this class. 2018-04-29 12:32:21 +02:00
Christoph Oelckers
ec13b77717 - removed empty gl_wall.h. 2018-04-29 11:40:47 +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
819ea8f937 - reduced gl_spritelight.cpp to pure data setup so that it can be moved out of gl/.
- added thread_local to some static arrays being used for setting up dynamic lights.

Right now it's of little consequence but these will have to be maintained per thread if the render data setup is done by worker tasks.
2018-04-29 09:33:36 +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
d1720ad790 - GLSprite rework. 2018-04-28 20:02:17 +02:00
alexey.lysiuk
6d308ca67e Fixed walkthrough blocker in Sin City 2 via compatibility entry
It was impossible to complete Sin City 2 The Satan Complex without cheating since ZDoom 2.6.0
Change in applying of DeHackEd patches from 77a4b9a29b broke triggering of important linedef that pushes friendly marine to exit switch

https://www.doomworld.com/idgames/levels/doom2/Ports/s-u/satanx
2018-04-28 17:45:15 +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
c5641a0e72 - GLFlat split into API-dependent and -independent data.
No resorting of the files yet.
2018-04-28 12:34:09 +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
cc926dec1e - removed gl dependencies from gl_sky.cpp by moving some data into other places. 2018-04-28 00:18:49 +02:00
Christoph Oelckers
59477362d9 Merge branch 'wallwork' 2018-04-27 20:37:54 +02:00
Christoph Oelckers
c2333db725 Merge branch 'master' of https://github.com/coelckers/gzdoom 2018-04-27 20:37:44 +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
678ac40b72 - cleaned up includes for gl_decal.cpp 2018-04-27 20:28:59 +02:00
Christoph Oelckers
383ff0d8b8 - moved code around. 2018-04-27 20:21:22 +02:00
Christoph Oelckers
0d7c2527f2 - finished decal render refactoring.
Decals will now be processed into a list in the processing pass, allowing to use the vertex buffer even on GL3 hardware and to offload this part of the work to a multithreaded worker task.
2018-04-27 20:18:52 +02:00
Christoph Oelckers
1ae2f06161 Merge branch 'wallwork' of https://github.com/coelckers/gzdoom into wallwork 2018-04-27 18:53:08 +02:00
Christoph Oelckers
58c0431396 - copied gl_SetupLights to hw_walls.cpp. 2018-04-27 18:53:01 +02:00
alexey.lysiuk
2ae8b0c093 Added startup song definition for custom IWADs
https://forum.zdoom.org/viewtopic.php?t=60314
2018-04-27 13:32:38 +03:00
Christoph Oelckers
200848a487 Decal work. Not finished yet. 2018-04-27 11:40:23 +02:00
alexey.lysiuk
8dfd1e6490 Removed unsupported versions of macOS from detection list 2018-04-27 11:04:19 +03:00
Christoph Oelckers
bbea6e7e3c Begin2D doesn't need a return type anymore
This was to tell the caller that software 2D was in use, but that doesn't exist anymore
2018-04-27 09:58:19 +02:00
Christoph Oelckers
90a1614ac8 The intermission drawer doesn't need to check the return of Begin2D anymore 2018-04-27 09:34:43 +02:00
Christoph Oelckers
fbcf2033c6 Corrected render style definition 2018-04-27 09:34:02 +02:00
Christoph Oelckers
0dc82fe755 - header cleanup for gl_swscene. 2018-04-27 00:53:58 +02:00
Christoph Oelckers
9d13e6b7ec - gl_colormap.h is no longer needed. 2018-04-27 00:31:00 +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
937a2cf69f - abstracted the vertex allocator. 2018-04-26 20:07:56 +02:00
Christoph Oelckers
9a1603b246 - made GLWall ready for multithreaded processing.
* to do this efficiently the amount of required vertices needs to be calculated up-front
* always create the vertices in the data generation pass, not the render pass.
* added synchronisation code to the vertex buffer allocator.

Without multithreading this causes a slight slowdown, due to added processing cost. (Frozen Time bridge scene drops from 47 fps to 44 fps on my test machine.
2018-04-26 19:25:11 +02:00
alexey.lysiuk
3111ec97bb Fixed crash during line tracing when enter sector is null
https://forum.zdoom.org/viewtopic.php?t=60371
2018-04-26 17:33:05 +02:00
alexey.lysiuk
86232df5ee Fixed rendering of walls and flats
With high resolution textures enabled (gl_texture_usehires CVAR set to true) and without hires textures loaded walls and flats were black
2018-04-26 10:37:27 +03:00
Christoph Oelckers
6e58f72329 - continued reorganization of GLWall. 2018-04-26 07:07:46 +02:00
Christoph Oelckers
1ae6ad2a82 - moved the legacy member functions of GLWall to FDrawInfo. 2018-04-25 22:58:56 +02:00
Christoph Oelckers
41d5bd76d4 - moved decal rendering from GLWall to FDrawInfo.
First step of turning GLWall into a pure data container.
2018-04-25 22:09:12 +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
ZZYZX
3129840a04 Only call additional LineCheck if there are 3D floors 2018-04-25 19:38:29 +02:00
ZZYZX
3eef3d7845 Implemented workaround for ZScript LineTrace with 3D floors 2018-04-25 19:38:29 +02:00
Christoph Oelckers
85300993af - replaced gl_PatchMenu with an MMX 'ifoption' check. 2018-04-25 19:36:48 +02:00
Christoph Oelckers
cf8ee3130b - gl_clock moved to hwrenderer. 2018-04-25 18:39:54 +02:00
Christoph Oelckers
982776d48d - removed dependencies on GL-API related classes from gl_walls.cpp and gl_sky.cpp
Not complete yet, but at least the GLWall memberes no longer reference GLSceneDrawer and the implementation dependent parts of FDrawInfo.
2018-04-25 14:58:13 +02:00
Christoph Oelckers
bf81799701 - typo 2018-04-25 13:59:27 +02:00
Christoph Oelckers
81341ac6c5 - Moved all static variables in hw_renderhacks into HWDrawInfo
- removed the profiling code from hw_renderhacks because it was broken in its current state and if still needed needs to be redone differently.
2018-04-25 13:59:14 +02:00
Christoph Oelckers
1648fc6a07 Fixed initialization issues with dynamic lights.
Actors get initialized from their defaults so anything done in the constructor or some explicit member initialization will be overwritten.
They must use their properties for setting up configurable fields and do the rest in BeginPlay.
2018-04-25 09:14:01 +02:00
Christoph Oelckers
f4e139485a - fixed return value of hw_CheckViewArea. 2018-04-25 00:30:35 +02:00
Christoph Oelckers
bc8f47444f - texture precaching also moved to hwrenderer/. 2018-04-25 00:07:46 +02:00
Christoph Oelckers
e24b597ae4 - got rid of the gl_info substructure in FTexture and moved all elements into the main class. 2018-04-24 23:51:19 +02:00
Christoph Oelckers
1a024a9f54 - moved gl_material into hwrenderer/. 2018-04-24 23:39:58 +02:00
Christoph Oelckers
0675315b41 - made FHardwareTexture inherit from an abstract interface to remove all GL dependencies from gl_material.cpp. 2018-04-24 23:06:34 +02:00
Christoph Oelckers
f9a82e66e4 - removed all GL dependencies from gl_material.h. 2018-04-24 22:37:52 +02:00
Christoph Oelckers
5e8a4b96fe - make sure that warping textures never create a warped true color image.
This replaces the old redirection hackery that had to work differently for the legacy render path.
Overriding CopyTrueColorTranslated is far more robust and ensures that no edge cases can reach the GetPixels function, which wasn't the case before.
2018-04-24 21:58:26 +02:00
Christoph Oelckers
c37ff22a05 - removed the intermediate FGLTexture class.
This wasn't serving any real purpose anymore, and all its remaining functionality could be moved to FHardwareTexture
2018-04-24 20:41:52 +02:00
Christoph Oelckers
8d62ebd2f4 - renamed the functions in hw_fakeflat.cpp 2018-04-24 17:52:35 +02:00
Christoph Oelckers
0dcc6ec6d3 Merge branch 'master' of https://github.com/coelckers/gzdoom
# Conflicts:
#	src/CMakeLists.txt
#	src/gl/renderer/gl_renderer.h
#	src/gl/scene/gl_portal.cpp
#	src/gl/scene/gl_scene.cpp
2018-04-24 17:39:03 +02:00
alexey.lysiuk
2ae8d39441 Removed all superfluous #include's
Automatically optimized by CLion IDE with manual corrections
2018-04-24 14:30:35 +03:00
Christoph Oelckers
e55b52f356 Moving the files to hwrenderer/ 2018-04-24 11:58:04 +02:00
Christoph Oelckers
dbb1492bf9 Fully separated HWDrawInfo from GL dependencies.
This also required temoporarily moving one small function because in the current state this cannot be done in the API independent part.
2018-04-24 11:52:15 +02:00
Christoph Oelckers
a803b3d393 Split FDrawInfo in two
Done so that the entire gl_renderhacks.cpp file can be moved out of the GL folder.
Not cleaned up yet
2018-04-24 10:30:26 +02:00
Magnus Norddahl
45625399dc - fix softpoly line portals 2018-04-23 23:09:11 +02:00
Christoph Oelckers
a93799b21f - moved the "unused" folder to the repo's top level. 2018-04-23 22:25:29 +02:00
Christoph Oelckers
5ca1fca8d1 - moved gl_clipper and gl_fakeflat to the hwrenderer folder because both files do not contain anything API specific. 2018-04-23 22:18:13 +02:00
Christoph Oelckers
60567f207c - made CheckViewArea a global function.
This can be put into the common hwrenderer folder but for that it shouldn't be part of the scene drawer.
2018-04-23 22:10:11 +02:00
alexey.lysiuk
c264ff05da All platform-specific headers are referenced by generated projects
This was already the case on Windows anyway
2018-04-23 22:15:11 +03:00
alexey.lysiuk
6ac0c2f569 Excluded unused .cpp file from compilation 2018-04-23 18:42:59 +03:00
Magnus Norddahl
2aee68d215 - slightly improve sector portal handling in softpoly 2018-04-23 01:03:37 +02:00
Magnus Norddahl
6e77cb4906 - fix softpoly mirrors 2018-04-22 23:29:39 +02:00
Magnus Norddahl
16a8d71caf - Simplify the portal code in softpoly somewhat 2018-04-21 15:19:28 +02:00
alexey.lysiuk
b0261d9545 Actor's Activation property is now stored in saved game
https://forum.zdoom.org/viewtopic.php?t=60295
2018-04-21 13:12:12 +03:00
alexey.lysiuk
9398d602f8 Fixed applying of dymanic lights to models
https://forum.zdoom.org/viewtopic.php?t=60301
2018-04-19 12:50:07 +03:00
alexey.lysiuk
75129f54b4 Deleted remnants of old software backend 2018-04-19 12:44:20 +03:00
alexey.lysiuk
3212da8fcf Cleaned up #include's in dynamic lights code 2018-04-19 11:12:29 +03:00
alexey.lysiuk
671736ecdc Disabled annoying MSVC 2015 warnings in ADL and OPN files
src\sound\adlmidi\adlmidi_private.hpp(457): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning) (compiling source file src\sound\adlmidi\adlmidi.cpp)
src\sound\opnmidi\opnmidi_private.hpp(404): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning) (compiling source file src\sound\opnmidi\opnmidi.cpp)
src\sound\adlmidi\adlmidi_private.hpp(457): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning) (compiling source file src\sound\adlmidi\adlmidi_midiplay.cpp)
src\sound\adlmidi\adlmidi_private.hpp(457): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning) (compiling source file src\sound\adlmidi\adlmidi_load.cpp)
src\sound\adlmidi\adlmidi_private.hpp(457): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning) (compiling source file src\sound\adlmidi\adlmidi_private.cpp)
src\sound\adlmidi\adlmidi_private.hpp(457): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning) (compiling source file src\sound\adlmidi\adlmidi_opl3.cpp)
src\sound\opnmidi\opnmidi.cpp(132): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
src\sound\opnmidi\opnmidi.cpp(147): warning C4800: 'unsigned int': forcing value to bool 'true' or 'false' (performance warning)
src\sound\adlmidi\adlmidi.cpp(168): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
src\sound\adlmidi\adlmidi.cpp(177): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
src\sound\adlmidi\adlmidi.cpp(186): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
src\sound\adlmidi\adlmidi.cpp(195): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
src\sound\adlmidi\adlmidi.cpp(209): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
src\sound\adlmidi\adlmidi_midiplay.cpp(740): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
src\sound\adlmidi\adlmidi_midiplay.cpp(741): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
src\sound\adlmidi\adlmidi_midiplay.cpp(742): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
src\sound\adlmidi\adlmidi_midiplay.cpp(743): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
src\sound\opnmidi\opnmidi_private.hpp(404): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning) (compiling source file src\sound\opnmidi\opnmidi_midiplay.cpp)
src\sound\opnmidi\opnmidi_private.hpp(404): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning) (compiling source file src\sound\opnmidi\opnmidi_load.cpp)
src\sound\opnmidi\opnmidi_midiplay.cpp(697): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
src\sound\opnmidi\opnmidi_midiplay.cpp(698): warning C4800: 'unsigned int': forcing value to bool 'true' or 'false' (performance warning)
src\sound\opnmidi\opnmidi_private.hpp(404): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning) (compiling source file src\sound\opnmidi\opnmidi_opn2.cpp)
src\sound\opnmidi\opnmidi_private.hpp(404): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning) (compiling source file src\sound\opnmidi\opnmidi_private.cpp)
2018-04-19 11:12:20 +03:00
Christoph Oelckers
e77cba1fd8 - added a 'lightsizefactor' command to gldefs.
This is for mitigating the recently discovered problem with attenuated lights getting reduced in size, even on OpenGL 3+. The intent of the shrinking was to account for higher brightness of non-attenuated lights on OpenGL 2 and was never meant to be active on more modern versions.
The factor will apply to any attenuated light defined after it and will be inherited by included sub-lumps, but it will only last for the lunp it is set in.

If you have a definition for the broken behavior, AddLightAssociation

'lightsizefactor 0.667' at the top of your GLDEFS.
2018-04-18 22:15:06 +02:00
alexey.lysiuk
4ab6034a36 Cleaned up Windows backend from remains of Direct3D
Removed obsolete CMake settings, useless #include's, dead code
2018-04-18 17:05:25 +03:00
alexey.lysiuk
c241f34f15 Updated headers' paths for main project
Now all headers should be added to a project generated by CMake
2018-04-18 17:01:35 +03:00
alexey.lysiuk
a4a4abe896 Fixed usage of wrong drawlist for lit flats in legacy renderer
https://forum.zdoom.org/viewtopic.php?t=60279
2018-04-17 17:06:58 +03:00
Magnus Norddahl
4870cc73e2 - fix true color software crash in square and other maps 2018-04-17 09:01:34 +02:00
alexey.lysiuk
7a11be8615 Fixed dangling links to garbage collected HUD message objects
https://forum.zdoom.org/viewtopic.php?t=60262
2018-04-16 14:45:31 +03:00
alexey.lysiuk
87d164ee59 Added ability to set thing position in compatibility layer 2018-04-16 14:30:21 +03:00
alexey.lysiuk
3d1693558e Removed obsolete compatibility enumeration 2018-04-16 14:29:10 +03:00
Christoph Oelckers
c1ce6c90ca Moved gl_dynlight to hwrenderer because it does not depend on any direct renderer info. 2018-04-16 09:02:48 +02:00
Christoph Oelckers
3e6f69f64a Renamed two functions 2018-04-16 08:55:13 +02:00
Christoph Oelckers
8a2e52d651 Removed gl_lights_checkside which essentially was just a pointless piece of cruft inherited from ZDoomGL. 2018-04-16 08:45:50 +02:00
Christoph Oelckers
f57c804a5a store shadow map index in the light actor instead of a separate TMap
This frees another file of a direct renderer dependency and generally also should be faster
2018-04-16 08:42:37 +02:00
Magnus Norddahl
4a3f7e8dd5 - fix missing fuzz initialization in softpoly 2018-04-16 01:15:55 +02:00
Magnus Norddahl
5b60a29d35 Merge branch 'master' of https://github.com/coelckers/gzdoom into gzdoom 2018-04-16 01:08:38 +02:00
Magnus Norddahl
f5c2ffabc9 - fix softpoly portal crash and blinking translucent objects 2018-04-16 01:08:29 +02:00
Christoph Oelckers
88f856d995 - fixed a y/Z mixup with the hardware renderer's vectors.
Why do they have to be different from what the game itself uses...? :(
2018-04-15 23:51:41 +02:00
Christoph Oelckers
dcefa3cd12 - GLSprite done, too. 2018-04-15 19:57:28 +02:00
Christoph Oelckers
ee1d1a29a6 - converted GLFLat list to use pointers as well.
- added copy constructors and assignement operators to GLFlat and GLWall so that they can use memcpy instead of field-by-field copy. This actually increases performance slightly.
2018-04-15 19:00:54 +02:00
Magnus Norddahl
d10aa10889 - fix missing psprite when camera textures are in view 2018-04-15 17:16:13 +02:00
Christoph Oelckers
d17216d7dd - fixed the translucent wall splitter, it forgot to copy the original wall before making adjustments to it and its copy. 2018-04-15 17:04:02 +02:00
Magnus Norddahl
21c2d38342 - fix softpoly canvas drawing not restoring all globals properly
- add null pointer check on camera
2018-04-15 16:05:29 +02:00
Magnus Norddahl
25784c2e57 - always store 255 in alpha channel for opaque things as the alpha channel is no longer ignored by the framebuffer backend (software drawer) 2018-04-15 14:58:19 +02:00
Magnus Norddahl
11bb626ab6 - always store 255 in alpha channel for opaque things as the alpha channel is no longer ignored by the framebuffer backend (softpoly drawer) 2018-04-15 14:47:53 +02:00
Magnus Norddahl
61032cb6ae - fix softpoly portal crash 2018-04-15 14:40:52 +02:00
Christoph Oelckers
e8eb8dd596 - store the wall render nodes as pointers, not as objects.
This is mainly for future-proofing because storing these as objects in an array not only has a negative impact when using multithreading due to longer blocking time for the threads but also makes it hard to cache this data for reuse.
2018-04-15 14:25:42 +02:00
Magnus Norddahl
e15baa21cb - Remove dead code 2018-04-15 12:21:40 +02:00
Christoph Oelckers
cf8447d19c -protected critical portal data from getting written to by user code.
This data is game critical and may only be altered by code that knows what is allowed and what not. It must never be altered by any user code ever.
However, since the SkyViewpoint actors need to set up some relations between themselves and the default sky portals the previously purely internal 'internal' flag has been exported as a new keyword.
2018-04-15 12:13:02 +02:00
alexey.lysiuk
4ea16acef5 Fixed broken portals after loading saved game
Portals disabled initially and activated by scripting must be fully restored after loading of saved game

https://forum.zdoom.org/viewtopic.php?t=59999
2018-04-15 10:52:02 +02:00
Christoph Oelckers
35596dbbc4 - brighten the textured automap when in the hardware renderer with light modes 0, 1 and 4. 2018-04-15 08:53:38 +02:00
Christoph Oelckers
515323dcbd - fixed: Rendering a translucent mid texture did not unset the render style for the following bottom texture.
With additive translucency and non-black fog this caused visual errors.
2018-04-15 08:29:40 +02:00
Christoph Oelckers
c03024e1b0 - fixed last commit 2018-04-14 22:34:25 +02:00
Magnus Norddahl
48b0fbcf4b - Remove r_swcanvas.cpp again. It got accidentally re-added somehow by the swmodels branch 2018-04-14 22:30:02 +02:00
Magnus Norddahl
b62d05ae0e Merge branch 'swmodels' into gzdoom 2018-04-14 22:23:27 +02:00
Magnus Norddahl
ee443b6fb6 - disable software models 2018-04-14 22:22:40 +02:00
Christoph Oelckers
71c8417578 - removed UniqueLineToLines because it wasn't used anywhere. 2018-04-14 21:24:48 +02:00
Magnus Norddahl
c3bd93a85c Merge remote-tracking branch 'gzdoom/master' into swmodels 2018-04-14 21:20:05 +02:00
Christoph Oelckers
790182a2f4 - split GLWall::PutWall in two. 2018-04-14 20:20:43 +02:00
Christoph Oelckers
59a08ce0df - fixed a few warnings and changed the return type of FGLTexture::Bind, because no caller needs the hardware texture. 2018-04-14 12:24:04 +02:00
Christoph Oelckers
0affc119fd - moved hardware independent part of flat vertex data out of GL folder. 2018-04-14 12:05:31 +02:00
alexey.lysiuk
ba4cc1a6ca Added activation type to WorldLine(Pre)Activated events
https://forum.zdoom.org/viewtopic.php?t=60232
2018-04-14 11:52:09 +03:00
alexey.lysiuk
83c513b6c9 Added names for arguments in DStaticEventHandler class definition 2018-04-14 11:52:09 +03:00
Christoph Oelckers
e654a99d39 - changed GLDebug to receive char pointers instead of FStrings.
The most frequent call using this is the regular texture creation function where this results in a pointless allocation and destruction of a temporary string which is easily avoided.
2018-04-14 10:40:11 +02:00
Christoph Oelckers
ad021cc374 - fixed: Hardware camera textures were given a dimension of (0, 0). 2018-04-14 10:26:56 +02:00
Christoph Oelckers
870890d8cf - r_clearcolor did not consider that the base palette's alpha is not set. 2018-04-14 09:33:45 +02:00
Christoph Oelckers
cef6ddca6e - fixed: Rendering to a camera textures clobbered the main render target for the software renderer. 2018-04-14 08:09:40 +02:00
Magnus Norddahl
915f8862a7 - Remove code that seemingly doesn't do anything and really shouldn't be needed 2018-04-13 21:56:34 +02:00
Magnus Norddahl
7e544c66fe Merge remote-tracking branch 'gzdoom/master' into swmodels 2018-04-13 21:35:21 +02:00
Christoph Oelckers
71a6cc4625 Merge branch '2D_Refactor' 2018-04-13 17:52:58 +02:00
Christoph Oelckers
81f72ca4dd Merge branch 'ZCompat2' 2018-04-13 17:52:02 +02:00
Rachael Alexanderson
a23259f26a - remove TLS workaround and turn it into an actual error since it is required in order to even properly compile and not all systems properly detect this. 2018-04-13 09:10:33 -04:00
Christoph Oelckers
387827555f - added compatibility handler for Alien Vendetta MAP01 to properly display the deep water hack and avoid problems with a node rebuild. 2018-04-11 23:08:59 +02:00
Christoph Oelckers
3aea82797c - removed the parser for complex compatibility settings, now that this can be done via scripting. 2018-04-11 19:21:02 +02:00
Christoph Oelckers
3988e27059 - scriptified the last remaining definition (BTSX MAP12 beta)
- Changes to map geometry must force a node rebuild (SetVertex, SetLineSectorRef.)
- fixed incorrect use of scaling constant in SetWallYScale.
2018-04-11 19:10:15 +02:00
alexey.lysiuk
6631f208b1 Scriptified remaining compatibility entries 2018-04-11 17:01:57 +03:00
alexey.lysiuk
950443683b Scriptified compatibility of more Heretic levels 2018-04-11 12:35:45 +03:00
Christoph Oelckers
0ecbf07769 -ported a large part of compatibility.txt 2018-04-10 23:19:22 +02:00
Christoph Oelckers
9daad477c3 - some improvements to compatibility scripts:
* use names, not strings, to allow use of switch/case.
* avoid creating the checksum a second time per level.
* do an early-out check for maps that do not have scripted compatibility.
2018-04-09 22:09:28 +02:00
alexey.lysiuk
03ffb30c39 Enabled custom window title in SDL backend 2018-04-09 20:47:49 +02:00
alexey.lysiuk
e6e2b11167 Set common name for system-specific framebuffer class
Implementation details are hidden as much as possible in platform-specific source files
Reduced number of included header files
2018-04-09 20:47:49 +02:00
alexey.lysiuk
640948703f Level compatibility via ZScript -- PoC 2018-04-09 17:54:12 +03:00
Christoph Oelckers
e50d09ceb2 - removed the render mode settings from the launch popup.
They were already deactivated because with 5 render modes present this was destructive, having only 2 options available.
Since the render mode can now be changed on the fly this isn't as critical anymore as it once was.
2018-04-08 22:03:38 +02:00
drfrag666
80f57dfaf0 - Increased size of the savegame comment area. 2018-04-08 21:56:35 +02:00
Marisa Kirisame
8ff81c93e8 Fix building on GCC7. 2018-04-08 21:53:20 +02:00
Marisa Kirisame
08f3afab0b Separated P_ActivateLine ZScript export into two functions, one with and one without a vector parameter. 2018-04-08 21:53:20 +02:00
Marisa Kirisame
5d0ff4c8ba Exports P_ActivateLine to ZScript (along with constants for activation type) 2018-04-08 21:53:20 +02:00
Christoph Oelckers
551691f42a - made FTexture::GetPixels and FTexture::GetColumn non-pure-virtual.
With the software renderer not being used for 2D anymore it would be quite annoying if every texture class had to implement these.
If done properly, the SW renderer should actually be forced to dynamic_cast any texture to a FWorldTexture before using this stuff, but that'd be some pointless overhead better saved.
2018-04-08 21:19:57 +02:00
Christoph Oelckers
3dc670a0cc - missed this. 2018-04-08 21:02:15 +02:00
Christoph Oelckers
3dcd7d310f Merge remote-tracking branch 'remotes/origin/master' into 2D_Refactor 2018-04-08 20:52:30 +02:00
Christoph Oelckers
7c70e0971c - disabled the survey code.
This survey is now closed and new input no longer needed.
2018-04-08 20:51:19 +02:00
Christoph Oelckers
e6ce429ca5 - fixed alpha for hardware rendered weapon sprites in the software renderer. 2018-04-08 20:40:29 +02:00
Christoph Oelckers
a40d85fd41 - fixed: Before aqcuiring the WipeEndScreen, the renderer must be flushed.
Apparently this got previously done implicitly by code that got lost in the refactoring.
2018-04-08 19:54:17 +02:00
Christoph Oelckers
17c18f3367 - fixed typo in texture search function. This caused the crosshairs not to be found. 2018-04-08 19:16:46 +02:00
Magnus Norddahl
c4768441b4 - Fix playersprite offset being wrong in softpoly
- Remove DFrameBuffer::GetCanvas as it always returned null
2018-04-08 15:49:06 +02:00
Magnus Norddahl
4a730f6dd5 - Fix softpoly ignores status bar displacement 2018-04-08 14:28:48 +02:00
Magnus Norddahl
1a5f679d43 - Fix depth values when screenblocks less than 11 2018-04-08 13:45:23 +02:00
Christoph Oelckers
94e8d59dde - implemented shader support for rendering the SW renderer canvas with legacy OpenGL. 2018-04-08 13:05:20 +02:00
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
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