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:
authorCampbell Barton <ideasman42@gmail.com>2018-07-31 13:11:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-31 13:11:55 +0300
commitf06884b18ab5b619975689a0670f8f0f14f9c318 (patch)
treee0c0f557659f6b900019acd5c1f11e127619e539 /source/blender/draw/engines/gpencil
parentb2193e020bc0c1a9ef9969440ece453e49f8012c (diff)
Cleanup: style, duplicate includes
Diffstat (limited to 'source/blender/draw/engines/gpencil')
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_cache_utils.c5
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c72
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_draw_utils.c23
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.c98
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.h10
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_render.c19
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_shader_fx.c20
7 files changed, 141 insertions, 106 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
index 4e01c42d33d..e8bb27b2724 100644
--- a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
@@ -38,8 +38,9 @@
#include "draw_cache_impl.h"
/* add a gpencil object to cache to defer drawing */
-tGPencilObjectCache *gpencil_object_cache_add(tGPencilObjectCache *cache_array, Object *ob, bool is_temp,
- int *gp_cache_size, int *gp_cache_used)
+tGPencilObjectCache *gpencil_object_cache_add(
+ tGPencilObjectCache *cache_array, Object *ob, bool is_temp,
+ int *gp_cache_size, int *gp_cache_used)
{
const DRWContextState *draw_ctx = DRW_context_state_get();
tGPencilObjectCache *cache_elem = NULL;
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
index dd5db85f3f4..83a52e077ca 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
@@ -158,36 +158,42 @@ GPUBatch *DRW_gpencil_get_stroke_geom(bGPDframe *gpf, bGPDstroke *gps, short thi
/* first point for adjacency (not drawn) */
if (i == 0) {
if (gps->flag & GP_STROKE_CYCLIC && totpoints > 2) {
- gpencil_set_stroke_point(vbo, gpf->runtime.viewmatrix, &points[totpoints - 1], idx,
- pos_id, color_id, thickness_id, uvdata_id, thickness, ink);
+ gpencil_set_stroke_point(
+ vbo, gpf->runtime.viewmatrix, &points[totpoints - 1], idx,
+ pos_id, color_id, thickness_id, uvdata_id, thickness, ink);
idx++;
}
else {
- gpencil_set_stroke_point(vbo, gpf->runtime.viewmatrix, &points[1], idx,
- pos_id, color_id, thickness_id, uvdata_id, thickness, ink);
+ gpencil_set_stroke_point(
+ vbo, gpf->runtime.viewmatrix, &points[1], idx,
+ pos_id, color_id, thickness_id, uvdata_id, thickness, ink);
idx++;
}
}
/* set point */
- gpencil_set_stroke_point(vbo, gpf->runtime.viewmatrix, pt, idx,
- pos_id, color_id, thickness_id, uvdata_id, thickness, ink);
+ gpencil_set_stroke_point(
+ vbo, gpf->runtime.viewmatrix, pt, idx,
+ pos_id, color_id, thickness_id, uvdata_id, thickness, ink);
idx++;
}
if (gps->flag & GP_STROKE_CYCLIC && totpoints > 2) {
/* draw line to first point to complete the cycle */
- gpencil_set_stroke_point(vbo, gpf->runtime.viewmatrix, &points[0], idx,
- pos_id, color_id, thickness_id, uvdata_id, thickness, ink);
+ gpencil_set_stroke_point(
+ vbo, gpf->runtime.viewmatrix, &points[0], idx,
+ pos_id, color_id, thickness_id, uvdata_id, thickness, ink);
idx++;
/* now add adjacency point (not drawn) */
- gpencil_set_stroke_point(vbo, gpf->runtime.viewmatrix, &points[1], idx,
- pos_id, color_id, thickness_id, uvdata_id, thickness, ink);
+ gpencil_set_stroke_point(
+ vbo, gpf->runtime.viewmatrix, &points[1], idx,
+ pos_id, color_id, thickness_id, uvdata_id, thickness, ink);
idx++;
}
/* last adjacency point (not drawn) */
else {
- gpencil_set_stroke_point(vbo, gpf->runtime.viewmatrix, &points[totpoints - 2], idx,
- pos_id, color_id, thickness_id, uvdata_id, thickness, ink);
+ gpencil_set_stroke_point(
+ vbo, gpf->runtime.viewmatrix, &points[totpoints - 2], idx,
+ pos_id, color_id, thickness_id, uvdata_id, thickness, ink);
}
return GPU_batch_create_ex(GPU_PRIM_LINE_STRIP_ADJ, vbo, NULL, GPU_BATCH_OWNS_VBO);
@@ -237,30 +243,35 @@ GPUBatch *DRW_gpencil_get_buffer_stroke_geom(bGPdata *gpd, float matrix[4][4], s
if (i == 0) {
if (totpoints > 1) {
ED_gpencil_tpoint_to_point(ar, origin, &points[1], &pt2);
- gpencil_set_stroke_point(vbo, matrix, &pt2, idx,
- pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor);
+ gpencil_set_stroke_point(
+ vbo, matrix, &pt2, idx,
+ pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor);
}
else {
- gpencil_set_stroke_point(vbo, matrix, &pt, idx,
- pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor);
+ gpencil_set_stroke_point(
+ vbo, matrix, &pt, idx,
+ pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor);
}
idx++;
}
/* set point */
- gpencil_set_stroke_point(vbo, matrix, &pt, idx,
- pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor);
+ gpencil_set_stroke_point(
+ vbo, matrix, &pt, idx,
+ pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor);
idx++;
}
/* last adjacency point (not drawn) */
if (totpoints > 2) {
ED_gpencil_tpoint_to_point(ar, origin, &points[totpoints - 2], &pt2);
- gpencil_set_stroke_point(vbo, matrix, &pt2, idx,
- pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor);
+ gpencil_set_stroke_point(
+ vbo, matrix, &pt2, idx,
+ pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor);
}
else {
- gpencil_set_stroke_point(vbo, matrix, &pt, idx,
- pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor);
+ gpencil_set_stroke_point(
+ vbo, matrix, &pt, idx,
+ pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor);
}
return GPU_batch_create_ex(GPU_PRIM_LINE_STRIP_ADJ, vbo, NULL, GPU_BATCH_OWNS_VBO);
@@ -307,9 +318,10 @@ GPUBatch *DRW_gpencil_get_buffer_point_geom(bGPdata *gpd, float matrix[4][4], sh
ED_gp_project_point_to_plane(ob, rv3d, origin, ts->gp_sculpt.lock_axis - 1, &pt);
/* set point */
- gpencil_set_stroke_point(vbo, matrix, &pt, idx,
- pos_id, color_id, thickness_id, uvdata_id,
- thickness, gpd->runtime.scolor);
+ gpencil_set_stroke_point(
+ vbo, matrix, &pt, idx,
+ pos_id, color_id, thickness_id, uvdata_id,
+ thickness, gpd->runtime.scolor);
idx++;
}
@@ -600,9 +612,10 @@ GPUBatch *DRW_gpencil_get_edlin_geom(bGPDstroke *gps, float alpha, short UNUSED(
return GPU_batch_create_ex(GPU_PRIM_LINE_STRIP, vbo, NULL, GPU_BATCH_OWNS_VBO);
}
-static void set_grid_point(GPUVertBuf *vbo, int idx, float col_grid[4],
- uint pos_id, uint color_id,
- float v1, float v2, int axis)
+static void set_grid_point(
+ GPUVertBuf *vbo, int idx, float col_grid[4],
+ uint pos_id, uint color_id,
+ float v1, float v2, int axis)
{
GPU_vertbuf_attr_set(vbo, color_id, idx, col_grid);
@@ -618,8 +631,7 @@ static void set_grid_point(GPUVertBuf *vbo, int idx, float col_grid[4],
pos[1] = v2;
pos[2] = 0.0f;
}
- else
- {
+ else {
pos[0] = v1;
pos[1] = 0.0f;
pos[2] = v2;
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index 76cb1405a71..04399d1cad7 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -63,8 +63,9 @@
#define PATTERN 5
/* Helper for doing all the checks on whether a stroke can be drawn */
-static bool gpencil_can_draw_stroke(struct MaterialGPencilStyle *gp_style, const bGPDstroke *gps,
- const bool onion, const bool is_mat_preview)
+static bool gpencil_can_draw_stroke(
+ struct MaterialGPencilStyle *gp_style, const bGPDstroke *gps,
+ const bool onion, const bool is_mat_preview)
{
/* skip stroke if it doesn't have any valid data */
if ((gps->points == NULL) || (gps->totpoints < 1) || (gp_style == NULL))
@@ -77,8 +78,8 @@ static bool gpencil_can_draw_stroke(struct MaterialGPencilStyle *gp_style, const
/* check if the color is visible */
if ((gp_style == NULL) ||
- (gp_style->flag & GP_STYLE_COLOR_HIDE) ||
- (onion && (gp_style->flag & GP_STYLE_COLOR_ONIONSKIN)))
+ (gp_style->flag & GP_STYLE_COLOR_HIDE) ||
+ (onion && (gp_style->flag & GP_STYLE_COLOR_ONIONSKIN)))
{
return false;
}
@@ -656,8 +657,8 @@ static void gpencil_add_editpoints_shgroup(
}
if (cache->batch_edlin[cache->cache_idx]) {
if ((obact) && (obact == ob) &&
- ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
- (v3d->flag3 & V3D_GP_SHOW_EDIT_LINES))
+ ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
+ (v3d->flag3 & V3D_GP_SHOW_EDIT_LINES))
{
DRW_shgroup_call_add(
stl->g_data->shgrps_edit_line,
@@ -947,7 +948,7 @@ void DRW_gpencil_populate_buffer_strokes(GPENCIL_e_data *e_data, void *vedata, T
stl->storage->unit_matrix);
if ((gpd->runtime.sbuffer_size >= 3) && (gpd->runtime.sfill[3] > GPENCIL_ALPHA_OPACITY_THRESH) &&
- ((gpd->runtime.sbuffer_sflag & GP_STROKE_NOFILL) == 0))
+ ((gpd->runtime.sbuffer_sflag & GP_STROKE_NOFILL) == 0))
{
/* if not solid, fill is simulated with solid color */
if (gpd->runtime.bfill_style > 0) {
@@ -1229,12 +1230,12 @@ void DRW_gpencil_populate_datablock(GPENCIL_e_data *e_data, void *vedata, Scene
/* draw onion skins */
if ((gpd->flag & GP_DATA_SHOW_ONIONSKINS) &&
- (!no_onion) && (overlay) &&
- (gpl->onion_flag & GP_LAYER_ONIONSKIN) &&
- ((!playing) || (gpd->onion_flag & GP_ONION_GHOST_ALWAYS)))
+ (!no_onion) && (overlay) &&
+ (gpl->onion_flag & GP_LAYER_ONIONSKIN) &&
+ ((!playing) || (gpd->onion_flag & GP_ONION_GHOST_ALWAYS)))
{
if ((!stl->storage->is_render) ||
- ((stl->storage->is_render) && (gpd->onion_flag & GP_ONION_GHOST_ALWAYS)))
+ ((stl->storage->is_render) && (gpd->onion_flag & GP_ONION_GHOST_ALWAYS)))
{
gpencil_draw_onionskins(cache, e_data, vedata, ob, gpd, gpl, gpf);
}
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 71c99b2bcdf..d81cf8b7752 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -87,10 +87,11 @@ void DRW_gpencil_multisample_ensure(GPENCIL_Data *vedata, int rect_w, int rect_h
txl->multisample_depth = GPU_texture_create_2D_multisample(
rect_w, rect_h, GPU_DEPTH24_STENCIL8, NULL, samples, NULL);
}
- GPU_framebuffer_ensure_config(&fbl->multisample_fb, {
- GPU_ATTACHMENT_TEXTURE(txl->multisample_depth),
- GPU_ATTACHMENT_TEXTURE(txl->multisample_color)
- });
+ GPU_framebuffer_ensure_config(
+ &fbl->multisample_fb, {
+ GPU_ATTACHMENT_TEXTURE(txl->multisample_depth),
+ GPU_ATTACHMENT_TEXTURE(txl->multisample_color)
+ });
if (!GPU_framebuffer_check_valid(fbl->multisample_fb, NULL)) {
GPU_framebuffer_free(fbl->multisample_fb);
}
@@ -121,39 +122,49 @@ static void GPENCIL_create_framebuffers(void *vedata)
&draw_engine_gpencil_type);
e_data.temp_color_tx_a = DRW_texture_pool_query_2D(size[0], size[1], fb_format,
&draw_engine_gpencil_type);
- GPU_framebuffer_ensure_config(&fbl->temp_fb_a, {
- GPU_ATTACHMENT_TEXTURE(e_data.temp_depth_tx_a),
- GPU_ATTACHMENT_TEXTURE(e_data.temp_color_tx_a)
- });
-
- e_data.temp_depth_tx_b = DRW_texture_pool_query_2D(size[0], size[1], GPU_DEPTH24_STENCIL8,
- &draw_engine_gpencil_type);
- e_data.temp_color_tx_b = DRW_texture_pool_query_2D(size[0], size[1], fb_format,
- &draw_engine_gpencil_type);
- GPU_framebuffer_ensure_config(&fbl->temp_fb_b, {
- GPU_ATTACHMENT_TEXTURE(e_data.temp_depth_tx_b),
- GPU_ATTACHMENT_TEXTURE(e_data.temp_color_tx_b)
- });
+ GPU_framebuffer_ensure_config(
+ &fbl->temp_fb_a, {
+ GPU_ATTACHMENT_TEXTURE(e_data.temp_depth_tx_a),
+ GPU_ATTACHMENT_TEXTURE(e_data.temp_color_tx_a)
+ });
+
+ e_data.temp_depth_tx_b = DRW_texture_pool_query_2D(
+ size[0], size[1], GPU_DEPTH24_STENCIL8,
+ &draw_engine_gpencil_type);
+ e_data.temp_color_tx_b = DRW_texture_pool_query_2D(
+ size[0], size[1], fb_format,
+ &draw_engine_gpencil_type);
+ GPU_framebuffer_ensure_config(
+ &fbl->temp_fb_b, {
+ GPU_ATTACHMENT_TEXTURE(e_data.temp_depth_tx_b),
+ GPU_ATTACHMENT_TEXTURE(e_data.temp_color_tx_b)
+ });
/* used for rim FX effect */
- e_data.temp_depth_tx_rim = DRW_texture_pool_query_2D(size[0], size[1], GPU_DEPTH24_STENCIL8,
- &draw_engine_gpencil_type);
- e_data.temp_color_tx_rim = DRW_texture_pool_query_2D(size[0], size[1], fb_format,
- &draw_engine_gpencil_type);
- GPU_framebuffer_ensure_config(&fbl->temp_fb_rim, {
- GPU_ATTACHMENT_TEXTURE(e_data.temp_depth_tx_rim),
- GPU_ATTACHMENT_TEXTURE(e_data.temp_color_tx_rim),
- });
+ e_data.temp_depth_tx_rim = DRW_texture_pool_query_2D(
+ size[0], size[1], GPU_DEPTH24_STENCIL8,
+ &draw_engine_gpencil_type);
+ e_data.temp_color_tx_rim = DRW_texture_pool_query_2D(
+ size[0], size[1], fb_format,
+ &draw_engine_gpencil_type);
+ GPU_framebuffer_ensure_config(
+ &fbl->temp_fb_rim, {
+ GPU_ATTACHMENT_TEXTURE(e_data.temp_depth_tx_rim),
+ GPU_ATTACHMENT_TEXTURE(e_data.temp_color_tx_rim),
+ });
/* background framebuffer to speed up drawing process (always 16 bits) */
- e_data.background_depth_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_DEPTH24_STENCIL8,
- &draw_engine_gpencil_type);
- e_data.background_color_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_RGBA32F,
- &draw_engine_gpencil_type);
- GPU_framebuffer_ensure_config(&fbl->background_fb, {
- GPU_ATTACHMENT_TEXTURE(e_data.background_depth_tx),
- GPU_ATTACHMENT_TEXTURE(e_data.background_color_tx)
- });
+ e_data.background_depth_tx = DRW_texture_pool_query_2D(
+ size[0], size[1], GPU_DEPTH24_STENCIL8,
+ &draw_engine_gpencil_type);
+ e_data.background_color_tx = DRW_texture_pool_query_2D(
+ size[0], size[1], GPU_RGBA32F,
+ &draw_engine_gpencil_type);
+ GPU_framebuffer_ensure_config(
+ &fbl->background_fb, {
+ GPU_ATTACHMENT_TEXTURE(e_data.background_depth_tx),
+ GPU_ATTACHMENT_TEXTURE(e_data.background_color_tx)
+ });
}
}
@@ -358,7 +369,7 @@ void GPENCIL_cache_init(void *vedata)
(stl->storage->playing == 0))
{
if (((obact_gpd->runtime.sbuffer_sflag & GP_STROKE_ERASER) == 0) &&
- (obact_gpd->runtime.sbuffer_size > 1))
+ (obact_gpd->runtime.sbuffer_size > 1))
{
stl->g_data->session_flag = GP_DRW_PAINT_PAINTING;
}
@@ -485,8 +496,9 @@ void GPENCIL_cache_populate(void *vedata, Object *ob)
}
/* allocate memory for saving gp objects for drawing later */
- stl->g_data->gp_object_cache = gpencil_object_cache_add(stl->g_data->gp_object_cache, ob, false,
- &stl->g_data->gp_cache_size, &stl->g_data->gp_cache_used);
+ stl->g_data->gp_object_cache = gpencil_object_cache_add(
+ stl->g_data->gp_object_cache, ob, false,
+ &stl->g_data->gp_cache_size, &stl->g_data->gp_cache_used);
/* generate instances as separate cache objects for instance modifiers
* with the "Make as Objects" option enabled
@@ -500,9 +512,9 @@ void GPENCIL_cache_populate(void *vedata, Object *ob)
/* grid */
if ((v3d) &&
- ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
- (v3d->flag3 & V3D_GP_SHOW_GRID) &&
- (ob->type == OB_GPENCIL) && (ob == draw_ctx->obact))
+ ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
+ (v3d->flag3 & V3D_GP_SHOW_GRID) &&
+ (ob->type == OB_GPENCIL) && (ob == draw_ctx->obact))
{
stl->g_data->batch_grid = DRW_gpencil_get_grid();
DRW_shgroup_call_add(stl->g_data->shgrps_grid,
@@ -631,8 +643,8 @@ void GPENCIL_draw_scene(void *ved)
/* paper pass to display a confortable area to draw over complex scenes with geometry */
if ((!is_render) && (obact) && (obact->type == OB_GPENCIL)) {
if (((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
- (v3d->flag3 & V3D_GP_SHOW_PAPER) &&
- (stl->g_data->gp_cache_used > 0))
+ (v3d->flag3 & V3D_GP_SHOW_PAPER) &&
+ (stl->g_data->gp_cache_used > 0))
{
DRW_draw_pass(psl->paper_pass);
}
@@ -655,7 +667,7 @@ void GPENCIL_draw_scene(void *ved)
/* grid pass */
if ((!is_render) && (obact) && (obact->type == OB_GPENCIL)) {
if (((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
- (v3d->flag3 & V3D_GP_SHOW_GRID))
+ (v3d->flag3 & V3D_GP_SHOW_GRID))
{
DRW_draw_pass(psl->grid_pass);
}
@@ -744,7 +756,7 @@ void GPENCIL_draw_scene(void *ved)
/* grid pass */
if ((!is_render) && (obact) && (obact->type == OB_GPENCIL)) {
if (((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
- (v3d->flag3 & V3D_GP_SHOW_GRID))
+ (v3d->flag3 & V3D_GP_SHOW_GRID))
{
DRW_draw_pass(psl->grid_pass);
}
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.h b/source/blender/draw/engines/gpencil/gpencil_engine.h
index 24a627f1012..5d276490663 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.h
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.h
@@ -279,8 +279,9 @@ typedef struct GpencilBatchCache {
} GpencilBatchCache;
/* general drawing functions */
-struct DRWShadingGroup *DRW_gpencil_shgroup_stroke_create(struct GPENCIL_e_data *e_data, struct GPENCIL_Data *vedata, struct DRWPass *pass, struct GPUShader *shader,
- struct Object *ob, struct bGPdata *gpd, struct MaterialGPencilStyle *gp_style, int id, bool onion);
+struct DRWShadingGroup *DRW_gpencil_shgroup_stroke_create(
+ struct GPENCIL_e_data *e_data, struct GPENCIL_Data *vedata, struct DRWPass *pass, struct GPUShader *shader,
+ struct Object *ob, struct bGPdata *gpd, struct MaterialGPencilStyle *gp_style, int id, bool onion);
void DRW_gpencil_populate_datablock(struct GPENCIL_e_data *e_data, void *vedata, struct Scene *scene, struct Object *ob, struct bGPdata *gpd);
void DRW_gpencil_populate_buffer_strokes(struct GPENCIL_e_data *e_data, void *vedata, struct ToolSettings *ts, struct Object *ob);
void DRW_gpencil_populate_multiedit(struct GPENCIL_e_data *e_data, void *vedata, struct Scene *scene, struct Object *ob, struct bGPdata *gpd);
@@ -300,8 +301,9 @@ struct GPUBatch *DRW_gpencil_get_buffer_point_geom(struct bGPdata *gpd, float ma
struct GPUBatch *DRW_gpencil_get_grid(void);
/* object cache functions */
-struct tGPencilObjectCache *gpencil_object_cache_add(struct tGPencilObjectCache *cache_array, struct Object *ob,
- bool is_temp, int *gp_cache_size, int *gp_cache_used);
+struct tGPencilObjectCache *gpencil_object_cache_add(
+ struct tGPencilObjectCache *cache_array, struct Object *ob,
+ bool is_temp, int *gp_cache_size, int *gp_cache_used);
/* geometry batch cache functions */
void gpencil_batch_cache_check_free_slots(struct Object *ob);
diff --git a/source/blender/draw/engines/gpencil/gpencil_render.c b/source/blender/draw/engines/gpencil/gpencil_render.c
index d76ea56894f..0b90de88ec1 100644
--- a/source/blender/draw/engines/gpencil/gpencil_render.c
+++ b/source/blender/draw/engines/gpencil/gpencil_render.c
@@ -84,14 +84,17 @@ void GPENCIL_render_init(GPENCIL_Data *ved, RenderEngine *engine, struct Depsgra
DRW_gpencil_multisample_ensure(vedata, rect_w, rect_h);
}
- vedata->render_depth_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_DEPTH24_STENCIL8,
- &draw_engine_gpencil_type);
- vedata->render_color_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_RGBA32F,
- &draw_engine_gpencil_type);
- GPU_framebuffer_ensure_config(&fbl->main, {
- GPU_ATTACHMENT_TEXTURE(vedata->render_depth_tx),
- GPU_ATTACHMENT_TEXTURE(vedata->render_color_tx)
- });
+ vedata->render_depth_tx = DRW_texture_pool_query_2D(
+ size[0], size[1], GPU_DEPTH24_STENCIL8,
+ &draw_engine_gpencil_type);
+ vedata->render_color_tx = DRW_texture_pool_query_2D(
+ size[0], size[1], GPU_RGBA32F,
+ &draw_engine_gpencil_type);
+ GPU_framebuffer_ensure_config(
+ &fbl->main, {
+ GPU_ATTACHMENT_TEXTURE(vedata->render_depth_tx),
+ GPU_ATTACHMENT_TEXTURE(vedata->render_color_tx)
+ });
/* Alloc transient data. */
if (!stl->g_data) {
diff --git a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
index e453224020d..827f2e9344b 100644
--- a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
+++ b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
@@ -211,8 +211,9 @@ static void DRW_gpencil_fx_blur(
struct GPUBatch *fxquad = DRW_cache_fullscreen_quad_get();
- fx_shgrp = DRW_shgroup_create(e_data->gpencil_fx_blur_sh,
- psl->fx_shader_pass_blend);
+ fx_shgrp = DRW_shgroup_create(
+ e_data->gpencil_fx_blur_sh,
+ psl->fx_shader_pass_blend);
DRW_shgroup_call_add(fx_shgrp, fxquad, NULL);
DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeColor", &e_data->temp_color_tx_a);
DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeDepth", &e_data->temp_depth_tx_a);
@@ -389,8 +390,9 @@ static void DRW_gpencil_fx_rim(
struct GPUBatch *fxquad = DRW_cache_fullscreen_quad_get();
/* prepare pass */
- fx_shgrp = DRW_shgroup_create(e_data->gpencil_fx_rim_prepare_sh,
- psl->fx_shader_pass_blend);
+ fx_shgrp = DRW_shgroup_create(
+ e_data->gpencil_fx_rim_prepare_sh,
+ psl->fx_shader_pass_blend);
DRW_shgroup_call_add(fx_shgrp, fxquad, NULL);
DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeColor", &e_data->temp_color_tx_a);
DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeDepth", &e_data->temp_depth_tx_a);
@@ -408,8 +410,9 @@ static void DRW_gpencil_fx_rim(
fxd->runtime.fx_sh = fx_shgrp;
/* blur pass */
- fx_shgrp = DRW_shgroup_create(e_data->gpencil_fx_blur_sh,
- psl->fx_shader_pass_blend);
+ fx_shgrp = DRW_shgroup_create(
+ e_data->gpencil_fx_blur_sh,
+ psl->fx_shader_pass_blend);
DRW_shgroup_call_add(fx_shgrp, fxquad, NULL);
DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeColor", &e_data->temp_color_tx_rim);
DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeDepth", &e_data->temp_depth_tx_rim);
@@ -423,8 +426,9 @@ static void DRW_gpencil_fx_rim(
fxd->runtime.fx_sh_b = fx_shgrp;
/* resolve pass */
- fx_shgrp = DRW_shgroup_create(e_data->gpencil_fx_rim_resolve_sh,
- psl->fx_shader_pass_blend);
+ fx_shgrp = DRW_shgroup_create(
+ e_data->gpencil_fx_rim_resolve_sh,
+ psl->fx_shader_pass_blend);
DRW_shgroup_call_add(fx_shgrp, fxquad, NULL);
DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeColor", &e_data->temp_color_tx_a);
DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeDepth", &e_data->temp_depth_tx_a);