diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-05 18:31:53 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-05 18:49:14 +0300 |
commit | 31c77a14af7cac2bc52ecaffde1bae9775dc47ae (patch) | |
tree | 08f6704e927bd7cb1d7ca2b6f30ee3b941d2ffff /source/blender/editors/interface/interface_icons.c | |
parent | c766d9b9dc5661693a58e01a3637f15197c2fe59 (diff) |
GPUTexture: Add support for samplers
This just add back the support.
This commit also includes a bit of cleanup.
# Conflicts:
# source/blender/gpu/GPU_texture.h
Diffstat (limited to 'source/blender/editors/interface/interface_icons.c')
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index af9ef2e7b3d..70061427c33 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -1566,8 +1566,7 @@ static void icon_draw_cache_texture_flush_ex(GPUTexture *texture, const int img_binding = GPU_shader_get_texture_binding(shader, "image"); const int data_loc = GPU_shader_get_uniform(shader, "calls_data"); - GPU_texture_bind(texture, img_binding); - GPU_sampler_icon_bind(img_binding); + GPU_texture_bind_ex(texture, GPU_SAMPLER_ICON, img_binding, false); GPU_shader_uniform_vector( shader, data_loc, 4, ICON_DRAW_CACHE_SIZE * 3, (float *)texture_draw_calls->drawcall_cache); @@ -1718,8 +1717,7 @@ static void icon_draw_texture(float x, GPU_shader_uniform_vector(shader, rect_tex_loc, 4, 1, (float[4]){x1, y1, x2, y2}); GPU_shader_uniform_vector(shader, rect_geom_loc, 4, 1, (float[4]){x, y, x + w, y + h}); - GPU_texture_bind(texture, img_binding); - GPU_sampler_icon_bind(img_binding); + GPU_texture_bind_ex(texture, GPU_SAMPLER_ICON, img_binding, false); GPUBatch *quad = GPU_batch_preset_quad(); GPU_batch_set_shader(quad, shader); |