taisei/src/resource
Andrei Alexeyev b45b2c22ce
renderer,gl33: fix texture management issues
Previously we assumed that we generally do not need to unbind textures
from shader samplers: if a sampler had no Taisei-level texture binding,
we would simply not update its OpenGL-level binding. This assumption is
no longer valid after introduction of cubemap textures. Shader samplers
always have an OpenGL-level binding to a texturing unit (0 by default).
If the sampler type is not compatible with the type of texture bound to
its texturing unit (e.g. 2D texture with a cube sampler), the draw call
will raise an error, even if the shader does not actually use the
invalid sampler.

For that reason, we now make sure that all samplers without a
Taisei-level texture binding are assigned a texturing unit with no
OpenGL-level texture binding. The texunit juggling logic had to be fixed
quite a bit to correctly handle unbinding textures.

Additionally, some assertions have been added to prevent assigning
incompatible textures to samplers via the renderer API, and the number
of minimum required texturing units has been raised to 8 (we sometimes
need more than 4 bound textures at a time).
2021-07-13 00:21:03 +03:00
..
texture_loader renderer,texture_loader: Add support for cubemap textures 2021-07-11 18:08:00 +03:00
animation.c Fix some issues found by clang static analysis 2021-06-18 16:11:00 +03:00
animation.h resources: remove some obsolete getter functions 2021-02-22 03:27:10 +02:00
bgm.c Audio rewrite (#236) 2020-06-22 17:41:03 +03:00
bgm.h Audio rewrite (#236) 2020-06-22 17:41:03 +03:00
font.c renderer,texture_loader: Add support for cubemap textures 2021-07-11 18:08:00 +03:00
font.h Establish more-or-less consistent resource getter functions 2020-06-09 04:33:22 +03:00
iqm.h Replace .obj models with .iqm (#232) 2020-06-06 18:27:08 +03:00
meson.build Texturing overhaul: GPU compression, sRGB sampling, swizzles, etc. (#240) 2020-08-15 14:51:12 +03:00
model.c Various fixes & improvements for concurrent loading (#235) 2020-06-09 03:01:53 +03:00
model.h resources: remove some obsolete getter functions 2021-02-22 03:27:10 +02:00
postprocess.c renderer,gl33: fix texture management issues 2021-07-13 00:21:03 +03:00
postprocess.h Establish more-or-less consistent resource getter functions 2020-06-09 04:33:22 +03:00
resource.c Audio rewrite (#236) 2020-06-22 17:41:03 +03:00
resource.h Fix some issues found by clang static analysis 2021-06-18 16:11:00 +03:00
sfx.c Audio rewrite (#236) 2020-06-22 17:41:03 +03:00
sfx.h Audio rewrite (#236) 2020-06-22 17:41:03 +03:00
sfxbgm_common.c Audio rewrite (#236) 2020-06-22 17:41:03 +03:00
sfxbgm_common.h Audio rewrite (#236) 2020-06-22 17:41:03 +03:00
shader_object.c Remove dead code 2020-08-05 05:07:55 +03:00
shader_object.h Establish more-or-less consistent resource getter functions 2020-06-09 04:33:22 +03:00
shader_program.c Fix some issues found by clang static analysis 2021-06-18 16:11:00 +03:00
shader_program.h Establish more-or-less consistent resource getter functions 2020-06-09 04:33:22 +03:00
sprite.c fix spell toe, wriggle and kurumi spell bg 2021-01-31 21:32:49 +01:00
sprite.h Establish more-or-less consistent resource getter functions 2020-06-09 04:33:22 +03:00
texture.c Texturing overhaul: GPU compression, sRGB sampling, swizzles, etc. (#240) 2020-08-15 14:51:12 +03:00
texture.h Texturing overhaul: GPU compression, sRGB sampling, swizzles, etc. (#240) 2020-08-15 14:51:12 +03:00