21 double current_time_ = 0.0;
23 bool enabled_ =
false;
26 bool any_animated_ =
false;
46 state.clipping_plane_count);
50 any_animated_ =
false;
66 const float time = current_time_ - ob_ref.
object->
runtime->overlay_mode_transfer_start_time;
67 const float alpha = alpha_from_time_get(time);
76 if (use_sculpt_pbvh) {
100 manager.
submit(ps_, view);
109 static constexpr float flash_length = 0.55f;
110 static constexpr float flash_alpha = 0.25f;
112 static float alpha_from_time_get(
const float anim_time)
114 if (anim_time > flash_length) {
117 if (anim_time < 0.0f) {
120 return (1.0f - (anim_time / flash_length)) * flash_alpha;
bool BKE_sculptsession_use_pbvh_draw(const Object *ob, const RegionView3D *rv3d)
MINLINE void srgb_to_linearrgb_v4(float linear[4], const float srgb[4])
double BLI_time_now_seconds(void)
void GPU_framebuffer_bind(GPUFrameBuffer *framebuffer)
void UI_GetThemeColor3fv(int colorid, float col[3])
ResourceHandle unique_handle(const ObjectRef &ref)
ResourceHandle resource_handle_for_sculpt(const ObjectRef &ref)
void submit(PassSimple &pass, View &view)
void draw(gpu::Batch *batch, uint instance_len=-1, uint vertex_len=-1, uint vertex_first=-1, ResourceHandle handle={0}, uint custom_id=0)
void state_set(DRWState state, int clip_plane_count=0)
void bind_ubo(const char *name, GPUUniformBuf *buffer)
void push_constant(const char *name, const float &data)
void shader_set(GPUShader *shader)
void object_sync(Manager &manager, const ObjectRef &ob_ref, const State &state)
void draw(Framebuffer &framebuffer, Manager &manager, View &view)
void begin_sync(Resources &res, const State &state)
blender::gpu::Batch * DRW_cache_object_surface_get(Object *ob)
bool DRW_object_is_renderable(const Object *ob)
bool DRW_state_is_image_render()
void DRW_viewport_request_redraw()
@ DRW_STATE_DEPTH_LESS_EQUAL
Vector< SculptBatch > sculpt_batches_get(const Object *ob, SculptBatchFeature features)
VecBase< float, 4 > float4
ObjectRuntimeHandle * runtime
VecBase< T, 3 > xyz() const
GPUUniformBuf * globals_buf
const SelectionType selection_type