Commit graph

3948 commits

Author SHA1 Message Date
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
Christoph Oelckers
9cd074ddf3 - fixed: plane equation vectors must be normalized when being loaded from UDMF. 2014-06-02 10:51:17 +02:00
alexey.lysiuk
96e4cb90b7 Fix crash on attempt to save cached OpenGL nodes on OS X
Root permissions are required to be able to create directories inside /Library/Application Support
So user's ~/Library/Application Support is used to store cached nodes
2014-06-01 15:12:41 +03:00
Christoph Oelckers
2ad47935ef Merge branch 'master' into Glew_Version_For_Real 2014-06-01 12:43:17 +02:00
Christoph Oelckers
7fedaf9221 Merge branch 'master' of https://github.com/rheit/zdoom 2014-06-01 12:39:13 +02:00
alexey.lysiuk
a26fbc74f0 Fix compilation errors in latest texture-related changes
GCC and Clang complain about non-POD type passed to variadic function.
2014-06-01 10:27:16 +03:00
Edward Richardson
3817bed0b3 Weap scroll could sometimes miss sameslot weapons
In rear cases, when using next/prevweap, defined weapons in the same
slot couldn't cycle when looping to another when you only had weapons in
1 slot.
2014-06-01 18:13:47 +12:00
Christoph Oelckers
d925279bef - fixed texture name handling in GL related texture classes for recent changes in ZDoom to eliminate the 8 character name limit. 2014-06-01 00:04:28 +02:00
Christoph Oelckers
3c5d07e9c6 Merge branch 'master' of https://github.com/rheit/zdoom 2014-05-31 11:05:44 +02:00
Christoph Oelckers
c39318f406 - use vertex buffer and reuse of data for stencil drawing. A stencil needs to be drawn multiple times with the same polygons so this is a good place to optimize. 2014-05-31 09:32:17 +02:00
Christoph Oelckers
8f5683e23d - moved secret found message to string table and removed the CVAR crutch that dates from a time when modifying string table content wasn't as easy as it is now.
- added 'showsecretsector' CVAR to show the sector number with the secret found message.
2014-05-29 17:50:14 +02:00
Christoph Oelckers
75cde0b221 - allow locks to check for a key's species so that newly defined keys can open previously defined locks without the need to redefine them. 2014-05-29 17:30:01 +02:00
Edoardo Prezioso
72bbb19cc7 - Shut up GCC aggressive optimizer warnings.
From what I can see, GCC would miscompile the involved loops, because the index variable is 'signed int' and the multiplication with an unsigned would cause signed overflow (undefined behavior). Change the index variable type to 'unsigned int' to expect unsigned overflow (conformant to standard).
2014-05-25 10:11:09 +02:00
Edoardo Prezioso
b285cbebe4 - Fixed compiler errors in latest TEXTURES code. 2014-05-25 01:12:16 +02:00
Christoph Oelckers
9d846395bc - replaced console buffer with a significantly more efficient new version that also can hold a lot more data. 2014-05-24 21:05:00 +02:00
Christoph Oelckers
a1ec6ab1ba - fixed some Linux warnings. 2014-05-24 16:53:57 +02:00
Christoph Oelckers
e813ddf251 - fixed bad comparison. 2014-05-24 16:47:34 +02:00
Shawn Walker
01e909070a Merge branch 'master' of https://github.com/rheit/zdoom 2014-05-23 19:08:56 -07:00
Christoph Oelckers
12c038a234 Merge branch 'master' into Glew_Version_For_Real 2014-05-21 15:26:22 +02:00
Christoph Oelckers
360e7d17f2 Merge branch 'master' of https://github.com/rheit/zdoom 2014-05-21 15:25:56 +02:00
Christoph Oelckers
54425ee2ef - fixed: Desaturation factor was applied incorrectly.
- Also fixed some very strange thing in the shader's desaturate function. For unknown reasons using the 'mix' function there did not work.
- fixed: The fog boundary special shader could not be used.
2014-05-21 13:40:46 +02:00
Christoph Oelckers
0cf37f2e51 - fixed problem with selecting special shaders. 2014-05-21 12:36:29 +02:00
Christoph Oelckers
f5ea31b518 - use vertex buffer for all the common 2D rendering functions. 2014-05-21 00:36:04 +02:00
Christoph Oelckers
09ba62fbef - put all the common part of buffer based drawing into a separate method of the vertex buffer. 2014-05-20 22:37:38 +02:00
Christoph Oelckers
23fbd69963 - 4 more places where immediate mode drawing has been substituted with a buffer-based alternative. 2014-05-20 22:20:15 +02:00
Christoph Oelckers
261bc77846 - fixed: when bringing up a new weapon the current flash state needs to be removed.
Especially when dropping the current weapon it can still be active, this is most easily observed with Strife's crossbow which loops the flash state, but it also can happen with other weapons, right after shooting.
2014-05-20 10:29:27 +02:00
Christoph Oelckers
8ec95dc58e - fixed a few places in the savegame code where map names were still truncated to 8 characters. 2014-05-20 10:14:44 +02:00
Shawn Walker
582b1990b7 - restore original line endings 2014-05-18 16:00:31 -07:00
Shawn Walker
d2b0596cd4 Merge branch 'master' of https://github.com/rheit/zdoom 2014-05-18 15:39:41 -07:00
Shawn Walker
59885b856d - remove texture name length limits for udmf maps 2014-05-18 15:38:46 -07:00
Christoph Oelckers
6e6be8ed5b Merge branch 'master' into Glew_Version_For_Real 2014-05-18 12:47:48 +02:00
Christoph Oelckers
e84dc99475 Merge branch 'master' of https://github.com/rheit/zdoom 2014-05-18 12:46:28 +02:00
Christoph Oelckers
4acc04ce68 - don't truncate map names stored in demos. 2014-05-18 10:05:35 +02:00
Christoph Oelckers
cfef894867 This can be done better... 2014-05-18 09:41:13 +02:00
Edward Richardson
26b1abe3da Fix netgame arbitration with long map lump names 2014-05-18 18:38:54 +12:00
Christoph Oelckers
ff7913ace8 - fixed: When a level gets loaded the renderer's sky variables need to be set. 2014-05-17 09:46:58 +02:00
Shawn Walker
ae8995e65b Merge branch 'master' of https://github.com/rheit/zdoom
# By Christoph Oelckers (2) and Edward Richardson (1)
# Via Christoph Oelckers
* 'master' of https://github.com/rheit/zdoom:
  - fixed: The map setup code was still truncating texture names in several places.
  Fix nettic run-out at end of demo playback
  - fixed: ACS's check...Texture functions must use the same search flags as the texture initialization code in p_setup.cpp and p_udmf.cpp. It also should not create textures that don't exist yet. We are only doing a comparison so it's not relevant if the texture exists or not.
