Commit Graph

32 Commits

Author SHA1 Message Date
Christoph Oelckers 3da49ad20a - safety commit: all relevant code for the texturing system has been moved to texcache.cpp. 2019-10-17 21:44:34 +02:00
Christoph Oelckers bef8c9ae76 - hictinting cleanup.
This needs to be moved into the backend, and partially into the shader. So far this only removes the code from the main rendering logic, the final implementation is not done yet.
It had to go because it required the main rendering code to look deep into the texture data which would be a major blocker for refactoring.
2019-10-17 20:29:58 +02:00
Christoph Oelckers 1426ebec20 Moved hightile replacement data into the textures
Not tested yet!
2019-10-17 12:45:25 +02:00
Christoph Oelckers 4cd2c024fc - fixed crash in texture deinit code and ensure that everything gets deleted. 2019-10-16 21:16:40 +02:00
Christoph Oelckers 9a52e8039c - rerouted tileCreate and tileSetExternal calls. 2019-10-15 23:18:52 +02:00
Christoph Oelckers fbc22e0125 - sanitized walock.
Sorry, but having a globally writable pointer to every texture is just insane and makes any functional management impossible.
This is merely a preparation for adding a real texture manager. That cannot be done if any code can write over the data at will. For that, it now has to make the texture writable first or create a writable empty texture.
2019-10-11 23:31:59 +02:00
Christoph Oelckers 4d83a3c2a5 - moved all code related to texture creation to texache.cpp
Also go directly to the source when trying to determine translucency of a texture.
2019-10-10 23:29:13 +02:00
Christoph Oelckers 46ffea94a4 - cleanup of gloadtile_art. 2019-10-10 19:30:05 +02:00
Christoph Oelckers c428e367a0 - hotfix for texture filter settings.
This needs to be done differently later to choose the proper clamp setting.
2019-10-10 19:16:27 +02:00
Christoph Oelckers 1fee7a5f01 - cleanup of texture creation code.
There were several mostly pointless options complicating all of this.
2019-10-10 00:07:45 +02:00
Christoph Oelckers ae1e090716 - all non-shader related GL calls are gone from the main code base. 2019-10-04 21:13:04 +02:00
terminx ccdba037b5 Added Xfree() function to accompany the Xmalloc() family of functions and change all uses of Bfree() to Xfree()
This was necessary because everything is already allocated with the Xmalloc() functions, but a future commit will make blocks allocated with those functions no longer compatible with the system implementation of free(), which Bfree() wraps.

git-svn-id: https://svn.eduke32.com/eduke32@7705 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/build.cpp
#	source/build/src/mdsprite.cpp
#	source/build/src/polymer.cpp
#	source/build/src/polymost.cpp
#	source/build/src/texcache.cpp
#	source/build/src/voxmodel.cpp
2019-09-20 12:07:10 +02:00
terminx a5965e2562 Remove r_usetileshades--GLOBAL_NO_GL_TILESHADES flag for DN64 not affected
This also locks the texture filtering options in the menu behind ifdef guards until they're fixed.

git-svn-id: https://svn.eduke32.com/eduke32@7420 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymost.cpp
#	source/duke3d/src/menus.cpp
2019-09-19 10:50:18 +02:00
Christoph Oelckers e0f823a492 - refactored texture setup to use an intermediate layer. 2019-09-18 22:16:15 +02:00
Christoph Oelckers d63cf04e06 - removed the compressed texture cache.
This is a pointless relic from the past and makes zero sense with modern graphics hardware.
2019-09-17 20:18:18 +02:00
Christoph Oelckers aecdd9b4c5 - this is the state I want to build. 2019-09-13 21:43:05 +02:00
terminx 33a3e9fbca Fix compilation error in texcache
git-svn-id: https://svn.eduke32.com/eduke32@7380 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-02 23:35:43 +00:00
hendricks266 7414f29348 Add buildvfs, abstraction layer for file I/O.
Currently it passes calls through to the system libraries as before.

Also adds an incomplete implementation on PhysFS.

git-svn-id: https://svn.eduke32.com/eduke32@7359 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-01 08:51:50 +00:00
hendricks266 789d9bd8e6 Rename "textures" to "texturecache" and "textures.cache" to "texturecache.index"
This avoids conflicts with folders named "textures", such as in World Tour. Thanks to enderandrew for the observation.

git-svn-id: https://svn.eduke32.com/eduke32@7347 1a8010ca-5511-0410-912e-c29ae57300e0
2019-02-22 03:40:49 +00:00
terminx 1f8b23152e Replace remaining instances of regular malloc/calloc/realloc/strdup with our memory error handler versions
git-svn-id: https://svn.eduke32.com/eduke32@7079 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-25 23:28:56 +00:00
terminx 9157ae2776 Fix potential texcache issue with HICTINT_IN_MEMORY and HICTINT_APPLYOVERALTPAL due to a mistake involving operator precedence
git-svn-id: https://svn.eduke32.com/eduke32@7002 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-07 05:20:19 +00:00
terminx 1fd209444f Continuing the quest for clearer function names
git-svn-id: https://svn.eduke32.com/eduke32@6829 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-12 21:03:12 +00:00
pogokeen b969687689 texcache.cpp: Override PTH_INDEXED and fall back to pre-processing tiles if high colour tint effects are being used on indexed colour art
git-svn-id: https://svn.eduke32.com/eduke32@6788 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-23 04:02:35 +00:00
pogokeen a364b7bbfd Polymost palette-indexed texture rendering
git-svn-id: https://svn.eduke32.com/eduke32@6776 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-21 20:41:26 +00:00
pogokeen 3ca5f33c73 Moved to GLAD for dynamic GL/WGL and extension loading.
Refactored extension usage that became core in GL2, and adjusted some types for GL2 compatibility.

git-svn-id: https://svn.eduke32.com/eduke32@6656 1a8010ca-5511-0410-912e-c29ae57300e0
2018-02-16 06:38:21 +00:00
hendricks266 bf76269906 What the last commit said.
git-svn-id: https://svn.eduke32.com/eduke32@6302 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-27 11:01:12 +00:00
terminx bb75d0fbde Texcache cleanups. No longer allocates a 256 byte buffer for every cache entry's name.
git-svn-id: https://svn.eduke32.com/eduke32@6300 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-27 02:24:34 +00:00
hendricks266 262e863b33 Polymodes: Only try texcache_fetchmulti on detail texture slots.
git-svn-id: https://svn.eduke32.com/eduke32@6221 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-22 01:32:10 +00:00
hendricks266 b25ec936b3 Polymodes: Check that texture entries have a non-skybox filename before using it in texcache_fetchmulti.
Fixes crash reported by Sgt Jack V.

git-svn-id: https://svn.eduke32.com/eduke32@6220 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-22 01:32:05 +00:00
hendricks266 ad46ac785f Add new tint flag 256, which always skips hightile when picking an image source.
git-svn-id: https://svn.eduke32.com/eduke32@6218 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-21 13:46:59 +00:00
hendricks266 a032b829bf Factor out hictinting array accesses.
git-svn-id: https://svn.eduke32.com/eduke32@6216 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-21 13:46:50 +00:00
hendricks266 1cc9d13ccf The great repository rearrangement of 2017.
Files moved but not modified. Changes to follow in a subsequent commit.

You down with CPP?

git-svn-id: https://svn.eduke32.com/eduke32@6055 1a8010ca-5511-0410-912e-c29ae57300e0
2017-02-01 10:01:11 +00:00
Renamed from polymer/eduke32/build/src/texcache.c (Browse further)