Commit Graph

1286 Commits

Author SHA1 Message Date
ewasylishen 51a038c76d Alias model rendering fast-path using OpenGL 2.
In GL_MakeAliasModelDisplayLists, after saving the standerd triangle strips and fans onto the hunk, if the system is GL2 capable, we also save a second version of the mdl on the hunk designed to be loaded into a VBO (GL_MakeAliasModelDisplayLists_VBO). In R_NewMap, and on video mode changes, we call GLMesh_LoadVertexBuffers which loops over all precached mdl's and loads the data into a pair of VBO's (vertices and vertex indices).

Finally, in R_DrawAliasModel, assuming no rendering options are disabling the fast-path (r_drawflat 1, r_lightmap 1, or r_fullbright 1 would disable it), we call GL_DrawAliasFrame_GLSL, which sets up all of the bindings and draws the (possibly lerped) mdl in one glDrawElements call.

Special thanks to MH for some of the code from RMQEngine and the general concept.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1151 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-01-20 18:59:15 +00:00
ewasylishen 870e6cd43c r_oldwater: change default to 0 (which means use the higher quality fitzquake render-to-texture water by default, instead of the lower quality glquake water).
Reasoning is, we default to the higher-quality settings for everything else except this.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1150 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-01-17 00:54:09 +00:00
sezero 5cdec50c15 oslibs, codecs: recompiled several music decoders from latest sources.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1149 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-01-14 20:03:01 +00:00
sezero 25be6bbc55 * oslibs (macosx, windows):
- recompile FLAC decoder with a fix for free-ing of unitilialized
  pointer (flac git, commit 18a4854)
* recompile opus decoder with a fix for avoiding undefined behavior
  (signed arithmetic overflow) or implementation-defined behavior
  (malloc(0)) on out-of-range arguments (opus git, commit 25b27a9)


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1148 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-12-23 08:50:23 +00:00
ewasylishen 37e55abb07 Support pausing demo playback.
This is done by adding an extra 'demopaused' flag to client_static_t, separate from cl.paused because we don't want a svc_setpause inside the demo (caused by the player pausing during recording) to actually pause demo playback. The only potential failure case is, if the demo contains a svc_stufftext of the command "pause", the demo will pause itself when being played.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1147 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-12-08 19:30:36 +00:00
ewasylishen e0aecab629 Host_Startdemos_f: set cls.demonum to -1 in the default case where we skip the demo loop.
Fixes a bug where if you launched QS and immediately did "playdemo [something]", after the demo finished, demo1.dem would start to play instead of returning to the console.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1146 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-12-08 19:30:30 +00:00
ewasylishen 01f2fa3fc4 Host_Loadgame_f: don't break when there are } characters in quoted strings. Fixes issue loading savegames from retrojam1_skacky
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1145 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-12-08 19:30:21 +00:00
sezero bdf211c6b8 oslibs (macosx, windows): recompile FLAC decoder with a fix for an input validation bug from upstream.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1144 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-12-05 20:01:30 +00:00
sezero 27199509d3 oslibs (macosx, windows): recompiled FLAC decoder with CVE-2014-9028 fixes applied from mainstream.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1143 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-11-27 10:57:07 +00:00
sezero ee876cbc59 oslibs (macosx, windows): recompiled FLAC decoder with CVE-2014-8962 fix applied from mainstream.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1142 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-11-21 17:24:43 +00:00
ewasylishen 2cbc9dac2b R_SetupGL: remove some dead code (glGet call that stores GL_MODELVIEW_MATRIX into r_world_matrix, which is not used anywhere.) The glGet calls was stalling the OpenGL pipeline.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1141 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-11-11 23:27:12 +00:00
ewasylishen fe70de4507 Fog_ParseWorldspawn: before reading the worldspawn value, clear the fog rgb color back to the default value (0.3).
This fixes a bug seen in jam3_tronyn.bsp (which only has a density value in the worldspawn), where the fog color of the last map played would carry over.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1140 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-11-03 21:27:27 +00:00
sezero d4bc9c723a make sure we have more than one CPUs before enabling multi-threaded OpenGL
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1139 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-11-03 09:20:23 +00:00
sezero 5041fa268e add new numcpus field to the quakeparms structure and detect it during Sys_Init time
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1138 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-11-03 09:10:18 +00:00
ewasylishen 0b01803fd6 GL_Init: on OS X, enable multi-threaded OpenGL mode.
This moves some of the OpenGL implementation to a background thread, and makes draw calls block for a shorter amount of time. AFAIK, this is the default mode on most other OS'es, not sure why you have to explicitly ask for it on OS X.

N.B. the kCGLCEMPEngine constant is available on 10.4+ so I don't bother checking the OS X version.
More info: https://developer.apple.com/library/mac/technotes/tn2085/_index.html

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1137 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-11-02 23:01:20 +00:00
svdijk bd349d36e0 quakespasm.pak: Another z-fighting workaround.
This fixes:

e2m3:
- The wallpiece that blocks the way out of the Well of Wishes (when open).


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1136 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-11-02 20:06:35 +00:00
svdijk 258b25d354 quakespasm.pak: More z-fighting workarounds.
This fixes:

e2m3:
- The floorpiece (when down) and wallpiece (when open) by the crates opposite the normal exit.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1135 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-11-02 19:36:39 +00:00
svdijk 12d170cb6d quakespasm.pak: More z-fighting workarounds.
This fixes:

e1m4:
- The secret doors in the room with the five quake-logo buttons on the floor (when open).

