33 auto create_sub_pass = [&](
const char *name,
GPUShader *shader,
bool add_weight_tex) {
45 edit_lattice_wire_ps_ = create_sub_pass(
47 edit_lattice_point_ps_ = create_sub_pass(
73 draw_mat[i][3] = color[i];
75 draw_mat[3][3] = 0.0f ;
void GPU_framebuffer_bind(GPUFrameBuffer *framebuffer)
struct GPUShader GPUShader
ResourceHandle unique_handle(const ObjectRef &ref)
void submit(PassSimple &pass, View &view)
ResourceHandle resource_handle(const ObjectRef &ref, float inflate_bounds=0.0f)
void bind_texture(const char *name, GPUTexture *texture, GPUSamplerState state=sampler_auto)
void draw(gpu::Batch *batch, uint instance_len=-1, uint vertex_len=-1, uint vertex_first=-1, ResourceHandle handle={0}, uint custom_id=0)
PassBase< DrawCommandBufType > & sub(const char *name)
void state_set(DRWState state, int clip_plane_count=0)
void bind_ubo(const char *name, GPUUniformBuf *buffer)
void shader_set(GPUShader *shader)
void draw(Framebuffer &framebuffer, Manager &manager, View &view)
void begin_sync(Resources &res, const State &state)
void edit_object_sync(Manager &manager, const ObjectRef &ob_ref, Resources &res)
void object_sync(Manager &manager, const ObjectRef &ob_ref, Resources &res, const State &state)
ShaderPtr extra_wire_object
blender::gpu::Batch * DRW_cache_lattice_vert_overlay_get(Object *ob)
blender::gpu::Batch * DRW_cache_lattice_wire_get(Object *ob, bool use_weight)
@ DRW_STATE_DEPTH_LESS_EQUAL
TextureRef weight_ramp_tx
const float4 & object_wire_color(const ObjectRef &ob_ref, ThemeColorID theme_id) const
GPUUniformBuf * globals_buf
void select_bind(PassSimple &pass)
const ID select_id(const ObjectRef &ob_ref, uint sub_object_id=0)