2014-05-16 20:27:57 -07:00
Christoph Oelckers
8443de3f33 Merge branch 'master' of https://github.com/rheit/zdoom 2014-05-16 22:50:12 +02:00
Christoph Oelckers
e92032e8ff - fixed: The map setup code was still truncating texture names in several places. 2014-05-16 22:48:37 +02:00
Christoph Oelckers
76b4ff143f Merge branch 'upstream' of https://github.com/Edward850/zdoom 2014-05-16 15:56:32 +02:00
Edward Richardson
d3dcc04666 Fix nettic run-out at end of demo playback 2014-05-17 00:36:43 +12:00
Christoph Oelckers
25f4af734f - fixed: ACS's check...Texture functions must use the same search flags as the texture initialization code in p_setup.cpp and p_udmf.cpp. It also should not create textures that don't exist yet. We are only doing a comparison so it's not relevant if the texture exists or not. 2014-05-16 10:56:23 +02:00
Shawn Walker
49e0eb03cc Merge branch 'master' of https://github.com/rheit/zdoom 2014-05-15 22:55:35 -07:00
Christoph Oelckers
bf6a193e5b - fixed: The episode parser was still truncating its map names to 8 characters. 2014-05-15 20:29:36 +02:00
Christoph Oelckers
03d4f23a6e - made adjustments to the texture loading code to account for the recent changes to handle long texture names. 2014-05-15 19:27:22 +02:00
Christoph Oelckers
4e64ad847b Merge branch 'master' of https://github.com/rheit/zdoom 2014-05-15 09:46:47 +02:00
Shawn Walker
bfb5944517 Merge branch 'master' of https://github.com/rheit/zdoom 2014-05-15 00:11:52 -07:00
Christoph Oelckers
e3cd144af9 - one last GCC compile problem. 2014-05-14 17:27:22 +02:00
Christoph Oelckers
adcdc11360 - GCC compile fix. 2014-05-14 15:44:05 +02:00
Christoph Oelckers
2944e4f6ae - fixed some Linux issues with recent changes. 2014-05-14 14:08:14 +02:00
Christoph Oelckers
85fb8c4326 - fixed: _M_X64 macro was misnamed _M_IX64. 2014-05-14 13:04:47 +02:00
Christoph Oelckers
388f09f786 - fixed: In Heretic corpses do not get crunched to gibs, they just get their size reduced to 0. Handled by a new gameinfo flag. This also gets set for Chex quest which has the gib sprite replaced by something different. Using a Crush state will override this global flag. 2014-05-14 12:54:03 +02:00
Christoph Oelckers
47a9dab56d - allow setting sector planes' plane equations directly from UDMF. 2014-05-14 12:16:33 +02:00
Christoph Oelckers
8c052818b7 - fixed: long texture name lookup did not work with TEXMAN_TryAny. 2014-05-14 10:27:40 +02:00
Shawn Walker
fdfcb728a9 - make it easier to spot patch definition errors in console log 2014-05-13 22:50:39 -07:00
Christoph Oelckers
a375454474 - removed 8 character limit for map names. 2014-05-14 00:52:16 +02:00
Christoph Oelckers
24886b6734 - removed the last static character arrays from FLevelLocals. 2014-05-13 23:16:13 +02:00
Christoph Oelckers
e49e926bd9 - added option to ASectorAction to remove itself upon triggering by setting the STANDSTILL flag on the map thing. 2014-05-13 21:26:51 +02:00
Christoph Oelckers
30f57c0b8e - added new renderstyles AddStencil and AddShaded. 2014-05-13 21:16:06 +02:00
Christoph Oelckers
ca4179caa3 - allow texture lookup by full path names. Due to technical limitations this may result in double textures if the same graphics lump is also referenced by its short texture name. 2014-05-13 20:51:16 +02:00
Christoph Oelckers
ebd6c18bef - missed one texture name field in level_info_t. 2014-05-13 15:32:54 +02:00
Christoph Oelckers
a22670626c - expanded names for view border elements. Also fixed the horribly bad implementation of custom borders which modified the DoomBorder elements without ever checking the game being used. 2014-05-13 13:40:02 +02:00
Christoph Oelckers
a05e62f3f7 - changed storage of lump and texture names in gameinfo to allow long names (with the exception of view border elements.) 2014-05-13 12:44:17 +02:00
Christoph Oelckers
a05e584b81 Merge branch 'master' of https://github.com/rheit/zdoom 2014-05-13 12:00:37 +02:00
Christoph Oelckers
60f0ab5f1b - fixed Linux warning with type cast. 2014-05-13 12:00:11 +02:00
Christoph Oelckers
e718a72b4d fixed: skies should be loaded into the FLevelLocals struct not into the global variables of the renderer. 2014-05-13 11:53:08 +02:00
Christoph Oelckers
fedf9c6a5b fixed: if we allow long names for the fade table we must also check for them when the colormap gets loaded. 2014-05-13 11:39:25 +02:00
Christoph Oelckers
65e8563cf4 replaced all character arrays for lump/texture names in the level_info_t and FLevelLocals structures with FStrings as first preparation for allowing long texture names. 2014-05-13 11:33:59 +02:00
Christoph Oelckers
579eff5b96 - add vertex buffer based rendering for decals. 2014-05-12 22:46:30 +02:00
Christoph Oelckers
cf45f2d718 - added missing shader files. 2014-05-12 22:24:26 +02:00
Christoph Oelckers
b514a815f4 - enable use of vertex buffer for sprite rendering. 2014-05-12 20:23:54 +02:00
Christoph Oelckers
9c659b948c - reactivated texture warping. 2014-05-12 15:13:07 +02:00
Christoph Oelckers
55d4c89753 - fixed: fog density calculation for fixed function was not correct. 2014-05-12 14:58:37 +02:00
Christoph Oelckers
4d005bdfa0 shader rework
All those special shaders have been merged together.
Mostly working but the non-shader lighting seems a bit broken.
2014-05-12 14:45:41 +02:00
Christoph Oelckers
98cc7eeb99 pass softlightlevel through render state. 2014-05-12 00:13:19 +02:00
Christoph Oelckers
b9a6fe80a4 Do not use the shader to handle STYLEF_RedIsAlpha.
Turns out that the name doesn't accurately describe what it does.
It is correct for images that come with their own palette or are true color.
But for images using the game palette it doesn't use the red channel to determine translucency but the palette index! Ugh...

