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>2020-09-02 01:27:41 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-05 18:49:14 +0300
commitf72c1c4547e5fab769c22652d9872192029ad7fe (patch)
tree4b89ee42810e0505ed386b76bf5f76f5d4107a1c /source/blender/editors/sculpt_paint
parentc598e939ad25dfc3b4eb1c92b16de401bde0d88a (diff)
GPUTexture: Remove bind to edit calls
This is going to be unecessary after the GPU opengl texture backend refactor. For now add a save/restore mechanism to leave the state untouched. Also remove some calls where the caller would bind to particular binding point and set the shader uniform.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index ee514fa745c..0486fc9fe0f 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -352,9 +352,7 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima
size, size, 0, 2, buffer, format, GPU_DATA_UNSIGNED_BYTE, 0, false, NULL);
if (!col) {
- GPU_texture_bind(target->overlay_texture, 0);
GPU_texture_swizzle_set(target->overlay_texture, "rrrr");
- GPU_texture_unbind(target->overlay_texture);
}
}
@@ -471,9 +469,7 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom)
cursor_snap.overlay_texture = GPU_texture_create_nD(
size, size, 0, 2, buffer, GPU_R8, GPU_DATA_UNSIGNED_BYTE, 0, false, NULL);
- GPU_texture_bind(cursor_snap.overlay_texture, 0);
GPU_texture_swizzle_set(cursor_snap.overlay_texture, "rrrr");
- GPU_texture_unbind(cursor_snap.overlay_texture);
}
if (init) {