e2m2:
- The platform in the water behind the gold key door (when down).
- The wallpiece that pushes the player into the gold key room (when "closed").


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1134 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-11-02 19:16:35 +00:00
sezero 9df4292a91 a few more minor stuff from uhexen2 svn
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1133 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-31 13:03:20 +00:00
sezero 5795242b39 sync a few minor stuff with uhexen2 svn
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1132 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-30 18:00:06 +00:00
sezero 6763f8138c bump version to 0.90.1
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1131 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-21 20:05:08 +00:00
ewasylishen cfea94ddc2 Tweak the MH dynamic lighting speedup to be more correct: upload the lightmaps from the current frame instead of the previous frame.
It was possible, but unlikely, to see artifacts from the previous code in some circumstances, e.g. "host_maxfps 10" and spin around quickly near a flashing light e1m1, you may see a surface drawn with an out-of-date lightmap for one frame.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1130 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-21 19:27:42 +00:00
sezero 352c310f99 minor tidy-ups
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1128 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-18 17:00:34 +00:00
svdijk e876e88f74 Windows/QuakeSpasm.rc: Revert unintended change in r1126.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1127 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-18 16:34:48 +00:00
svdijk 06b30e467f sdl: Make our error checking for SDL_Init(SubSystem) consistent with the SDL wiki/test programs.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1126 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-18 16:33:01 +00:00
sezero 6ccb3e9b9b run SDL_Quit() at exit
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1125 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-18 11:20:14 +00:00
sezero 0d7b6ea734 recompiled SDL2
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1124 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-18 11:04:29 +00:00
sezero d892c29046 update document dates
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1123 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-17 11:34:10 +00:00
ewasylishen 9964eb811a readme: add a note that the Windows DPI scaling issues are fixed
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1122 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-17 00:21:20 +00:00
ewasylishen ad600c8f9c sys_sdl_win: Sys_SetDPIAware: only call GetProcAddress on a non-NULL library handle
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1121 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-17 00:15:49 +00:00
ewasylishen b8f1010b30 readme: remove section about High-DPI workaround as we've got a proper fix now
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1120 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-17 00:15:40 +00:00
ewasylishen 6bcdf105c9 sys_sdl_win.c: Sys_SetDPIAware: call SetProcessDPIAwareness / SetProcessDPIAware
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1119 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-16 23:01:43 +00:00
svdijk 8f66647544 keys.c: Add keynames BACKQUOTE and TILDE, to facilitate (un)binding them from the console.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1118 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-15 17:32:40 +00:00
svdijk 28c51c182b keys: K_ALT is not a consolekey (it was accidentally added in r1112).
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1117 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-15 06:18:29 +00:00
svdijk 05bfe07525 console.c: When toggling the fullscreen console off, clear the current line.
This is consistent with toggling the in-game console off, and fixes stray '`' or '~' (or '^' or '\' or ..., depending on the keyboard layout) characters.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1116 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-15 06:06:18 +00:00
svdijk 77e62b4750 keys.c: Ignore control characters in Char_Event(), to prevent text input when pressing ctrl-c/ctrl-v.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1115 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-15 05:58:54 +00:00
ewasylishen 985115faed in_sdl: change DBEUG_INPUT preprocessor check to an "in_debugkeys" cvar to make it easier to debug unusual keyboards
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1114 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-14 18:31:49 +00:00
svdijk fffa72d681 input: Minor fix in Char_Event().
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1113 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-14 17:13:03 +00:00
svdijk fbc9dda4aa input: Remove some of stuff obsoleted by r1110.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1112 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-14 17:10:34 +00:00
ewasylishen cce98d6b9b in_sdl.c: make key debug logging more verbose
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1111 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-14 04:03:16 +00:00
ewasylishen 6caa4dbf59 in_sdl.c, key.c: Fixes agreed on with Sander:
1. Remove Key_IgnoreTextInput(), and simple always send a Char_Event when
we receive TEXTINPUT (SDL2) or the unicode field of a KEYDOWN event is
filled (SDL1.).
2. Remove handling of K_KP_* in the menu/console, since they cannot be
relied on to not also send text (see issue described above). The handling
of K_KP_ENTER can stay, since we do know that it never sends text.
3. Remove the interpretation hack for the numpad, since it will no longer
be needed (and doesn't currently work for SDL2 anyway); if a numpad key
generates text we will handle it (because of "1"), if not then it will
simply be if ignored (because of "2”).

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1110 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-14 03:30:44 +00:00
ewasylishen e404d2ba60 in_sdl: remove lastKeyDown hack
was no longer needed and was causing issues typing underscores (US keyboard layout) on Linux/SDL2 where SDL_TEXTINPUT is delivered before the SDL_KEYDOWN.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1109 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-13 03:21:47 +00:00
ewasylishen da24855356 in_sdl: add some debug logging for key events (only if DEBUG_INPUT is defined)
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1108 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-13 03:21:40 +00:00
sezero c07fb885f9 Xcode: rename QuakeSpasmSDL2 target to QuakeSpasm-SDL2
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1107 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-12 17:15:06 +00:00
svdijk 6f62e527d5 codeblocks: Remove unused files, minor tuning.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1106 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-12 16:46:21 +00:00
sezero 419671e215 add sdl2 targets to codeblocks projects
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1105 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-12 14:00:07 +00:00
sezero 68ec5ac1a7 add an sdl2 target to msvc builds
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1104 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-12 12:38:07 +00:00
sezero 26aca14034 fix sdl2-msvc build
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1103 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-12 11:20:34 +00:00
sezero 3cedcda066 recompiled SDL1.2 for windows
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1102 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-12 09:27:44 +00:00
sezero cd369d538f minor whitespace adjustments
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1101 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-11 19:11:40 +00:00