This means it cannot be done with a simple operation in the shader because it won't get a proper source image. The only solution is to create a separate texture.
2014-05-11 23:56:53 +02:00
Christoph Oelckers
506798f134 allow brightmaps and fullbright objects in fog. The reasons why they were disabled no longer exist. 2014-05-11 23:12:28 +02:00
Christoph Oelckers
c47c7421a3 - route all glColor calls through render state.
- add sector links to dynamic lights.
2014-05-11 22:57:42 +02:00
Christoph Oelckers
978ace241c - removed all code that mixes together the different lighting methods. Now everything goes through the 3 different light parameters in the render state.
- removed cm parameter from many functions.
2014-05-11 21:47:54 +02:00
Christoph Oelckers
887d35d559 - remove colormap from texture generation parameters. The one remaining special case, alpha texture on old hardware is now handled by the currently set texture mode at the time of use.
- use the cleaned up decal lighting code from the first GLEW branch.
2014-05-11 19:44:19 +02:00
Christoph Oelckers
7793bbbcc9 Further cleanup of lighting code.
- remove thing color from lighting calculations.
- implement alpha textures and inverse sprites for infrared as texture modes. This still requires some handling for the alpha texture mode for non-shader rendering because there is no way in the fixed pipeline to do it. The inverted texture effect can be done with a texture combiner.
- fixed: ThingColor for sprites was set in the wrong place. It must be in the Process function, not in the lighting calculation.
- added functions for isolated calculation of sprites' dynlight color.
2014-05-11 17:56:38 +02:00