Blender V5.3
gpencil_engine_private.hh File Reference
#include "BLI_bitmap.hh"
#include "BLI_memblock.hh"
#include "DNA_shader_fx_types.h"
#include "DRW_render.hh"
#include "BKE_grease_pencil.hh"
#include "GPU_batch.hh"
#include "draw_pass.hh"
#include "draw_view_data.hh"
#include "gpencil_defines.hh"
#include "gpencil_shader.hh"
#include "gpencil_shader_shared.hh"

Go to the source code of this file.

Classes

struct  blender::draw::gpencil::MaterialPool
struct  blender::draw::gpencil::LightPool
struct  blender::draw::gpencil::tVfx
struct  blender::draw::gpencil::tLayer
struct  blender::draw::gpencil::tObject
struct  blender::draw::gpencil::Instance
struct  blender::draw::gpencil::GPENCIL_Data

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::draw
namespace  blender::draw::gpencil

Macros

#define GP_LIGHT
#define GPENCIL_PIXEL_FACTOR   2000.0f
#define GPENCIL_VBO_BLOCK_SIZE   128
#define GP_MAX_MASKBITS   256
#define GPENCIL_SIMPLIFY(scene)
#define GPENCIL_SIMPLIFY_ONPLAY(playing)
#define GPENCIL_SIMPLIFY_FILL(scene, playing)
#define GPENCIL_SIMPLIFY_FX(scene, playing)
#define GPENCIL_SIMPLIFY_TINT(scene)
#define GPENCIL_SIMPLIFY_AA(scene)

Functions

struct GpencilBatchCache * blender::draw::gpencil::gpencil_batch_cache_get (struct Object *ob, int cfra)
Object
tObject * blender::draw::gpencil::gpencil_object_cache_add (Instance *inst, Object *ob, const bool is_stroke_order_3d, const Bounds< float3 > bounds)
void blender::draw::gpencil::gpencil_object_cache_sort (Instance *inst)
Layer
tLayer * blender::draw::gpencil::grease_pencil_layer_cache_get (tObject *tgp_ob, int layer_id, const bool skip_onion)
tLayer * blender::draw::gpencil::grease_pencil_layer_cache_add (Instance *inst, const Object *ob, const bke::greasepencil::Layer &layer, const int onion_id, const bool is_used_as_mask, tObject *tgp_ob)
Material
MaterialPool * blender::draw::gpencil::gpencil_material_pool_create (Instance *inst, Object *ob, int *ofs, const bool is_vertex_mode)
void blender::draw::gpencil::gpencil_material_resources_get (MaterialPool *first_pool, int mat_id, gpu::Texture **r_tex_stroke, gpu::Texture **r_tex_fill, gpu::UniformBuf **r_ubo_mat)
Lights
void blender::draw::gpencil::gpencil_light_ambient_add (LightPool *lightpool, const float color[3])
void blender::draw::gpencil::gpencil_light_pool_populate (LightPool *lightpool, Object *ob)
LightPool * blender::draw::gpencil::gpencil_light_pool_add (Instance *inst)
LightPool * blender::draw::gpencil::gpencil_light_pool_create (Instance *inst, Object *)

Macro Definition Documentation

◆ GP_LIGHT

#define GP_LIGHT

Definition at line 24 of file gpencil_engine_private.hh.

◆ GP_MAX_MASKBITS

#define GP_MAX_MASKBITS   256

◆ GPENCIL_PIXEL_FACTOR

#define GPENCIL_PIXEL_FACTOR   2000.0f

Definition at line 39 of file gpencil_engine_private.hh.

◆ GPENCIL_SIMPLIFY

#define GPENCIL_SIMPLIFY ( scene)
Value:
((scene->r.mode & R_SIMPLIFY) && (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_ENABLE))

Definition at line 46 of file gpencil_engine_private.hh.

◆ GPENCIL_SIMPLIFY_AA

#define GPENCIL_SIMPLIFY_AA ( scene)
Value:
(GPENCIL_SIMPLIFY(scene) && (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_AA))
#define GPENCIL_SIMPLIFY(scene)

Definition at line 59 of file gpencil_engine_private.hh.

Referenced by blender::draw::gpencil::Instance::begin_sync().

◆ GPENCIL_SIMPLIFY_FILL

#define GPENCIL_SIMPLIFY_FILL ( scene,
playing )
Value:
((GPENCIL_SIMPLIFY_ONPLAY(playing) && GPENCIL_SIMPLIFY(scene) && \
(scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_FILL)))
#define GPENCIL_SIMPLIFY_ONPLAY(playing)

Definition at line 51 of file gpencil_engine_private.hh.

Referenced by blender::draw::gpencil::Instance::begin_sync().

◆ GPENCIL_SIMPLIFY_FX

#define GPENCIL_SIMPLIFY_FX ( scene,
playing )
Value:
((GPENCIL_SIMPLIFY_ONPLAY(playing) && GPENCIL_SIMPLIFY(scene) && \
(scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_FX)))

Definition at line 54 of file gpencil_engine_private.hh.

Referenced by blender::draw::gpencil::Instance::begin_sync().

◆ GPENCIL_SIMPLIFY_ONPLAY

#define GPENCIL_SIMPLIFY_ONPLAY ( playing)
Value:
(((playing == true) && (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_ON_PLAY)) || \
((scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_ON_PLAY) == 0))

Definition at line 48 of file gpencil_engine_private.hh.

◆ GPENCIL_SIMPLIFY_TINT

#define GPENCIL_SIMPLIFY_TINT ( scene)
Value:
(GPENCIL_SIMPLIFY(scene) && (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_TINT))

Definition at line 57 of file gpencil_engine_private.hh.

◆ GPENCIL_VBO_BLOCK_SIZE

#define GPENCIL_VBO_BLOCK_SIZE   128

Definition at line 42 of file gpencil_engine_private.hh.