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:
Diffstat (limited to 'source/blender/draw/engines/gpencil/gpencil_engine.c')
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 015e631dc14..368530fde05 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -42,7 +42,7 @@
#include "DNA_view3d_types.h"
#include "GPU_texture.h"
-#include "GPU_uniformbuffer.h"
+#include "GPU_uniform_buffer.h"
#include "gpencil_engine.h"
@@ -345,8 +345,8 @@ typedef struct gpIterPopulateData {
GPENCIL_MaterialPool *matpool;
DRWShadingGroup *grp;
/* Last material UBO bound. Used to avoid uneeded buffer binding. */
- GPUUniformBuffer *ubo_mat;
- GPUUniformBuffer *ubo_lights;
+ GPUUniformBuf *ubo_mat;
+ GPUUniformBuf *ubo_lights;
/* Last texture bound. */
GPUTexture *tex_fill;
GPUTexture *tex_stroke;
@@ -487,9 +487,10 @@ static void gpencil_stroke_cache_populate(bGPDlayer *gpl,
MaterialGPencilStyle *gp_style = BKE_gpencil_material_settings(iter->ob, gps->mat_nr + 1);
+ const bool is_render = iter->pd->is_render;
bool hide_material = (gp_style->flag & GP_MATERIAL_HIDE) != 0;
bool show_stroke = ((gp_style->flag & GP_MATERIAL_STROKE_SHOW) != 0) ||
- ((gps->flag & GP_STROKE_NOFILL) != 0);
+ (!is_render && ((gps->flag & GP_STROKE_NOFILL) != 0));
bool show_fill = (gps->tot_triangles > 0) && ((gp_style->flag & GP_MATERIAL_FILL_SHOW) != 0) &&
(!iter->pd->simplify_fill) && ((gps->flag & GP_STROKE_NOFILL) == 0);
@@ -501,7 +502,7 @@ static void gpencil_stroke_cache_populate(bGPDlayer *gpl,
return;
}
- GPUUniformBuffer *ubo_mat;
+ GPUUniformBuf *ubo_mat;
GPUTexture *tex_stroke, *tex_fill;
gpencil_material_resources_get(
iter->matpool, iter->mat_ofs + gps->mat_nr, &tex_stroke, &tex_fill, &ubo_mat);
@@ -654,13 +655,13 @@ void GPENCIL_cache_finish(void *ved)
BLI_memblock_iternew(pd->gp_material_pool, &iter);
GPENCIL_MaterialPool *pool;
while ((pool = (GPENCIL_MaterialPool *)BLI_memblock_iterstep(&iter))) {
- GPU_uniformbuffer_update(pool->ubo, pool->mat_data);
+ GPU_uniformbuf_update(pool->ubo, pool->mat_data);
}
BLI_memblock_iternew(pd->gp_light_pool, &iter);
GPENCIL_LightPool *lpool;
while ((lpool = (GPENCIL_LightPool *)BLI_memblock_iterstep(&iter))) {
- GPU_uniformbuffer_update(lpool->ubo, lpool->light_data);
+ GPU_uniformbuf_update(lpool->ubo, lpool->light_data);
}
/* Sort object by decreasing Z to avoid most of alpha ordering issues. */