Commit graph

4328 commits

Author SHA1 Message Date
Christoph Oelckers
5a1ad75402 Merge branch 'master' of https://github.com/rheit/zdoom 2014-09-12 21:01:27 +02:00
Christoph Oelckers
109da206a6 Merge branch 'master' of https://github.com/rheit/zdoom 2014-09-12 20:59:41 +02:00
Christoph Oelckers
a2c81f1ca9 -fixed the file validity checks in MapData::GetChecksum.
They need to be done per lump, because MapData::Seek can alter the FileReader being used for a specific lump. Even worse, the FileReader will be NULL when the function as it was is called for a map inside a Zip-file.
2014-09-12 20:59:23 +02:00
Braden Obrzut
27ebfa783e - Added IfHealth based on Blue Shadow's patch. 2014-09-12 00:49:09 -04:00
Braden Obrzut
0223b7f460 - Fixed: InInventory didn't work quite right with multiple items. 2014-09-12 00:39:36 -04:00
Christoph Oelckers
25951362fc - fixed: When applying Boom's Transfer_Heights effect to a sector, gl_FakeFlat needs to remove all portals from the original sector planes that are being replaced in the sector copy. 2014-09-11 13:02:39 +02:00
Christoph Oelckers
acf6c259d8 - changed the handling of alpha textures. The only special case they need is with palette-less textures and this can be handled far more easily and robustly with a predefined translation instead of passing another parameter through all the layers of the texture management code. This also fixes problems with paletted PNGs that get used as an alpha texture because the old method clobbered the image's palette. 2014-09-09 13:21:36 +02:00
Christoph Oelckers
4bb320a27c - route texture binding through the renderstate class for better control. Currently it's just a direct passthrough but this will change. 2014-09-09 12:00:42 +02:00
Christoph Oelckers
d5633701b4 - swapped order of textures in burn shader to avoid some problems with the texture samplers.
- fixed: texture sampler state for the burn texture was never set.
2014-09-09 10:17:44 +02:00
Christoph Oelckers
c6f4c0b6f0 - fixed: FMaterial's tex pointer could be accessed before it was set.
- allow more than two texture units in shaders.
2014-09-09 10:03:34 +02:00
Christoph Oelckers
62880f113b - fix a render glitch with Back to Saturn X MAP06: Do not flood missing upper and lower textures with the backsector's flat if that backsector is malformed (i.e. has no area.) 2014-09-09 08:47:39 +02:00
Christoph Oelckers
9b8869e78d Merge branch 'master' into v2.x
Conflicts:
	src/gl/textures/gl_material.cpp
2014-09-09 01:30:11 +02:00
Christoph Oelckers
86d9c7ec8e - add some compatibility settings to fix rendering glitches in BTSX_E1 MAP12. 2014-09-09 01:27:41 +02:00
Christoph Oelckers
e2c2f635ac Merge branch 'master' of https://github.com/rheit/zdoom 2014-09-08 23:26:17 +02:00
Christoph Oelckers
5e34b78451 - missed a line. 2014-09-08 23:25:27 +02:00
Christoph Oelckers
0ff061b928 Merge branch 'master' of https://github.com/rheit/zdoom 2014-09-08 22:55:37 +02:00
Christoph Oelckers
580e580c42 - added option to set a sector's tag via compatibility.txt (needed by GZDoom) 2014-09-08 22:54:56 +02:00
Christoph Oelckers
3d2646cbae Merge branch 'master' of https://github.com/rheit/zdoom 2014-09-08 13:02:39 +02:00
Christoph Oelckers
cfd24f438f - jpalomo's A_Saw flags submission. 2014-09-08 13:02:05 +02:00
alexey.lysiuk
e29fce6951 Fixed missing transparency on upscaled textures
Textures with diagonal patterns were treated as opaque after resizing
Images upscaled by hqNx were affected mostly by this issue

