Blender V4.3
overlay_lattice.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2019 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#include "DRW_render.hh"
10
11#include "overlay_private.hh"
12
34
36{
37 OVERLAY_PrivateData *pd = vedata->stl->pd;
38 blender::gpu::Batch *geom;
39
40 geom = DRW_cache_lattice_wire_get(ob, true);
42
45}
46
48{
50 const DRWContextState *draw_ctx = DRW_context_state_get();
51
52 float *color;
53 DRW_object_wire_theme_get(ob, draw_ctx->view_layer, &color);
54
55 blender::gpu::Batch *geom = DRW_cache_lattice_wire_get(ob, false);
56 OVERLAY_extra_wire(cb, geom, ob->object_to_world().ptr(), color);
57}
58
60{
61 OVERLAY_PassList *psl = vedata->psl;
62 OVERLAY_FramebufferList *fbl = vedata->fbl;
63
64 if (DRW_state_is_fbo()) {
66 }
67
69}
#define DRW_PASS_CREATE(pass, state)
#define DRW_shgroup_uniform_block(shgroup, name, ubo)
#define DRW_shgroup_call(shgroup, geom, ob)
void GPU_framebuffer_bind(GPUFrameBuffer *framebuffer)
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Brightness Control the brightness and contrast of the input color Vector Map input vector components with curves Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert Invert a color
struct GPUShader GPUShader
blender::gpu::Batch * DRW_cache_lattice_vert_overlay_get(Object *ob)
blender::gpu::Batch * DRW_cache_lattice_wire_get(Object *ob, bool use_weight)
int DRW_object_wire_theme_get(Object *ob, ViewLayer *view_layer, float **r_color)
DRW_Global G_draw
const DRWContextState * DRW_context_state_get()
bool DRW_state_is_fbo()
DRWShadingGroup * DRW_shgroup_create(GPUShader *shader, DRWPass *pass)
void DRW_shgroup_uniform_texture(DRWShadingGroup *shgroup, const char *name, const GPUTexture *tex)
void DRW_draw_pass(DRWPass *pass)
DRWState
Definition draw_state.hh:25
@ DRW_STATE_WRITE_DEPTH
Definition draw_state.hh:29
@ DRW_STATE_WRITE_COLOR
Definition draw_state.hh:30
@ DRW_STATE_DEPTH_LESS_EQUAL
Definition draw_state.hh:38
static ulong state[N]
void OVERLAY_extra_wire(OVERLAY_ExtraCallBuffers *cb, blender::gpu::Batch *geom, const float mat[4][4], const float color[4])
OVERLAY_ExtraCallBuffers * OVERLAY_extra_call_buffer_get(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_lattice_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_edit_lattice_draw(OVERLAY_Data *vedata)
void OVERLAY_edit_lattice_cache_init(OVERLAY_Data *vedata)
void OVERLAY_edit_lattice_cache_populate(OVERLAY_Data *vedata, Object *ob)
GPUShader * OVERLAY_shader_edit_lattice_point()
GPUShader * OVERLAY_shader_edit_lattice_wire()
ViewLayer * view_layer
GPUTexture * weight_ramp
GPUUniformBuf * block_ubo
OVERLAY_PassList * psl
OVERLAY_StorageList * stl
OVERLAY_FramebufferList * fbl
GPUFrameBuffer * overlay_default_fb
DRWPass * edit_lattice_ps
DRWShadingGroup * edit_lattice_wires_grp
DRWShadingGroup * edit_lattice_points_grp
OVERLAY_PrivateData * pd