Commit graph

4733 commits

Author SHA1 Message Date
Christoph Oelckers
b2860a1d63 - it looks like glProgramUniform is not working correctly with Intel drivers, so better forget about it for setting the view and projection matrices. Even on NVidia the time difference can only be measured in microseconds per frame so it's not a big loss. 2014-08-02 11:57:42 +02:00
Edward Richardson
9716a61219 Add CVar for drawing weapons in the althud 2014-08-02 19:34:16 +12:00
Christoph Oelckers
a8e9c1832f - decided to restrict the 2.0 beta to OpenGL 4.x with GL_ARB_buffer_storage extension and removed all code for supporting older versions.
Sadly, anything else makes no sense.
All the recently made changes live or die, depending on this extension's presence.
Without it, there are major performance issues with the buffer uploads. All of the traditional buffer upload methods are without exception horrendously slow, especially in the context of a Doom engine where frequent small updates are required.
It could be solved with a complete restructuring of the engine, of course, but that's hardly worth the effort, considering it's only for legacy hardware whose market share will inevitably shrink considerably over the next years.
And even then, under the best circumstances I'd still get the same performance as the old immediate mode renderer in GZDoom 1.x and still couldn't implement the additions I'd like to make.

So, since I need to keep GZDoom 1.x around anyway for older GL 2.x hardware, it may as well serve for 3.x hardware, too. It's certainly less work than constantly trying to find workarounds for the older hardware's limitations that cost more time than working on future-proofing the engine.