http://forum.drdteam.org/viewtopic.php?f=24&t=5370
http://zandronum.com/tracker/view.php?id=269
http://zandronum.com/tracker/view.php?id=315
2014-09-07 11:52:51 +03:00
Braden Obrzut
49382a2a14 - Added detection for The Adventures of Sqaure (based off MTrop's submission).
- IWADINFO no longer requires a mapinfo to be specified.
2014-09-04 19:36:08 -04:00
Christoph Oelckers
b96dd6c421 - fixed: The missing fourth component of the texture coordinate must be filled with 1.0, not 0.0 before applying the texture matrix. Not doing so will cancel out the translation part of the matrix. 2014-09-02 10:31:48 +02:00
Christoph Oelckers
fa3a62e954 - fix a render glitch with Back to Saturn X MAP06: Do not flood missing upper and lower textures with the backsector's flat if that backsector is malformed (i.e. has no area.) 2014-08-31 23:01:53 +02:00
Christoph Oelckers
a280c20b4e - fixed: If we want to cache texture binding state we have to reset it in all places where a texture becomes unbound. 2014-08-31 19:00:17 +02:00
Christoph Oelckers
12160bd29c - remove some obsolete code from decal rendering.
- avoid rebinding the same texture multiple times, as there's considerable overhead in the texture manager.
- check gl_sort_textures only once per scene, not per draw list.
2014-08-30 15:34:14 +02:00
Christoph Oelckers
6a3cd6378a - found out that reading the CPU's real time clock costs a not insignificant amount of time so this is now only done when either the benchmark command is running or the rendertimes are shown. 2014-08-30 14:33:06 +02:00
Christoph Oelckers
49ec7beb8f - separate draw lists for walls and flats. This makes the sorting much more efficient because draw types no longer need to be checked in the compare function. This is a lot more important than having perfect texture order. 2014-08-30 13:04:41 +02:00
Christoph Oelckers
1d2aa3df0c fixed: The wait console command waited one tic too many because it got 1 added to it twice instead of only once. 2014-08-25 10:51:50 +02:00
Christoph Oelckers
a903cbe12e - sorting draw items by light level no longer makes sense so remove all corresponding code from dicmp. 2014-08-24 13:10:45 +02:00
Christoph Oelckers
bf03d02228 - print OpenGL profile type in startup log. 2014-08-24 01:09:44 +02:00
Christoph Oelckers
904cc2e158 - some code cleanup. 2014-08-23 18:54:24 +02:00
alexey.lysiuk
51d7340288 Fixed crash on music volume change when no track is played using FluidSynth device 2014-08-23 16:35:05 +03:00
Christoph Oelckers
5364116354 - fixed: APROP_Friendly did not manage monster counting correctly. 2014-08-23 13:24:15 +02:00
Christoph Oelckers
bf6079af46 - fixed incorrect check for overrideshader. 2014-08-23 00:47:05 +02:00
Christoph Oelckers
1050013017 major cleanup of the texture manager:
- use sampler objects to avoid creating up to 4 different system textures for one game texture just because of different clamping settings.
- avoids flushing all textures for change of texture filter mode.
- separate sprite and regular dimensions on the material level to have better control over which one gets used. It's now an explicit parameter of ValidateTexture. The main reason for this change is better handling of wall sprites which may not be subjected to such handling.
- create mipmaps based on use case, not texture type.
- allows removal of FCloneTexture hack for proper sharing of the same sprite for decals and other purposes.
- better precaching of skyboxes.
2014-08-22 23:50:38 +02:00
Christoph Oelckers
7a727b6807 Merge branch 'master' into v2.x 2014-08-21 13:44:41 +02:00
Christoph Oelckers
816999109e Merge branch 'master' of https://github.com/rheit/zdoom 2014-08-21 13:42:43 +02:00
Christoph Oelckers
df0d3543a8 - fixed: *ALL* original ceiling crushers, not just type 49, require a distance of 8 to the floor for the destination height. For the silent types this required a new action special, Ceiling_CrushAndRaiseSilentDist. This change only affects the XLAT mapping, the Hexen format types behave as before.
- removed the redundant internal ceilCrushAndRaiseDist ceiling movement type. It was precisely the same as ceilCrushAndRaise in all details.
2014-08-21 13:01:12 +02:00
Christoph Oelckers
274a4216ea - disabling inlining in the GL loader produces an executable that's 8kb smaller. 2014-08-21 11:47:53 +02:00
Christoph Oelckers
78815a9601 -we need this, too. 2014-08-21 11:29:43 +02:00
Christoph Oelckers
e132fc5eed - replaced GLEW with GLLoadGen for GL access. This allows to have a header that only contains what's actually required, namely OpenGL 3.3 plus glBegin and glEnd which are the only compatibility functions needed for the fallback render path.
GLEW has two major problems:

- it always includes everything, there is no way to restrict the header to a specific GL version
- it is mostly broken with a core profile and only works if all sanity checks get switched off.
2014-08-21 11:02:46 +02:00
Edward Richardson
07d7f690e8 Non-wall sprites need their original depth checks 2014-08-21 20:03:17 +12:00
Christoph Oelckers
6f65bccf1c - reinstated the far superior assembly HQnX version for Visual C++. 2014-08-20 12:45:33 +02:00
Christoph Oelckers
86d37e06f9 - lowered requirements of GL 2.x to OpenGL 3.3.
There was one issue preventing the previous 2.0 betas from running under GL 3.x: The lack of persistently mapped buffers.
For the dynamic light buffer today's changes take care of that problem.
For the vertex buffer there is no good workaround but we can use immediate mode render calls instead which have been reinstated.

To handle the current setup, the engine first tries to get a core profile context and checks for presence of GL 4.4 or the GL_ARB_buffer_storage extension.
If this fails the context is deleted again and a compatibility context retrieved which is then used for 'old style' rendering which does work on older GL versions.

This new version does not support GL 3.2 or lower, meaning that Intel GMA 3000 or lower is not supported. The reason for this is that the engine uses a few GL 3.3 features which are not present in the latest Intel driver.
In general the Intel GMA 3000 is far too weak, though, to run the demanding shader of GZDoom 2.x, so this is no real loss. Performance would be far from satisfying.

A command line option '-gl3' exists to force the fallback render path. On my Geforce 550Ti there's approx. 10% performance loss on this path.
2014-08-19 15:56:33 +02:00
Christoph Oelckers
a2dc4afe3f - screwed by the editor's autocompletion... (wrong GL flag was used...) 2014-08-19 14:25:47 +02:00
Christoph Oelckers
00d7707aef - allow reallocation of light buffer if more lights are needed.
- added a light preprocessing pass to the renderer so that a non-persistent buffer can be used with minimal mapping/unmapping. This only gets used if necessary because it adds some overhead to the renderer.
2014-08-19 14:18:21 +02:00
Christoph Oelckers
38796e7714 - removed some obsolete and useless GL calls. 2014-08-17 11:41:03 +02:00
Christoph Oelckers
5d6ef5cb16 Merge branch 'master' into v2.x 2014-08-11 13:19:42 +02:00
Christoph Oelckers
c30cfb3190 Merge branch 'master' of https://github.com/rheit/zdoom 2014-08-11 13:18:21 +02:00
Christoph Oelckers
f482dc094d fixed: R_PointOnSideSlow had precision issues with very short lines.
When this function was originally written there was no possibility of fractional vertex coordinates so it threw away the fractional parts of the node's directional vector (which in the original nodes was always 0.)
Now, with UDMF and high precision vertices this no longer works and the loss of significant parts of their value caused this code to produce erroneous results if the linedefs were only a few map units long and using fractional positions.
2014-08-11 12:27:04 +02:00
Christoph Oelckers
48163de8e2 must include doomdef.h in cmdlib.h to get TICRATE. 2014-08-11 11:47:14 +02:00
Christoph Oelckers
f0eccb9d15 - BlueShadow's submission for keeping the max save amount of BasicArmorPickups around when picking up armor bonuses. 2014-08-11 10:08:49 +02:00
Christoph Oelckers
259466c3d4 fixed time printing.
- In ZDoom the timer runs a bit too fast because roundoff errors make 35 tics only last 0.98 seconds. None of the internal timing has been changed, only the places where a time value is printed it will get adjusted for this discrepancy.
2014-08-11 09:39:38 +02:00
Christoph Oelckers
1fcde91298 - BlueShadow's GetArmorInfo submission. 2014-08-08 09:25:35 +02:00
Randy Heit
fefe6aa2c1 Specie -> Species
- specie: money in the form of coins rather than notes
- species: a group of living organisms consisting of similar individuals
  capable of exchanging genes or interbreeding
2014-08-07 22:40:12 -05:00
Randy Heit
75dc7de632 Merge branch 'master' of github.com:rheit/zdoom 2014-08-07 22:28:35 -05:00
Randy Heit
46592f5f6d Don't clamp SHADE2LIGHT
- Light levels aren't stored in bytes anymore, so there's no reason to
  clamp it anymore when loading Build maps.
2014-08-07 22:27:48 -05:00
Randy Heit
fbb5689f29 Eliminate extra vars from FWallCoords
- cx1, cx2, cy1, and cy2 are not used anywhere, so get rid of them.
- Also annotated the comments to indicate the corresponding arrays in the Build engine.
2014-08-07 22:26:24 -05:00
Randy Heit
e6a1d6b516 Parse more info from Blood's map header 2014-08-07 22:00:02 -05:00
Randy Heit
9659b894a3 Skip neardepth/fardepth checking in R_DrawSprite
- Wall sprites now clip much, much better than before.
2014-08-07 20:43:09 -05:00
Randy Heit
7b02027ba7 Fixed: Wall sprites cut off one pixel short of the window's right border 2014-08-07 20:00:49 -05:00
Randy Heit
6303935ad6 Use wall sprite Y scale 2014-08-07 19:57:55 -05:00
Randy Heit
0aa67c68ab Redo lighting for each wall sprite
- Because previously it just reused whatever the most recently drawn wall
  used.
2014-08-07 17:23:06 -05:00
Randy Heit
e1ee80661e Make FWallCoords' members lowercase
because they're kind of a pain to type when all uppercase.
- Also, make its sx1 and sx2 members shorts, so it takes less space, since
  it's getting crammed into a vissprite now.
2014-08-07 17:12:04 -05:00
Leonard2
8c4c011ca2 MTHRUSPECIES on puffs
You were right it's cleaner that way
2014-08-07 18:05:39 +02:00
Leonard2
5400ce1a21 +MTHRUSPECIES on puffs 2014-08-07 15:50:21 +02:00
Christoph Oelckers
b9ffb51d0c - small but important optimization: Two-sided lines with both sides in the same sector don't really require vertex splitting for precise rendering. 2014-08-04 23:00:40 +02:00
Christoph Oelckers
09a68e8c93 - fixed incorrect function call in shader compiler. 2014-08-03 18:14:19 +02:00
Christoph Oelckers
370582d2fa - corrected versioning info for development branch. 2014-08-03 12:25:59 +02:00
Christoph Oelckers
19cfffebb3 - fixed: the WallTypes enum contained a value that no longer was valid. This was fixed orignally last week but it seems to have gotten lost. 2014-08-03 12:21:05 +02:00
Christoph Oelckers
c98e3ca99d Merge branch 'master' into v2.x 2014-08-03 10:58:41 +02:00
Christoph Oelckers
b3e0d93385 - implemented rendering of wall sprites. 2014-08-03 10:57:58 +02:00
Christoph Oelckers
398d902e7e - split off sprite clipping adjustment code into its own function. 2014-08-03 10:22:12 +02:00
Christoph Oelckers
1b55c17379 Merge branch 'master' of https://github.com/rheit/zdoom 2014-08-03 10:08:05 +02:00
Randy Heit
1d02ad3aa2 Merge branch 'master' of github.com:rheit/zdoom 2014-08-02 22:40:02 -05:00
Randy Heit
d0043bed78 Q&D port of decal code to draw generic wall sprites
- This still doesn't use all the sprite properties correctly. It also
  looks like they're going to need different code to build the clipping
  arrays. But at least wall sprites are drawn at the proper angle now!
2014-08-02 22:35:57 -05:00
Christoph Oelckers
eef4d1fac1 Merge branch 'fix_build_nonmsvc' of https://github.com/alexey-lysiuk/gzdoom 2014-08-03 01:17:15 +02:00
Christoph Oelckers
cd5e429d3b - adjust version number. 2014-08-02 23:12:08 +02:00
Christoph Oelckers
a63871d170 - at least for Intel GMA we need shaders without 'discard' to render non-transparent stuff. The performance penalty is rather hefty here. 2014-08-02 21:06:34 +02:00
Christoph Oelckers
a97b58fa27 - added check for light uniform buffer overflows, because uniform buffers on Intel are rather small. 2014-08-02 20:41:13 +02:00
alexey.lysiuk
6ef67e1d3e Fixed build on compilers other than MSVC
No more "Call to 'LittleShort' is ambiguous" error
2014-08-02 13:14:25 +03:00
Christoph Oelckers
e35fefdc06 - better rebind the active shader after updating the matrices. 2014-08-02 11:59:04 +02:00
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
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
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
Christoph Oelckers
bdf5bbd34e - make the shader timer part of the render state. 2014-07-26 20:56:10 +02:00
Christoph Oelckers
637aa9d77e - some adjustments to allow testing the different rendering methods. 2014-07-26 18:43:54 +02:00
Christoph Oelckers
0e647e0f2b Merge branch 'master' into Glew_Version_For_Real 2014-07-26 10:37:00 +02:00
Christoph Oelckers
8465a5f5d7 Merge branch 'master' of https://github.com/rheit/zdoom 2014-07-26 10:23:41 +02:00
Christoph Oelckers
6c9a818220 - allow different render modes if persistent buffers are not available (untested!) 2014-07-26 10:23:07 +02:00
Christoph Oelckers
79f3984346 Merge branch 'upstream' of https://github.com/Edward850/zdoom 2014-07-26 10:17:47 +02:00
Christoph Oelckers
5576892c01 Merge branch 'redundant_offsetof_macro' of https://github.com/edward-san/zdoom 2014-07-26 10:17:25 +02:00
Christoph Oelckers
a21f01bc5f - added jpalomo's submission to make freelook a 3-state setting, like crouch and jump. This required moving around the flags a bit so demo compatibility had to be bumped. It may also require adjustment for launchers that can set the dmflags. 2014-07-26 10:15:07 +02:00
Edward Richardson
0276760a2d Animate switches when bumped 2014-07-19 21:00:12 +12:00
Edoardo Prezioso
ae2f7b8707 - Remove a duplicate of a custom offsetof macro.
It's already defined in cmdlib.h .
2014-07-19 00:53:18 +02:00
Edoardo Prezioso
484eb347ca - Fixed: wrong FString empty string check.
Even when '+logfile' argument was omitted, the console would print 'Could not start log', because 'logfile != NULL' was used as a check for the presence of '+logfile' argument, but the internal buffer of FString is never NULL, so the right check is 'logfile.isNotEmpty()'.
While I'm at it, I fixed another bad check for 'pagename'.
2014-07-18 01:15:41 +02:00
Christoph Oelckers
e0b756e511 - fixed: The cubemapped skybox renderer did not set up the model matrix properly. 2014-07-17 10:04:20 +02:00
Christoph Oelckers
f64428dd2a Merge branch 'master' into Glew_Version_For_Real 2014-07-17 09:31:18 +02:00
Christoph Oelckers
b78b566b0a Merge branch 'master' of https://github.com/rheit/zdoom 2014-07-17 09:30:50 +02:00
Christoph Oelckers
eb9d2d9917 - reactivate compatibility profile so that immediate mode drawing can be used on older hardware not supporting persistently mapped buffers.
- reactivate alpha testing per fixed function pipeline
- use the 'modern' way to define clip planes (GL_CLIP_DISTANCE). This is far more portable than the old glClipPlane method and a lot more robust than checking this in the fragment shader.
2014-07-17 02:37:18 +02:00
Edward Richardson
f99a84b498 Changes to maketic/menu/console updates
- Console and Menu will now update cleanly during stalls.
- Moved net adaption so uncapped framerate will always use it.
2014-07-17 11:29:30 +12:00
Braden Obrzut
84cb49b074 - Fixed: Legacy render style array was in the wrong order. 2014-07-16 19:19:20 -04:00
Braden Obrzut
b6bbdf6195 - Call C_DeinitConsole in I_Quit so that we can be sure that Printf will work for as long as possible. Otherwise ZDoom will crash when ending a demo recording. 2014-07-16 18:59:49 -04:00
Braden Obrzut
bd5bf2a40a - Expand environment variables for autoload paths.
- Forgot to save the French translation file for the last commit, so a few more corrections there.
2014-07-15 21:26:26 -04:00
Braden Obrzut
fa5dfe79ae - Disable cubic and spline resamplers on 64-bit with fmod 4.26 since they crash. 2014-07-15 21:07:07 -04:00
Braden Obrzut
2020769967 - Fixed: Player turned into a zombie if exiting telefragged in buddha mode.
- Fixed: Players could drop their inventory after dying.
2014-07-15 20:16:28 -04:00
Christoph Oelckers
6b9d6787d9 - move models into their own draw list to avoid frequent buffer changes.
- same for SKYHACK walls. Although rare, they would get in the way of optimizing the draw calls if not being separated out.
2014-07-15 21:16:59 +02:00
Christoph Oelckers
b8bcbe819b - removed texture based dynamic lighting. For GL 3.x the shader approach is always better.
- fixed: sky fog was not unset.
2014-07-15 20:49:21 +02:00
Christoph Oelckers
fb6b4238ed - fixed: glProgramUniform is only present from GL 4.1 or a specific extension so it may not be used on systems not supporting it. 2014-07-15 02:48:59 +02:00
Christoph Oelckers
fc0cf4f998 - GZDoom now runs on an OpenGL core profile. :)
It's probably still necessary to replace GLEW with another loader library. GLEW is pretty much broken on core OpenGL without some hacky workarounds...
2014-07-15 02:26:23 +02:00
Christoph Oelckers
6046b11b4f - all shaders now compile in core profile. 2014-07-15 01:05:53 +02:00
Christoph Oelckers
eedc5a69be - replaced builtin position vertex attribute. 2014-07-15 01:02:48 +02:00
Christoph Oelckers
1b7f5a2e6a - replaced builtin texture coordinate vertex attribute. 2014-07-15 00:59:01 +02:00
Christoph Oelckers
5a322742c3 - remove use of builtin and deprecated color vertex attribute. 2014-07-15 00:37:13 +02:00
Christoph Oelckers
ed8a21fd86 - replaced deprecated alpha testing with shader code. 2014-07-14 21:14:43 +02:00
Christoph Oelckers
84a49e37ee - handle normals for spheremapped mirror surfaces using non-deprecated features.
- move all WGL references out of global header files so that global wgl header include is no longer necessary
2014-07-14 19:54:07 +02:00
Christoph Oelckers
ed5ee4e8d1 - removed some obsolete init stuff and some deprecated constants. 2014-07-14 18:48:46 +02:00
Christoph Oelckers
4df25d951b Merge branch 'master' into Glew_Version_For_Real 2014-07-14 16:51:41 +02:00
Christoph Oelckers
4297bd9a51 Merge branch 'master' of https://github.com/rheit/zdoom 2014-07-14 00:32:16 +02:00
Christoph Oelckers
1f2f7616e1 - remove timing of matrix application method 2014-07-14 00:31:10 +02:00
Christoph Oelckers
150135a07d - reinstate drawcall timing. 2014-07-13 23:14:28 +02:00
Christoph Oelckers
ce3653f6e1 - remove all uses of builtin matrices. 2014-07-13 23:13:40 +02:00
Christoph Oelckers
2214c0ac06 - remove all uses of builtin matrix manipulation. Only glLoadMatrix for view and projection matrix are left. 2014-07-13 22:37:34 +02:00
Christoph Oelckers
dbb05c5f33 - remove use of builtin texture matrices.
- make matrix class single precision.
2014-07-13 20:41:20 +02:00
Christoph Oelckers
9230a20f18 - added some checks to the wall rendering code that will allow to disable the clip planes in many cases, even when a plane mirror portal is active. This also solves the precision issue with using world coordinates for clip checks. 2014-07-13 17:15:17 +02:00
Christoph Oelckers
00fcf4bc06 - for some reason using world coordinates for clipping in the shader is somewhat imprecise so the clip plane heights have to be adjusted a bit for it. 2014-07-13 13:25:42 +02:00
Christoph Oelckers
d868f60f6c - since the clip planes for plane mirrors did not work anymore I reimplemented them using shader based logic. It still needs to be seen if this affects performance on older hardware. 2014-07-13 12:14:12 +02:00
Christoph Oelckers
004cf5748c - fixed: FraggleScript's SpawnedThings array must always be checked for owned inventory items. The 'mapthingnumexist' function forgot to do that. 2014-07-13 09:43:28 +02:00
Christoph Oelckers
400a573e65 - fixed: ACS's LineAttack function with a valid tid still used the activator as the attack's source. 2014-07-13 09:12:46 +02:00
Edward Richardson
e1130b860e Serialize FriendPlayer 2014-07-13 14:44:22 +12:00
Christoph Oelckers
7cbffc7c14 - test code removal. 2014-07-10 10:35:02 +02:00
Christoph Oelckers
a936629cec - use default fragment shader for burn and stencil shader, with the time consuming parts disabled by a #define, to avoid code duplication. 2014-07-10 10:33:07 +02:00
Christoph Oelckers
e691341541 Merge branch 'master' of https://github.com/rheit/zdoom 2014-07-09 09:16:30 +02:00
Christoph Oelckers
e1729a9ec2 - fixed compilation with VC++2005 solution.
hu_stuff.h defined some callbacks for qsort without STACK_ARGS which causes problems with this solution's Release setting which uses __fastcall calling convention.
2014-07-09 09:15:51 +02:00
Edoardo Prezioso
d83f048858 - Miscellaneous CMakeLists.txt fixes.
- fixed a CMake warning about uninitialized use of the variable CROSS_EXPORTS in the tools subfolder when CMAKE_CROSSCOMPILING is off;
- fixed a variable typo: CMAKE_CURRENTY_BINARY_DIR instead of CMAKE_CURRENT_BINARY_DIR;
- in src/CMakeLists.txt, fixed a missing merge of a portion of code from maint branch to master.
2014-07-01 19:13:05 +02:00
Christoph Oelckers
92185f96eb - fixed overflow with storing a sprite's dynamic light color in a PalEntry. 2014-07-01 09:52:41 +02:00
Christoph Oelckers
9a6bc64381 - use vertex array objects to manage vertex buffers. 2014-07-01 00:51:02 +02:00
Christoph Oelckers
5ee626459d - use model vertex buffer to render voxels. 2014-06-30 18:57:24 +02:00
Christoph Oelckers
f710518903 - use a uniform array to store vertex data to render dynamic stuff on GL 3.x hardware without the ARB_buffer_storage extension.
Due to the way the engine works it needs to render a lot of small primitives with frequent state changes.
But due to the performance of buffer uploads it is impossible to upload each primitive's vertices to a buffer separately because buffer uploads nearly always stall the GPU.
On the other hand, in order to reduce the amount of buffer uploads all the necessary state changes would have to be saved in an array until they can finally be used. This method also imposed an unacceptable overhead.
Fortunately, uploading uniform arrays is very fast and doesn't cause GPU stalls, so now the engine puts the vertex data per primitive into a uniform array and uses a static vertex buffer to index the array in the vertex shader.
This method offers the same performance as immediate mode but only uses core profile features.
2014-06-30 18:10:55 +02:00
Christoph Oelckers
6efefd9b7f - use vertex buffer to render MD3 models. 2014-06-30 18:02:52 +02:00
Christoph Oelckers
54297acde4 - removed obsolete gl_lightbuffer code.
This never worked properly and by now far better options are available to solve the problem of dynamic light data uploads.
2014-06-30 13:30:10 +02:00
Christoph Oelckers
9c5cec0056 - draw wipes with buffers
Only two things left that still use immediate mode directly: MD3 models and voxels.
2014-06-30 10:05:15 +02:00
Christoph Oelckers
1efc2938b7 - implement model vertex buffer and draw MD2 models using it instead of using the GLCommands from the model. 2014-06-29 23:24:16 +02:00
Christoph Oelckers
dd05e564cf - this needed more fixes... 2014-06-29 14:32:50 +02:00
Christoph Oelckers
2cd1118aad Merge branch 'master' into Glew_Version_For_Real 2014-06-29 14:11:03 +02:00
Christoph Oelckers
a33b49c2c2 Merge branch 'master' of https://github.com/rheit/zdoom 2014-06-29 14:09:55 +02:00
Christoph Oelckers
9d1dbf4eab - fixed: FBufferedUniform1f didn'T work because it used an int as its buffered value. 2014-06-29 14:08:44 +02:00
Christoph Oelckers
d0e551060d - fixed: When the 3D floor init code was updated 5 years ago for Vavoom's latest changes to its 3D-floor implementation it accidentally set the 3D-floor's alpha as its desaturation. 2014-06-29 12:50:42 +02:00
Christoph Oelckers
ffcb6cb70a - added second vertex coordinate attribute for model interpolation. 2014-06-29 11:00:21 +02:00
Christoph Oelckers
08054ddc34 Merge branch 'master' into Glew_Version_For_Real 2014-06-29 08:53:43 +02:00
Christoph Oelckers
77277f4f75 Merge branch 'master' of https://github.com/rheit/zdoom 2014-06-29 01:10:51 +02:00
Christoph Oelckers
7d7f146ce1 - fixed: transferring a translation to a missile needs to check if the missile was spawned successfully. 2014-06-28 15:21:19 +02:00
alexey.lysiuk
65203760a8 Fix incorrect actor flag handling on big endian platforms 2014-06-28 11:00:08 +03:00
alexey.lysiuk
7b69c60af1 Use correct 'true' keyword 2014-06-28 11:00:01 +03:00
alexey.lysiuk
e6d468eb38 Use byte swapping functions from <libkern/OSByteOrder.h> on OS X
Remove inclusion of Core Foundation headers to avoid type conflicts with LZMA SDK.
2014-06-28 10:59:56 +03:00
Braden Obrzut
d941203ab0 - Fixed edward-san's typo.
- Cleared a warning.
2014-06-26 20:37:11 -04:00
Christoph Oelckers
28afd04aef Merge branch 'master' of https://github.com/rheit/zdoom
Conflicts:
	src/CMakeLists.txt
