Commit Graph

898 Commits

Author SHA1 Message Date
Christoph Oelckers 452cfe385e - Blood's voxel loader override has somehow gotten lost. 2019-10-16 23:57:29 +02:00
Christoph Oelckers 0aa5db7969 - project rework to shorten compile times.
* subprojects fpr game frontends added and unsigned char option put into global flags.
2019-10-16 23:09:02 +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 64e116a4b1 - use special classes with [] operators to redirect the frequently used global arrays to the newly implemented texture manager.
This allows to use the contained storage without changing all the code.
2019-10-16 20:39:59 +02:00
Christoph Oelckers 4dc69620b7 - cleanup 2019-10-15 23:56:29 +02:00
Christoph Oelckers 57c221644a - transitioned all texture options of the def file 2019-10-15 23:38:01 +02:00
Christoph Oelckers bb78db71bc - tileDelete / tileSetDummy 2019-10-15 23:29:47 +02:00
Christoph Oelckers 9a52e8039c - rerouted tileCreate and tileSetExternal calls. 2019-10-15 23:18:52 +02:00
Christoph Oelckers c3bc690e98 - more updating and bug in UpdatePicSize fixed. 2019-10-15 20:02:37 +02:00
Christoph Oelckers 0e165e40a3 - first batch of adjustments to the new tile management.
- consolidated Polymost precaching and removed precaching for static tiles because they now are always loaded.
- removed cache configurability. On modern systems this is relatively pointless - allocating 50 or 100 MB is a non-issue - and the cache is due for replacement anyway.
2019-10-15 00:54:14 +02:00
Christoph Oelckers 4b6f28e7c8 - hooked up the writable texture types. 2019-10-15 00:19:31 +02:00
Christoph Oelckers 039d948991 - update of new texture classes. 2019-10-14 23:11:01 +02:00
Christoph Oelckers a6ba81939a - reworked texture management, not yet active. 2019-10-12 22:49:46 +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 3621aae3f0 - rerouted all write accesses to tilesiz and picsiz through a function interface.
These will have to do some texture management bookkeeping so directly changing the values is problematic.
This required changing the parameter interface in polymost.cpp because a few places hacked around with the global state to pass parameters to subfunctions.
2019-10-11 21:04:31 +02:00
Christoph Oelckers 14b21bab7a - merged playing_blood and bloodhack variables because they did the same thing.
The only difference was that bloodhack came from NBlood and playing_blood was added for unhandled differences between the backends of EDuke32 and NBlood.
2019-10-11 00:34:27 +02:00
Christoph Oelckers d9d721bff6 - removed old sky code.
r_flatsky is now the only option.
2019-10-11 00:15:20 +02:00
Christoph Oelckers 79ef3413dc - removed a large block of fudging code for NPOT textures on non-supporting hardware.
We do not care about non-supporting hardware, so off this goes.
2019-10-10 23:38:06 +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 c588cd499a - let GLInstance::Draw set the palette indexing mode.
This can be trivially decided based on the texture type, so there's really no need to let the higher level code deal with this.
2019-10-10 23:14:57 +02:00
Christoph Oelckers 36ca38258e - hotfixed the transparency checkers to not create textures from regular tiles.
This caused some broken textures, apparently this gets called when not everything has been set up.
The hightile case will also have to be fixed.
2019-10-10 22:23:20 +02:00
Christoph Oelckers fbc7e626e9 - removed the fullbright render pass, because this is better set up as a shader option.
- also removed the legacy fog modes because their implementation did not mix well with the texture system - they are also not really useful to begin with.

