Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-03-24 22:27:39 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-03-25 21:06:11 +0300
commitb1c025d1e8dd3a26e66740eab102814da76c06bf (patch)
tree57a11ca3d0b86650c897571014b67b70e66a3e10 /source/blender/draw/intern/draw_manager_texture.c
parent879eabedda2790fd39d0e2f66184bceb6e0dbf4b (diff)
GPUTexture: Small refactor.
This includes a few modification: - The biggest one is call glActiveTexture before doing any call to glBindTexture for rendering purpose (uniform value depends on it). This is also better to know what's going on when rendering UI. So if there is missing UI elements because of this commit look for this first. This allows us to have "less calls" to glActiveTexture (I did not measure the final count) and less checks inside GPU_texture. - Remove use of GL_TEXTURE0 as a uniform value in a few places. - Be more strict and use BLI_assert for bad usage of GPU_texture functions. - Disable filtering for integer and stencil textures (not supported by OGL specs). - Replace bools inside GPUTexture by a bitflag supporting more options to identify texture types.
Diffstat (limited to 'source/blender/draw/intern/draw_manager_texture.c')
-rw-r--r--source/blender/draw/intern/draw_manager_texture.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_manager_texture.c b/source/blender/draw/intern/draw_manager_texture.c
index f3b4af7df1b..3a258954dbd 100644
--- a/source/blender/draw/intern/draw_manager_texture.c
+++ b/source/blender/draw/intern/draw_manager_texture.c
@@ -120,7 +120,7 @@ void drw_texture_set_parameters(GPUTexture *tex, DRWTextureFlag flags)
GPU_texture_bind(tex, 0);
if (flags & DRW_TEX_MIPMAP) {
GPU_texture_mipmap_mode(tex, true, flags & DRW_TEX_FILTER);
- DRW_texture_generate_mipmaps(tex);
+ GPU_texture_generate_mipmap(tex);
}
else {
GPU_texture_filter_mode(tex, flags & DRW_TEX_FILTER);