This new, trimmed down 4.x renderer runs on a core profile configuration and uses persistently mapped buffers for nearly everything that is getting transferred to the GPU. (The global uniforms are still being used as such but they'll be phased out after the first beta release.
2014-08-01 22:42:39 +02:00
Christoph Oelckers
7967082e60 - use the light buffer to handle dynamic lighting. 2014-08-01 20:59:39 +02:00
Randy Heit
15251e7a21 Set face/wall/floor flags from Build sprites 2014-07-31 22:18:08 -05:00
Randy Heit
a600a816c3 Consolidate some common code for texture mapping setup
- R_AddLine() and R_RenderDecal() had nearly identical code for setting up
  texture mapping. These have now been spun off into methods of
  FWallCoords and FWallTmapVals.
2014-07-31 21:02:22 -05:00
Randy Heit
b0b9c57e85 Pass x1 and x2 to Prep(L)Wall as params 2014-07-31 20:32:21 -05:00
Randy Heit
fc63e9db3c Pass WallC as a parameter to (O)WallMost instead of referencing it globally 2014-07-31 20:23:04 -05:00
Randy Heit
bc450808b2 Consolidate wall texturing vars into two structs
- All transformation and clipping values go into FWallCoords.
- All texture mapping values go into FWallTMapVals.
2014-07-31 20:17:23 -05:00
Randy Heit
bbc3b69a7c Remove polymost stuff
- Maybe it will be back someday, but it's been essentially dead for nearly
  10 years, so don't hold your breath.
2014-07-31 19:44:41 -05:00
Randy Heit
4cf468452c Remove slopetype from line_t.
- Recomputing it in the only two places where it's used is trivial, so
  it's basically a waste of space to precompute it.
2014-07-31 19:15:08 -05:00
Randy Heit
e55e7b9a38 Don't weed out wall and floor sprites when spawning Build sprites 2014-07-31 18:22:33 -05:00
Christoph Oelckers
01a1e10084 Merge branch 'master' into Glew_Version_For_Real 2014-07-31 00:59:56 +02:00
Christoph Oelckers
09ae52e26b Merge branch 'master' of https://github.com/rheit/zdoom 2014-07-31 00:44:59 +02:00
Christoph Oelckers
1ec58011d2 - start of light buffer implementation so that we don't have to use uniform arrays which appear to be broken on AMD. 2014-07-31 00:44:22 +02:00
Christoph Oelckers
ef8f66c9a1 - removed the code for hardware alpha testing again because it didn't work anymore with how things are set up now.
- we need to check all GL versions when trying to get a context because some drivers only give us the version we request, leaving out newer features that are not exposed via extension.
- added some status info about uniform blocks.
2014-07-30 23:13:16 +02:00
Randy Heit
a922ae04cc Use Blood player starts
- Blood's maps use thing types, much like Doom's, so getting its player
  starts is easy. There's no need to synthesize a start from the editor
  position like with other Build maps.
2014-07-29 21:39:05 -05:00
Randy Heit
449a17c2f4 Correctly assign the sample rate for all Blood SFX formats
- Blood can do 44100 Hz sounds!
2014-07-29 21:09:29 -05:00
Randy Heit
e0e00c4f8c Fixed: None of the Blood ambient sounds were registered correctly 2014-07-29 20:56:20 -05:00
Randy Heit
4296e9caa2 Fix typo in comment 2014-07-29 20:51:23 -05:00
Randy Heit
d602b272b5 Never cache nodes for Build maps 2014-07-29 20:46:20 -05:00
Randy Heit
00854dd09e Don't reopen the reader for encrypted maps
- Fixed: Memory leak when loading Blood maps.
2014-07-29 20:42:17 -05:00
Randy Heit
02e7c56c82 Move SpriteFrames.Clear() from R_InitSprites to FTextureManager::Init
- Fixed: Blood sprite rotations were overwritten by the Doom sprite
  rotations.
2014-07-29 20:31:53 -05:00
Randy Heit
f3d8edb4d8 Fixed: No sprites were loaded for Build maps 2014-07-29 20:30:50 -05:00
Christoph Oelckers
a1dfdf0fc7 Merge branch 'master' of https://github.com/rheit/zdoom 2014-07-29 15:51:14 +02:00
Randy Heit
ea7ba9dba3 Add per-actor friction
- This is multiplied by the sector's friction.
- This is intentionally not serialized yet, while awaiting feedback.
2014-07-28 23:15:50 -05:00
Randy Heit
0f8a0020ed Merge remote-tracking branch 'origin/master' 2014-07-28 21:08:21 -05:00
Randy Heit
cd28ad78a3 Used debug GME for debug ZDoom build with VC2005 solution 2014-07-28 21:04:30 -05:00
Randy Heit
7280d278d9 Fix VC2005 warning in F7ZFile::Open 2014-07-28 21:03:41 -05:00
Randy Heit
4c6edd5e58 Add script array support to ZDoom 2014-07-28 21:02:20 -05:00
Edward Richardson
6af441c4d7 Dup frames shouldn't adapt.
Adapting during a dup frame caused jittery network performance
(especially when using high dup values).
The demoplayback check also didn't need to be there anyway.
2014-07-29 11:09:46 +12:00
Christoph Oelckers
beabfad293 Merge branch 'master' into Glew_Version_For_Real 2014-07-28 22:23:56 +02:00
Christoph Oelckers
318aebc4ad - fixed: the vertex collection code used incorrect indices for checking the checkmap array. 2014-07-28 22:23:17 +02:00
Christoph Oelckers
183d0ba82a Merge branch 'master' into Glew_Version_For_Real 2014-07-28 19:56:17 +02:00
Christoph Oelckers
355dd1c2f5 - fixed some issues with setting the vertex dirty state. It was also called from several sector init functions and copy code for Boom deep water. The only case where SetPlaneTexZ should call it is from the interpolation code so this is a special case now. 2014-07-28 18:01:01 +02:00
Christoph Oelckers
993b6c3066 - fixed typo in FraggleScript item class list 2014-07-28 17:13:42 +02:00
Christoph Oelckers
192daf1d5a Merge branch 'master' into Glew_Version_For_Real 2014-07-27 21:57:38 +02:00
Christoph Oelckers
ece10bb57f - fixed several incorrect uses of abs instead of fabs. 2014-07-27 21:57:05 +02:00
Christoph Oelckers
c9c93a58a2 - fixed bad constant and potential use of uninitialized variable. 2014-07-27 21:55:25 +02:00
Christoph Oelckers
3d24f58bf0 - fixed conditions for disabling the flat vertex buffer. 2014-07-27 20:18:32 +02:00
Christoph Oelckers
29a56fe01c Merge branch 'master' into Glew_Version_For_Real 2014-07-27 17:59:50 +02:00
Christoph Oelckers
925305aa05 - fixed: The code for updating vertex dirty state had been completely missing. I have no idea when it disappeared... 2014-07-27 17:58:51 +02:00
Christoph Oelckers
754c96a540 - added default precision settings to shader include because some old ATI drivers complain if they aren't there - even though the spec doesn't require them... 2014-07-27 16:09:47 +02:00
Christoph Oelckers
4904abfc1c - forgot test stuff. 2014-07-27 13:47:37 +02:00
Christoph Oelckers
97341fcb31 - reenabled the flat vertex buffer for GL 3.x NVidia hardware. On AMD and Intel it'll stay off because past tests have shown that it won't improve performance at all. 2014-07-27 13:46:35 +02:00
Christoph Oelckers
c1d8f235c2 - renamed some stuff that clashed with gl function names. 2014-07-27 12:33:54 +02:00
Christoph Oelckers
77d9d9b2a5 - fixed: For updating the model VAO's attribute pointers it is necessary to first bind the vertex buffer we need to refer to, because this is not part of the VAO's state. 2014-07-27 11:53:18 +02:00
Christoph Oelckers
6d4eb7f62d - changed handling of DF_NO_COOP_WEAPON_SPAWN dmflag so that weapons are not determined by class type but by a newly added flag WEAPONSPAWN, to allow CustomInventory replacements to act like weapons when being spawned. 2014-07-27 10:07:37 +02:00
Christoph Oelckers
e07d06fa2a Merge branch 'master' into Glew_Version_For_Real 2014-07-26 22:26:58 +02:00
Christoph Oelckers
7ae25906fd - fixed: fog must be disabled before drawing the HUD model, not after it. 2014-07-26 22:26:17 +02:00