The last fog mode will most likely also be removed once true color shading is working but that one is less of an issue.
2019-10-10 21:05:10 +02:00
Christoph Oelckers 84b10bdb74 - cleaned up videoUpdatePalette function and removed the hardware texture invalidation from it.
This makes no sense because it'd toss out all the level textures that may still be needed for what probably is only a temporary palette change (like going underwater)
2019-10-10 20:28:41 +02:00
Christoph Oelckers 1407c18f8b - cleaned out some remains of the non-indexed render path.
All of this will be redone in the backend.
2019-10-10 19:40:33 +02:00
Christoph Oelckers 46ffea94a4 - cleanup of gloadtile_art. 2019-10-10 19:30:05 +02:00
Christoph Oelckers 34b7759b7e - removed the non-indexed parts of gloadtile_art.
This won't be needed anymore.
2019-10-10 19:25:03 +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 eca099681a - hooked up the Shadow Warrior frontend.
It doesn't really work but this way it always gets compiled and linked so that it receives the changes to the backend code.
2019-10-09 20:14:04 +02:00
Christoph Oelckers ef0fd57367 - small bits of cleanup. 2019-10-08 22:23:48 +02:00
Christoph Oelckers 93f9303c62 - minor reorganization of tiles. 2019-10-08 19:46:39 +02:00
Christoph Oelckers b78b53d75b - deleted unused function. 2019-10-08 18:48:14 +02:00
Christoph Oelckers 50e6d364be - prevent crash on invalid textures. 2019-10-08 01:37:24 +02:00
Christoph Oelckers 7131fe6c6e - use separate textures for the palswap shade tables.
This creates a lot less mess than one big texture and also allows easier use of texelFetch in the server which is preferable for data textures.
2019-10-08 01:08:08 +02:00
Christoph Oelckers 82f6e2edb0 - fixed creation of paletted textures and added some palette debugging aids. 2019-10-07 23:32:38 +02:00
Christoph Oelckers c050a0c4c8 - changed palswap management to handle the size of full lookup tables. 2019-10-07 00:34:15 +02:00
Christoph Oelckers 7713860b63 wip. 2019-10-07 00:14:16 +02:00
Christoph Oelckers 734d8b7d1e - moved the palette management into the backend. 2019-10-06 21:15:53 +02:00
Christoph Oelckers b1aaafb973 - abstracted uploadpalswap out of the game code.
This needs special setup on the renderer side that needs to be done in a more controlled fashion.
2019-10-06 19:47:31 +02:00
Christoph Oelckers ef2de97077 - the harmless changes of the failed refactoring of the shader. 2019-10-06 19:32:35 +02:00
Christoph Oelckers 71d132b470 - use explicitly declared matrix uniforms.
The builtin matrices are no longer available in modern GLSL, preventing an upgrade of the shader.
Also perform better reporting of shader compilation errors.
2019-10-06 10:19:51 +02:00
Christoph Oelckers d1a7c4225d - added a texture class for ART-format hightiles.
This allows to treat them like all other image formats.
2019-10-05 23:44:28 +02:00
Christoph Oelckers 0dfe99356d - stripped most of the image processing code from kplib, because it's not needed anymore - and also not salvageable for any refactoring. 2019-10-05 22:32:32 +02:00
Christoph Oelckers 93ad83b380 - use GZDoom's texture backend to read hightile textures. (Hightile tinting code moved to the shader but isn't active yet.
- remove all code for faking gamma correction through palette manipulated images.
2019-10-05 21:59:03 +02:00
Christoph Oelckers bedfc262c4 - added a FileReader wrapper for kopen4load.
Needed when transitioning the hightile loader to GZDoom's texture loader.
2019-10-05 17:30:23 +02:00
Christoph Oelckers f99492d6d5 - removed OpenGL headers from non-backend files. 2019-10-05 13:57:26 +02:00
Christoph Oelckers 3c193bb243 - moved the animvpx shader to the backend code.
This removes the final access to OpenGL from the rest of the source, with the exception of the glFinish call in the swap code.
2019-10-05 13:38:02 +02:00
Christoph Oelckers 0ee80628a2 - moved documentation out of the Source folder and added surface shader sources. 2019-10-05 13:17:26 +02:00
Christoph Oelckers b83349fe6b - moved the surface shader to the backend and the shader source to the resource file. 2019-10-05 13:09:15 +02:00
Christoph Oelckers 644b07b718 - minor fixes. 2019-10-05 12:39:50 +02:00