2014-06-27 01:10:09 +02:00
Braden Obrzut
19415668ec Merge branch 'gcc_aggressive_optimization' of github.com:edward-san/zdoom into edward-san-gcc_agressive_optimization 2014-06-26 18:11:32 -04:00
Braden Obrzut
1ae53473ff Merge branch 'edward-san-cmake_gcc_compatible' 2014-06-26 17:54:48 -04:00
Braden Obrzut
cb9877e7ff - Using USE_WINDOWS_DWORD on other platforms can cause problems. 2014-06-26 17:52:26 -04:00
Christoph Oelckers
0cb1547890 Merge branch 'master' of https://github.com/rheit/zdoom 2014-06-26 09:45:27 +02:00
Christoph Oelckers
270541f942 fixed compilation with latest LZMA SDK on Windows.
LZMA SDK recently added an #include <windows.h> to its headers, meaning it's no longer safe to include its headers globally in platform independent files.
The following changes were necessary:

- rename DWORD type in zipdir.c
- add USE_WINDOWS_DWORD and reorder includes in file_7z.cpp
- wrap LZMA decoder stream into a local struct that's declared anonymously in files.h and adjust files.cpp for this change.
2014-06-26 09:43:51 +02:00
Edoardo Prezioso
1a3ac9d0b3 - Simplify CMake GCC and Clang checking.
Introduce the variable 'ZD_CMAKE_COMPILER_IS_GNUC(XX)_COMPATIBLE' and replace any occurrence of '"${CMAKE_C(XX)_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C(XX)_COMPILER_ID}" STREQUAL "Clang"' with it. This makes it possible to add more GCC compatible compilers in just one place.
2014-06-26 01:23:41 +02:00
Edoardo Prezioso
0e3bee6f30 - Enable 'language' feature on unix targets.
The sdl version of the function 'SetLanguageIDs' is very limited, comparing to the win32 counterpart, as it will try to accept only the language codes (ie 'enu', 'fr', 'ptb', etc). If a different string is provided, zdoom will default its language to English.
2014-06-23 20:02:40 +02:00
Christoph Oelckers
e15f80f640 Merge branch 'master' of https://github.com/rheit/zdoom 2014-06-23 09:27:30 +02:00
Christoph Oelckers
e2e71e072e removed error suppression code from shader compilation.
With GL 2.x support the engine still had something to fall back on, with that removed it needs to abort.
2014-06-23 09:26:29 +02:00
Christoph Oelckers
4f599b7b4d Merge branch 'master' of https://github.com/binarycrusader/zdoom 2014-06-22 09:00:23 +02:00
Christoph Oelckers
e56e525d0f - A_FireCustomMissile transfer tranlsation flag, code submission by jpalomo 2014-06-22 08:55:21 +02:00
Shawn Walker
6164807e97 - fix x64 visual studio linking for common controls 2014-06-21 22:49:42 -07:00
Christoph Oelckers
1f0c69a0e9 - some cleanup after GL 2.x code removal
- reinstated burn warp with shader based code.
2014-06-21 16:41:45 +02:00
Christoph Oelckers
2925c96b59 removed all GL 2.x code.
After thinking about it for a day or so I believe it's the best option to remove all compatibility code because it's a major obstacle for a transition to a core profile.
2014-06-21 15:50:32 +02:00
Christoph Oelckers
d5dceb6874 - changed alpha texture handling to avoid using the deprecated GL_ALPHA8 texture format unless we have a compatibility context of an older GL version. 2014-06-21 12:52:19 +02:00
Christoph Oelckers
ca76c2525e - more vertex buffer stuff for models, still not tested. 2014-06-19 22:24:33 +02:00
Christoph Oelckers
5944894138 - create vertex buffer data for MD2/DMD models. 2014-06-19 17:06:26 +02:00
Christoph Oelckers
3e9b9c280b - initialize model data at engine start, not at level start. 2014-06-19 15:22:00 +02:00
Christoph Oelckers
412d6499d9 - removed the voxel vertex buffer because it needs to be gone before implementing a model vertex buffer. 2014-06-19 14:46:55 +02:00
Christoph Oelckers
03916d75de - cleaned up MD3 rendering and merged RenderFrame and RenderFrameInterpolated into one function. 2014-06-19 13:58:49 +02:00
Christoph Oelckers
59522f7065 - simplified MD2 drawing code as preparation for a buffer based implementation. 2014-06-19 13:37:30 +02:00
Christoph Oelckers
6457ced53f Merge branch 'master' into Glew_Version_For_Real 2014-06-19 11:57:36 +02:00
Christoph Oelckers
7374cd34cf Merge branch 'master' of https://github.com/darealshinji/gzdoom 2014-06-19 11:20:47 +02:00
Christoph Oelckers
d30bf6768e Merge branch 'master' of https://github.com/rheit/zdoom 2014-06-19 11:20:38 +02:00
darealshinji
7757755e40 fix detection of libglew library on GNU/Linux 2014-06-19 10:43:37 +02:00
Edward Richardson
2d896d2b47 Added wi_autoadvance
- Prevents an absent player from stopping the intermission
2014-06-17 20:26:49 +12:00
Edward Richardson
a3a7ee569f Multi-intermission waits for all players + changes
- Added a segment of code that now makes the intermission wait for all
players before advancing, instead of continuing on any player. A "ready
icon" shows to reflect this.

