Commit graph

18 commits

Author SHA1 Message Date
Daniel Gibson
a006f5802b
Merge 161a0b39b9 into c6c44f262e 2025-04-27 15:21:31 +00:00
Daniel Gibson
0f4b6e7245 Support BPTC (BC7) textures in .DDS
Can have better image quality than S3TC (DXT1-5).

based on a patch by Github user "Manoa1911":
https://github.com/dhewm/dhewm3/issues/447#issuecomment-2254369525

Only supports DXGI_FORMAT_BC7_UNORM - I hope that's enough?
BC7/BPTC is supported by all GPUs that support DX11 (or newer)
or OpenGL 4.2 (or newer). That should be the case for Radeon HD 5000
and newer, Geforce 400 and newer and Intel iGPUs from Ivy Bridge on.
Those GPUs are from 2009/2010, 2012 for Intel.

fix #447
2025-03-05 05:56:46 +01:00
Daniel Gibson
161a0b39b9 Better support for mirrors seeing other mirrors, #367
It used to crash because after recursing into R_MirrorPoint(), which
calls tr.CropRenderSize(), about MAX_RENDER_CROPS times,
CropRenderSize() wrote behind the end of tr.renderCrops[] and damaged
a pointer.
Even if it didn't crash because of that, endlessly recursing is a bad
idea, so it's limited now. The limit can be configued with the new
r_maxMirrorRecursion CVar, but the hard limit is MAX_RENDER_CROPS-3 = 5

Another problem was that mirrors and other subviews render into
a texture, specifically globalImages->scratchImage ("_scratch"), so
it could happen that it got written to several times before being used.
Now there are 8 scratch images (+ the original "_scratch" which is also
used by gamecode) that the subview code cycles through to minimize the
chance of overwriting something that's still in use.
2025-01-23 03:34:05 +01:00
Daniel Gibson
47bd8afa91 Try to ensure currentDepthImage always uses NEAREST filtering
cleaner than only setting it in CopyDepthbuffer()
2024-07-25 03:24:20 +02:00
Daniel Gibson
41eef54611 Merge soft particles from thedarkmod 2.04
don't really work, though
2024-07-25 03:24:20 +02:00
Daniel Gibson
996947eec6 Fix -Wmismatched-new-delete warnings
totally valid, how didn't we find them yet (ok, maybe because those
functions aren't called much)
2023-01-05 07:56:16 +01:00
Tobias Frost
8c699cd030 s/referneces/references 2021-01-15 18:00:25 +01:00
Daniel Gibson
aca8c24c3a Assertions in _alloca() and _alloca16() for too big stack allocations
not on Windows though, for some reason MSVC doesn't like my ugly
hack to add an assert() to the _alloca16() macro :-/
2020-01-11 16:14:43 +01:00
Daniel Gibson
519cc68b0e idCommon::SetCallback() and GetAdditionalFunction() - for Mods
This is an ugly hack that allows both exporting additional functions
(incl. methods via static function + void* userArg) to Game DLLs
and setting callback functions from the Game DLL that the Engine will
call, without breaking the Game API (again after this change).
This is mostly meant for replacing ugly hacks with SourceHook and
similar and mods (yes, this is still an ugly hack, but less ugly).

See the huge comment in Common.h for more information.

Right now the only thing implemented is a Callback for when images
are reloaded (via reloadImages or vid_restart) - Ruiner needs that.

Also increased GAME_API_VERSION to 9, because this breaks the A[PB]I
(hopefully after the next release it won't be broken in the foreseeable
 future)
2018-09-30 05:06:20 +02:00
dhewg
2a3d07e174 More logging cleanup 2012-07-20 00:12:55 +02:00
dhewg
32530bf7a2 Get rid of GLimp_EnableLogging
Only stubs left.
2012-01-02 15:44:00 -05:00
dhewg
736ec20d4d Untangle the epic precompiled.h mess
Don't include the lazy precompiled.h everywhere, only what's
required for the compilation unit.
platform.h needs to be included instead to provide all essential
defines and types.
All includes use the relative path to the neo or the game
specific root.
Move all idlib related includes from idlib/Lib.h to precompiled.h.
precompiled.h still exists for the MFC stuff in tools/.
Add some missing header guards.
2011-12-19 23:21:47 +01:00
dhewg
09f3aa0568 Fix -Wuninitialized warnings
may be used uninitialized in this function
2011-12-10 15:36:05 +01:00
dhewg
7f4bcf94ca Fix -Wunused-function warnings
defined but not used
2011-12-10 15:36:02 +01:00
dhewg
9d97eefb1a Fix -Wwrite-strings warnings
deprecated conversion from string constant to ‘char*’

Constify lots of "char *".
2011-12-10 15:36:00 +01:00
dhewg
79ad905e05 Fix all whitespace errors
Excluding 3rd party files.
2011-12-10 15:35:54 +01:00
dhewg
ff493f6847 Fix quoting in GPL headers 2011-12-10 15:34:48 +01:00
Timothee 'TTimo' Besset
fb1609f554 hello world 2011-11-22 15:28:15 -06:00