37 auto create_sub_pass = [&](
const char *
name,
gpu::Shader *shader,
bool add_weight_tex) {
48 state.clipping_plane_count);
52 edit_lattice_wire_ps_ = create_sub_pass(
53 "edit_lattice_wire", res.shaders->lattice_wire.get(),
true);
54 edit_lattice_point_ps_ = create_sub_pass(
55 "edit_lattice_points", res.shaders->lattice_points.get(),
false);
56 lattice_ps_ = create_sub_pass(
"lattice", res.shaders->extra_wire_object.get(),
false);
71 edit_lattice_wire_ps_->draw(geom, res_handle, res.select_id(ob_ref).get());
75 edit_lattice_point_ps_->draw(geom, res_handle, res.select_id(ob_ref).get());
95 float4x4 draw_mat(ob_ref.object->object_to_world().ptr());
99 draw_mat[3][3] = 0.0f ;
101 ob_ref, &draw_mat,
nullptr,
nullptr);
102 lattice_ps_->draw(geom, res_handle, res.select_id(ob_ref).get());
112 manager.generate_commands(ps_,
view);
122 manager.submit_only(ps_,
view);
void GPU_framebuffer_bind(blender::gpu::FrameBuffer *fb)
void shader_set(gpu::Shader *shader)
void bind_texture(const char *name, gpu::Texture *texture, GPUSamplerState state=sampler_auto)
detail::PassBase< command::DrawMultiBuf > Sub
void edit_object_sync(Manager &manager, const ObjectRef &ob_ref, Resources &res, const State &) final
void begin_sync(Resources &res, const State &state) final
void pre_draw(Manager &manager, View &view) final
void draw_line(Framebuffer &framebuffer, Manager &manager, View &view) final
void object_sync(Manager &manager, const ObjectRef &ob_ref, Resources &res, const State &state) final
#define DRW_CLIPPING_UBO_SLOT
#define OVERLAY_GLOBALS_SLOT
@ DRW_STATE_DEPTH_LESS_EQUAL
detail::Pass< command::DrawMultiBuf > PassMain
gpu::Batch * DRW_cache_lattice_wire_get(Object *ob, bool use_weight)
gpu::Batch * DRW_cache_lattice_vert_overlay_get(Object *ob)
MatBase< float, 4, 4 > float4x4
VecBase< float, 4 > float4