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:
authorJeroen Bakker <jeroen@blender.org>2020-10-26 17:54:00 +0300
committerJeroen Bakker <jeroen@blender.org>2020-11-17 15:10:39 +0300
commit1e1c39fc89395c5e5a68a7a21500195cd8dc6fd5 (patch)
treea9b6d8e5cceb6a5bffb7d000499449be51fabed2 /source/blender/draw/engines/overlay/overlay_private.h
parent8b6ce77f163cf0822af8a107a213e984ba4b3e97 (diff)
Fix T82064: Add Image Clone tool to overlay engine
The clone tool in the image editor can show a second texture on top of the image. This wasn't ported and now results into alpha and depth issues. This fix adds the clone tool drawing to the overlay engine. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D9352
Diffstat (limited to 'source/blender/draw/engines/overlay/overlay_private.h')
-rw-r--r--source/blender/draw/engines/overlay/overlay_private.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_private.h b/source/blender/draw/engines/overlay/overlay_private.h
index d5ba0a5423f..7e6809cb4b1 100644
--- a/source/blender/draw/engines/overlay/overlay_private.h
+++ b/source/blender/draw/engines/overlay/overlay_private.h
@@ -37,6 +37,9 @@ extern "C" {
/* Needed for eSpaceImage_UVDT_Stretch */
#include "DNA_space_types.h"
+/* Forward declarations */
+struct ImBuf;
+
typedef struct OVERLAY_FramebufferList {
struct GPUFrameBuffer *overlay_default_fb;
struct GPUFrameBuffer *overlay_line_fb;
@@ -94,6 +97,7 @@ typedef struct OVERLAY_PassList {
DRWPass *edit_uv_faces_ps;
DRWPass *edit_uv_stretching_ps;
DRWPass *edit_uv_tiled_image_borders_ps;
+ DRWPass *edit_uv_stencil_ps;
DRWPass *extra_ps[2];
DRWPass *extra_blend_ps;
DRWPass *extra_centers_ps;
@@ -359,6 +363,7 @@ typedef struct OVERLAY_PrivateData {
bool do_uv_stretching_overlay;
bool do_tiled_image_overlay;
bool do_tiled_image_border_overlay;
+ bool do_stencil_overlay;
bool do_faces;
bool do_face_dots;
@@ -376,6 +381,10 @@ typedef struct OVERLAY_PrivateData {
float total_area_ratio;
float total_area_ratio_inv;
+ /* stencil overlay */
+ struct Image *stencil_image;
+ struct ImBuf *stencil_ibuf;
+ void * stencil_lock;
} edit_uv;
struct {
bool transparent;
@@ -676,6 +685,7 @@ GPUShader *OVERLAY_shader_edit_uv_verts_get(void);
GPUShader *OVERLAY_shader_edit_uv_stretching_area_get(void);
GPUShader *OVERLAY_shader_edit_uv_stretching_angle_get(void);
GPUShader *OVERLAY_shader_edit_uv_tiled_image_borders_get(void);
+GPUShader *OVERLAY_shader_edit_uv_stencil_image(void);
GPUShader *OVERLAY_shader_extra(bool is_select);
GPUShader *OVERLAY_shader_extra_groundline(void);
GPUShader *OVERLAY_shader_extra_wire(bool use_object, bool is_select);