Commit Graph

194 Commits

Author SHA1 Message Date
Shpoike 09b982158e Merge remote-tracking branch 'sf/master' into qss 2023-06-29 17:00:32 +01:00
Shpoike 69e7395b0d Add full support for HDR/E5BGR9 lighting. 2023-06-29 16:40:18 +01:00
Ozkan Sezer 3e599a847b gl_vidsdl.c: fixed build using c++ compilers. 2023-03-20 10:10:00 +03:00
BeWorld fe5e45028d SDL2 - Fix memory leek when exit game
add SDL_GL_DeleteContext and SDL_DestroyWindow
2023-03-19 10:55:44 +01:00
Shpoike 2c38d5b3e3 Merge remote-tracking branch 'sf/master' into qss 2023-03-18 12:38:25 +00:00
Ozkan Sezer 96cca58a68 mimor style tidy-up. 2022-11-03 06:28:00 +03:00
temx 226a0e7463 Water texture mipmapping support 2022-11-03 06:23:28 +03:00
Shpoike 26f0bc4682 Merge remote-tracking branch 'sf/master' into qss
(cl_startdemos stripped in favour of QSS's existing cl_demoreel cvar. osx project files ignored.)
2022-04-27 22:32:40 +01:00
Ozkan Sezer f86f1595f3 minor error messages / whitespace tidy-up & small stuff. 2022-04-22 17:50:02 +03:00
Andrei Drexler 6642ad63b7 Raise window after showing it
Potential fix for https://github.com/andrei-drexler/ironwail/issues/27:
The focused window is not the game window on initial startup until the
game window is clicked on with mouse. Confirmed that it doesn't happen
with only one screen.
2022-03-01 11:20:10 +03:00
Shpoike 996621b3ec Try to tighten up when some compressed pixelformats are available a little. 2021-11-12 03:28:09 +00:00
Shpoike 4ec4cde5f4 Add support for lit water. Move 'newwater' to glsl instead. 2021-11-12 03:28:09 +00:00
Shpoike 9119c1d546 Merge branch 'master' of https://git.code.sf.net/p/quakespasm/quakespasm into HEAD 2021-09-03 06:27:09 +01:00
Shpoike 7ba6c4474b Merge Quakespasm's post-fork changes into QSS (rebased to make them compatible) 2021-08-31 06:43:13 +01:00
Shpoike 5695ffe2d5 gl_info will no longer truncate the extensions list. 2021-08-31 04:59:13 +01:00
Shpoike 34a87f4034 Someone forgot a \n on some intel-specific Cbuf_AddText hack. 2021-08-31 04:59:13 +01:00
Shpoike 06fd012dfe Custom hardware cursors, fix missing cursor when running fullscreen. 2021-08-31 04:59:12 +01:00
Shpoike 0a61068135 Fix glCompressedTexImage2D undefined on windows. 2021-08-31 04:59:12 +01:00
Shpoike 47cae9c3f8 Added support for my extended miptex stuff for high-colour map textures. 2021-08-31 04:59:12 +01:00
Shpoike e38664c222 Hacked in support for IQMs. 2021-08-31 04:59:12 +01:00
Spike fe4b224c7d Added support for simple csqc.
This is a subset of csqc, with alternative entry points that can be invoked by compat wrappers.

Also added sv_gameplayfix_setmodelrealbox cvar. Default value of 1 matches QuakeSpasm, whereas a value of 0 matches vanilla quake's behaviour.
2021-08-31 04:59:11 +01:00
Spike d76ca606bf All changes present in QSS-R7, plus
md3 support
quoth/etc bug fix
strzone bug fix
png/jpg replacement wall textures
rewrote mdl rendering to always use arrays, relaxing vertex+tri limits.
removed static ents limit
fixed ambient_level not working at high framerates.
2021-08-31 04:59:11 +01:00
Ozkan Sezer 2313298d14 window icon should be set after window creation in SDL2. 2021-08-29 17:04:40 +03:00
Ozkan Sezer 9ca7d499e5 fixed -Wshadow warnings. 2021-06-23 04:37:10 +03:00
Ozkan Sezer 9fc38410dd VID_InitModelist (SDL-1.2): zero the whole format,
.. instead of only setting its palette fiel to NULL. This makes it work
with sdl12-compat (see: https://github.com/libsdl-org/sdl12-compat.git)
2021-04-12 12:37:04 +03:00
Eric Wasylishen ac42683f58 r_world.c: rewrite R_DrawTextureChains_Multitexture_VBO to use GLSL
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1524 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-11-01 04:01:02 +00:00
Ozkan Sezer 10ed2c85dc kill annoying warnings. remove commented pakfile/progs.dat testing code from Modlist_Init().
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1464 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-04 20:36:59 +00:00
Eric Wasylishen a2fb8317cb gl_vidsdl.c: restore vid_refreshrate from fitz 0.85; SDL2 supports it
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1461 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-03 06:43:38 +00:00
Eric Wasylishen 3b5f3794cb gl_vidsdl.c: fix indentation
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1460 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-30 22:55:51 +00:00
Eric Wasylishen 9a37377cf4 gl_vidsdl.c: fix bug where vid_desktopfullscreen would get set to 1
when entering fullscreen. Fix VID_GetDesktopFullscreen() which
was incorrectly returning "true" in regular fullscreen mode.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1459 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-30 22:46:34 +00:00
Eric Wasylishen 50c52ae0eb Com_game_f: try execing quake.rc automatically..
Not convinced there are any issues with this, and it solves these
problems:
- change to new gamedir without execing quake.rc and exit: the
  config.cfg in the new gamedir will be clobbered with the settings
  from the previous gamedir.
- discrepancy between -game command line arg and "game" command.

Video mode is locked during the "exec quake.rc" to prevent the mode
from changing.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1417 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-06-23 22:02:49 +00:00
Eric Wasylishen e45de4c68a Add QUAKESPASM_VER_SUFFIX macro for marking betas/dev builds.
Refactor printing of QUAKESPASM_VERSION/QUAKESPASM_VER_PATCH to use a new
QUAKESPASM_VER_STRING macro.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1408 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-05-29 04:17:49 +00:00
Eric Wasylishen ebe31714b2 VID_SetMode: SDL2: stay on the current display when changing modes
This allows you to move the QS window to a different monitor and
then go fullscreen on that monitor. QS will still always start on
the primary monitor.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1407 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-05-27 07:29:49 +00:00
Eric Wasylishen 0a681bd7cd new r_scale cvar, for rendering the 3D view at 1/2, 1/3, or 1/4 res.
This is for emulating a low-resolution pixellated look,
or possibly as a performance boost on slow graphics cards.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1406 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-05-26 20:37:48 +00:00
Ozkan Sezer f3af6bf791 Fixed -Wmisleading-indentation warnings from new gcc6.
The warning from gl_model.c:Mod_LoadTextures() seemed
like a real bug: Eric please check and confirm.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1301 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-04-28 21:47:12 +00:00
Eric Wasylishen dc2218b9c8 SDL2 Game Controller support
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1293 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-03-01 21:58:08 +00:00
Eric Wasylishen 9c9facfe7b gl_vidsdl.c: add vid_borderless cvar for getting a borderless window
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1292 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-02-26 20:18:27 +00:00
Eric Wasylishen 150be12da1 Contrast support with a "contrast" cvar, behaving the same as MarkV's.
It may be a useful alternative to the existing gamma control for laptops in a bright environment, etc.
(raising contrast gives less of a gray/washed out look than raising gamma, but as a disadvantage, colours near white get clipped to white.)

It's also implemented for both GLSL and SDL gamma ramps, but only if USE_GAMMA_RAMPS is set to 1.
Since USE_GAMMA_RAMPS  is 0, currently it only works with GLSL.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1290 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-02-12 23:26:36 +00:00
Eric Wasylishen 70a472bed1 GL_Init: log gl_vendor, gl_renderer, gl_version to the console.
Taken from RMQEngine. the idea is to ensure every -condebug log has the gfx driver version logged.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1284 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-28 06:07:07 +00:00
Eric Wasylishen 239503c998 VID_Toggle: disable the fast path entirely because it was failing on SDL2/WinXP.
(640x480 fullscreen -> windowed would give a large 1280x768 window mostly filled with garbage).

Previously, we were only using the fast path on old systems (no VBO support) anyway.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1272 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-03 08:38:46 +00:00
Eric Wasylishen e2321d816b Fog: move setting of GL_FOG_MODE to GL_EXP2 to a new Fog_SetupState() function and call it in VID_Restart.
Fixes bug where the fog mode was resetting to the default (GL_EXP) after a mode switch, causing fog to look different. This was only affecting SDL1 for me.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1259 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-11-26 09:06:42 +00:00
Eric Wasylishen e007116a5d Alias model VBO renderer: restructure so each model is stored in a separate VBO and load them in Mod_LoadAliasModel, rather than R_NewMap.
Initially I thought that we would never need to draw an alias model that hadn't been precached when R_NewMap runs, but this assumption turned out to be incorrect. This fixes the issue where progs/bolt.mdl wasn't rendering in the Scourge Done Slick demos.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1253 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-09-20 20:10:49 +00:00
Eric Wasylishen 5b158a2807 VID_SetMode: for SDL2, move GL context creation to be after the window is shown.
This matches the order used in the SDL2 sample applications included with the library.

Seems to fix an issue on Windows 10 with DPI scaling 150%, launching QS 0.90.1 with  "-width 1920 -height 1080 -fullscreen", and you get a horrible black flicker every few frames.
see http://celephais.net/board/view_thread.php?id=60452&start=1587

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1249 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-09-07 20:36:43 +00:00
Eric Wasylishen 56a7b45200 GLSLGamma_GammaCorrect: support this code path on old cards without the NPOT extension
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1231 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-06-15 21:17:39 +00:00
Eric Wasylishen 2e2b110ecb r_shadows: Better stencil shadow rendering from MarkV.
Now an 8-bit stencil buffer is requested when using a 24-bit depth buffer (the default).

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1209 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-18 06:11:56 +00:00
Eric Wasylishen 665c81084f R_Clear: clear stencil buffer together with depth buffer if we have one.
mh suggest that not doing this may cause performance
issues: http://forums.inside3d.com/viewtopic.php?t=2408
It's also mentioned in a "Depth In-Depth" document from AMD.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1203 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-04-16 23:57:45 +00:00
Eric Wasylishen 96f7d2004f gl_vidsdl.c: remove AMD driver special case which disabled GLSL mdl renderer, as the latest drivers fixed the bug that was working around
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1178 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-03-02 03:13:58 +00:00
Eric Wasylishen 91196a618f Disable GLSL alias model renderer on Win32+ATI/AMD until szo's bug with models drawing black can be fixed.
Replace GLAlias_SupportsShaders() with gl_glsl_alias_able variable.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1171 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-02-20 00:24:05 +00:00
Eric Wasylishen 4c4ef48fcd gl_vidsdl.c: Experimental support for SDL2's new SDL_WINDOW_FULLSCREEN_DESKTOP mode.
When cvar vid_desktopfullscreen is set to 1, fullscreen mode ignores vid_width/vid_height and uses the desktop resolution. SDL docs recommend using this, it's supposed to offer better OS integration.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1164 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-02-07 00:05:06 +00:00
Eric Wasylishen 1311398e80 New gamma correction implementation using glsl. Enabled by default on OpenGL2. Disable with -noglslgamma.
Avoids general bugginess of hardware gamma, doesn't affect the whole screen in windowed mode like HW gamma. Should fix http://sourceforge.net/p/quakespasm/bugs/5/

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1157 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-01-26 20:18:45 +00:00