- The Deathmatch intermisson couldn't show the ready icon (because it
just used the ingame scoreboard), so a proper intermission was added,
which reflects the same design as the coop scoreboard.

- The colour column wasted more space then it should have needed, so it
was replaced with player colour backgrounds.

- Slight y offset adjustments to make everything fit in 320x200
properly.
2014-06-17 19:46:10 +12:00
Christoph Oelckers
13c4e993ba Merge branch 'master' into Glew_Version_For_Real 2014-06-15 21:57:59 +02:00
Christoph Oelckers
5a0f1a882a Merge branch 'master' of https://github.com/rheit/zdoom 2014-06-15 21:57:06 +02:00
Christoph Oelckers
965a2a2d79 definition for model vertex buffer. 2014-06-15 21:56:37 +02:00
Christoph Oelckers
e6f14b055a - use buffer based rendering for dynamic light pass and horizon portals. 2014-06-15 20:28:23 +02:00
Edward Richardson
2838c4b25b Prediction was rebuilding too much thinglist data
- Stopped player prediction from rebuilding more sector list data then
the player originally had.
2014-06-16 03:34:33 +12:00
Christoph Oelckers
1aaa1b7bad - removed gl_usevbo CVAR because with recent code changes it has become useless. If GL_ARB_buffer_storage is present, buffers will always be used. 2014-06-15 12:12:24 +02:00
Christoph Oelckers
ea332383a8 - convert skybox rendering to use the buffer interface. 2014-06-15 11:50:54 +02:00
Christoph Oelckers
6b038a5dae - fixed: GLPortal::DrawPortalStencil must apply the render state before drawing anything. 2014-06-15 10:30:03 +02:00
Christoph Oelckers
2abf1644a4 - fixed: Plane height changes only updated the first buffered vertex for the respective plane. 2014-06-15 10:18:46 +02:00
Christoph Oelckers
1b91a8f88c - removed old immediate mode path for generating stencils. 2014-06-15 10:15:44 +02:00
Christoph Oelckers
3644073bbd - use a software buffer for immediate mode rendering. This allows using the regular buffer code to collect data for both render modes and allows removal of a lot of duplicated code. 2014-06-15 01:14:41 +02:00
Christoph Oelckers
5b302ed3a6 - added benchmarking calls for glDrawArrays to see how well issunig draw calls performs on different hardware. 2014-06-14 15:16:33 +02:00
Christoph Oelckers
0ce6b40672 - fixed compile error in gl_skydome.cpp
- disable GL_ARB_buffer_storage when a -glversion parameter less than 4.0 is given. According to the spec this extension requires 4.0 so if emulating something lower it should not be used.
2014-06-14 14:58:17 +02:00
Christoph Oelckers
5e22c82e79 - use buffer for rendering the sky on all GL versions since the differences for making GL2.0 work are rather small. 2014-06-14 10:38:30 +02:00
Christoph Oelckers
4ad1e0b4cb Merge branch 'master' into Glew_Version_For_Real 2014-06-14 01:24:45 +02:00
Christoph Oelckers
8d9a90cd22 - rewrote sky dome rendering to use a static vertex buffer if not on OpenGL 2.x. 2014-06-14 01:24:28 +02:00
WChrisK
67c6690689 Added a check that doesn't print empty obituary strings, as wad's that hide obituary strings in multiplayer games end up spamming a lot of empty lines. 2014-06-11 23:30:25 -04:00
Christoph Oelckers
3c0ba494f9 Merge branch 'master' of https://github.com/rheit/zdoom 2014-06-11 18:58:42 +02:00
Edward Richardson
842ef86e73 Don't reset the inventory of dead players 2014-06-09 19:54:40 +12:00
alexey.lysiuk
20adcecb1d Remove redundant saving of GL nodes if they were loaded from cache 2014-06-02 10:54:52 +02:00
alexey.lysiuk
3e7b0c2916 Fix crash when GL nodes file cannot be opened for writing
Report errors to console if nodes file cannot be opened or written
2014-06-02 10:53:29 +02:00