[Bf-blender-cvs] [e9f21519feb] greasepencil-object: Fix building & linking on Linux
Campbell Barton
noreply at git.blender.org
Tue Jul 10 08:05:12 CEST 2018
Commit: e9f21519feb2747df6008698af6fdd47ea2beec0
Author: Campbell Barton
Date: Tue Jul 10 08:04:47 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rBe9f21519feb2747df6008698af6fdd47ea2beec0
Fix building & linking on Linux
===================================================================
M build_files/cmake/macros.cmake
M source/blender/draw/engines/gpencil/gpencil_draw_utils.c
M source/blender/draw/engines/gpencil/gpencil_shader_fx.c
M source/blender/editors/gpencil/annotate_draw.c
M source/blender/editors/gpencil/gpencil_data.c
M source/blender/editors/gpencil/gpencil_fill.c
M source/blender/editors/object/object_shader_fx.c
M source/blender/editors/space_view3d/view3d_manipulator_ruler.c
M source/blender/editors/space_view3d/view3d_ruler.c
M source/blender/makesrna/intern/rna_space.c
===================================================================
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 3c2c1137c03..25ef1ec42e7 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -627,13 +627,13 @@ function(SETUP_BLENDER_SORTED_LIBS)
bf_ikplugin
bf_modifiers
bf_gpencil_modifiers
- bf_shader_fx
bf_alembic
bf_bmesh
bf_gpu
bf_draw
bf_blenloader
bf_blenkernel
+ bf_shader_fx
bf_gpencil_modifiers
bf_physics
bf_nodes
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index 48c4667fb47..3e3374bf9c4 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -626,8 +626,8 @@ static void gpencil_add_stroke_shgroup(GpencilBatchCache *cache, DRWShadingGroup
/* add edit points shading group to pass */
static void gpencil_add_editpoints_shgroup(
- GPENCIL_StorageList *stl, GpencilBatchCache *cache, ToolSettings *ts, Object *ob,
- bGPdata *gpd, bGPDlayer *gpl, bGPDframe *gpf, bGPDstroke *gps)
+ GPENCIL_StorageList *stl, GpencilBatchCache *cache, ToolSettings *UNUSED(ts), Object *ob,
+ bGPdata *gpd, bGPDlayer *gpl, bGPDframe *gpf, bGPDstroke *gps)
{
const DRWContextState *draw_ctx = DRW_context_state_get();
View3D *v3d = draw_ctx->v3d;
diff --git a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
index 7cbe4835024..223454d44b6 100644
--- a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
+++ b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
@@ -146,7 +146,7 @@ static void GPENCIL_dof_nearfar(Object *camera, float coc, float nearfar[2])
*/
static void DRW_gpencil_fx_blur(
ShaderFxData *fx, int ob_idx, GPENCIL_e_data *e_data,
- GPENCIL_Data *vedata, tGPencilObjectCache *cache)
+ GPENCIL_Data *vedata, tGPencilObjectCache *cache)
{
if (fx == NULL) {
return;
@@ -179,7 +179,7 @@ static void DRW_gpencil_fx_blur(
else {
camera = stl->storage->camera;
}
-
+
if (camera) {
float nearfar[2];
GPENCIL_dof_nearfar(camera, fxd->coc, nearfar);
@@ -228,7 +228,7 @@ static void DRW_gpencil_fx_blur(
/* Colorize FX */
static void DRW_gpencil_fx_colorize(
- ShaderFxData *fx, GPENCIL_e_data *e_data, GPENCIL_Data *vedata)
+ ShaderFxData *fx, GPENCIL_e_data *e_data, GPENCIL_Data *vedata)
{
if (fx == NULL) {
return;
@@ -252,7 +252,7 @@ static void DRW_gpencil_fx_colorize(
/* Flip FX */
static void DRW_gpencil_fx_flip(
- ShaderFxData *fx, GPENCIL_e_data *e_data, GPENCIL_Data *vedata)
+ ShaderFxData *fx, GPENCIL_e_data *e_data, GPENCIL_Data *vedata)
{
if (fx == NULL) {
return;
@@ -284,8 +284,8 @@ static void DRW_gpencil_fx_flip(
/* Light FX */
static void DRW_gpencil_fx_light(
- ShaderFxData *fx, GPENCIL_e_data *e_data, GPENCIL_Data *vedata,
- tGPencilObjectCache *cache)
+ ShaderFxData *fx, GPENCIL_e_data *e_data, GPENCIL_Data *vedata,
+ tGPencilObjectCache *cache)
{
if (fx == NULL) {
return;
@@ -367,14 +367,14 @@ static void DRW_gpencil_fx_pixel(
DRW_shgroup_uniform_float(fx_shgrp, "pixsize", stl->storage->pixsize, 1);
DRW_shgroup_uniform_float(fx_shgrp, "pixelsize", &U.pixelsize, 1);
DRW_shgroup_uniform_float(fx_shgrp, "pixfactor", &gpd->pixfactor, 1);
-
+
fxd->runtime.fx_sh = fx_shgrp;
}
/* Rim FX */
static void DRW_gpencil_fx_rim(
- ShaderFxData *fx, GPENCIL_e_data *e_data, GPENCIL_Data *vedata,
- tGPencilObjectCache *cache)
+ ShaderFxData *fx, GPENCIL_e_data *e_data, GPENCIL_Data *vedata,
+ tGPencilObjectCache *cache)
{
if (fx == NULL) {
return;
@@ -479,7 +479,7 @@ static void DRW_gpencil_fx_swirl(
/* Wave Distorsion FX */
static void DRW_gpencil_fx_wave(
- ShaderFxData *fx, GPENCIL_e_data *e_data, GPENCIL_Data *vedata)
+ ShaderFxData *fx, GPENCIL_e_data *e_data, GPENCIL_Data *vedata)
{
if (fx == NULL) {
return;
@@ -563,12 +563,14 @@ void GPENCIL_delete_fx_shaders(GPENCIL_e_data *e_data)
/* create all passes used by FX */
void GPENCIL_create_fx_passes(GPENCIL_PassList *psl)
{
- psl->fx_shader_pass = DRW_pass_create("GPencil Shader FX Pass",
- DRW_STATE_WRITE_COLOR |
- DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS);
- psl->fx_shader_pass_blend = DRW_pass_create("GPencil Shader FX Pass",
- DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND |
- DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS);
+ psl->fx_shader_pass = DRW_pass_create(
+ "GPencil Shader FX Pass",
+ DRW_STATE_WRITE_COLOR |
+ DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS);
+ psl->fx_shader_pass_blend = DRW_pass_create(
+ "GPencil Shader FX Pass",
+ DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND |
+ DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS);
}
@@ -621,10 +623,11 @@ void DRW_gpencil_fx_prepare(
}
/* helper to draw one FX pass and do ping-pong copy */
-static void gpencil_draw_fx_pass(GPENCIL_e_data *e_data,
- GPENCIL_PassList *psl,
- GPENCIL_FramebufferList *fbl,
- DRWShadingGroup *shgrp, bool blend)
+static void gpencil_draw_fx_pass(
+ GPENCIL_e_data *e_data,
+ GPENCIL_PassList *psl,
+ GPENCIL_FramebufferList *fbl,
+ DRWShadingGroup *shgrp, bool blend)
{
if (shgrp == NULL) {
return;
@@ -654,9 +657,10 @@ static void gpencil_draw_fx_pass(GPENCIL_e_data *e_data,
}
/* helper to manage gaussian blur passes */
-static void draw_gpencil_blur_passes(struct GPENCIL_e_data *e_data,
- struct GPENCIL_Data *vedata,
- struct BlurShaderFxData *fxd)
+static void draw_gpencil_blur_passes(
+ struct GPENCIL_e_data *e_data,
+ struct GPENCIL_Data *vedata,
+ struct BlurShaderFxData *fxd)
{
if (fxd->runtime.fx_sh == NULL) {
return;
@@ -693,9 +697,10 @@ static void draw_gpencil_blur_passes(struct GPENCIL_e_data *e_data,
}
}
-static void draw_gpencil_rim_blur(struct GPENCIL_e_data *e_data,
- struct GPENCIL_Data *vedata,
- struct RimShaderFxData *fxd)
+static void draw_gpencil_rim_blur(
+ struct GPENCIL_e_data *UNUSED(e_data),
+ struct GPENCIL_Data *vedata,
+ struct RimShaderFxData *fxd)
{
GPENCIL_PassList *psl = ((GPENCIL_Data *)vedata)->psl;
GPENCIL_FramebufferList *fbl = ((GPENCIL_Data *)vedata)->fbl;
@@ -713,9 +718,10 @@ static void draw_gpencil_rim_blur(struct GPENCIL_e_data *e_data,
}
/* helper to draw RIM passes */
-static void draw_gpencil_rim_passes(struct GPENCIL_e_data *e_data,
- struct GPENCIL_Data *vedata,
- struct RimShaderFxData *fxd)
+static void draw_gpencil_rim_passes(
+ struct GPENCIL_e_data *e_data,
+ struct GPENCIL_Data *vedata,
+ struct RimShaderFxData *fxd)
{
if (fxd->runtime.fx_sh_b == NULL) {
return;
@@ -731,8 +737,9 @@ static void draw_gpencil_rim_passes(struct GPENCIL_e_data *e_data,
/* prepare mask */
GPU_framebuffer_bind(fbl->temp_fb_rim);
GPU_framebuffer_clear_color_depth(fbl->temp_fb_rim, clearcol, 1.0f);
- DRW_draw_pass_subset(psl->fx_shader_pass_blend,
- fxd->runtime.fx_sh, fxd->runtime.fx_sh);
+ DRW_draw_pass_subset(
+ psl->fx_shader_pass_blend,
+ fxd->runtime.fx_sh, fxd->runtime.fx_sh);
/* blur rim */
e_data->input_depth_tx = e_data->temp_depth_tx_b;
@@ -758,8 +765,9 @@ static void draw_gpencil_rim_passes(struct GPENCIL_e_data *e_data,
/* resolve */
GPU_framebuffer_bind(fbl->temp_fb_b);
GPU_framebuffer_clear_color_depth(fbl->temp_fb_b, clearcol, 1.0f);
- DRW_draw_pass_subset(psl->fx_shader_pass_blend,
- fxd->runtime.fx_sh_c, fxd->runtime.fx_sh_c);
+ DRW_draw_pass_subset(
+ psl->fx_shader_pass_blend,
+ fxd->runtime.fx_sh_c, fxd->runtime.fx_sh_c);
/* copy pass from b to a for ping-pong frame buffers */
e_data->input_depth_tx = e_data->temp_depth_tx_b;
@@ -771,8 +779,9 @@ static void draw_gpencil_rim_passes(struct GPENCIL_e_data *e_data,
}
/* apply all object fx effects */
-void DRW_gpencil_fx_draw(struct GPENCIL_e_data *e_data,
- struct GPENCIL_Data *vedata, struct tGPencilObjectCache *cache)
+void DRW_gpencil_fx_draw(
+ struct GPENCIL_e_data *e_data,
+ struct GPENCIL_Data *vedata, struct tGPencilObjectCache *cache)
{
GPENCIL_StorageList *stl = ((GPENCIL_Data *)vedata)->stl;
GPENCIL_PassList *psl = ((GPENCIL_Data *)vedata)->psl;
diff --git a/source/blender/editors/gpencil/annotate_draw.c b/source/blender/editors/gpencil/annotate_draw.c
index c128ae364f7..32d37d6c834 100644
--- a/source/blender/editors/gpencil/annotate_draw.c
+++ b/source/blender/editors/gpencil/annotate_draw.c
@@ -96,21 +96,23 @@ typedef enum eDrawStrokeFlags {
/* ----- Tool Buffer Drawing ------ */
/* helper functions to set color of buffer point */
// XXX: Remove these
-static void gp_set_tpoint_varying_color(const tGPspoint *pt, const float ink[4], uint attrib_id)
+static void UNUSED_FUNCTION(gp_set_tpoint_varying_color)(
+ const tGPspoint *UNUSED(pt), const float ink[4], uint attrib_id)
{
float alpha = ink[3];
CLAMP(alpha, GPENCIL_STRENGTH_MIN, 1.0f);
immAttrib4ub(attrib_id, F2UB(ink[0]), F2UB(ink[1]), F2UB(ink[2]), F2UB(alpha));
}
-static void gp_set_point_uniform_color(const bGPDspoint *pt, const float ink[4])
+static void UNUSED_FUNCTION(gp_set_point_uniform_color)(
+ const bGPDspoint *UNUSED(pt), const float ink[4])
{
float alpha = ink[3];
CLAMP(alpha, GPENCIL_STRENGTH_MIN, 1.0f);
immUniformColor3fvAlpha(ink, alpha);
}
-static void gp_set_point_varying_color(const bGPDspoint *pt, const float ink[4], uint attrib_id)
+static void gp_set_point_varying_color(const bGPDspoint *UNUSED(pt), const float ink[4], uint attrib_id)
{
float alpha = ink[3];
CLAMP(alpha, GPENCIL_STRENGTH_MIN, 1.0f);
@@ -562,7 +564,7 @@ static bool gp_can_draw_stroke(const bGPDstroke *gps, const int dflag)
/* draw a set of strokes */
static void gp_draw_strokes(
- bGPdata *gpd, bGPDlayer *gpl, const bGPDframe *gpf, int offsx, int offsy, int winx, int winy,
+ bGPdata *UNUSED(gpd), bGPDlayer *UNUSED(gpl), const bGPDframe *gpf, int offsx, int offsy, int winx, int winy,
int dflag, bool debug, short lthick
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list