Blender  V3.3
overlay_lattice.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2019 Blender Foundation. */
3 
8 #include "DRW_render.h"
9 
10 #include "overlay_private.h"
11 
13 {
14  OVERLAY_PassList *psl = vedata->psl;
15  OVERLAY_PrivateData *pd = vedata->stl->pd;
16  struct GPUShader *sh;
17  DRWShadingGroup *grp;
18 
19  {
22 
25  DRW_shgroup_uniform_block(grp, "globalsBlock", G_draw.block_ubo);
27 
30  DRW_shgroup_uniform_block(grp, "globalsBlock", G_draw.block_ubo);
31  }
32 }
33 
35 {
36  OVERLAY_PrivateData *pd = vedata->stl->pd;
37  struct GPUBatch *geom;
38 
39  geom = DRW_cache_lattice_wire_get(ob, true);
41 
44 }
45 
47 {
49  const DRWContextState *draw_ctx = DRW_context_state_get();
50 
51  float *color;
53 
54  struct GPUBatch *geom = DRW_cache_lattice_wire_get(ob, false);
55  OVERLAY_extra_wire(cb, geom, ob->obmat, color);
56 }
57 
59 {
60  OVERLAY_PassList *psl = vedata->psl;
61  OVERLAY_FramebufferList *fbl = vedata->fbl;
62 
63  if (DRW_state_is_fbo()) {
65  }
66 
68 }
DRWState
Definition: DRW_render.h:298
@ DRW_STATE_WRITE_DEPTH
Definition: DRW_render.h:302
@ DRW_STATE_WRITE_COLOR
Definition: DRW_render.h:303
@ DRW_STATE_DEPTH_LESS_EQUAL
Definition: DRW_render.h:311
#define DRW_PASS_CREATE(pass, state)
Definition: DRW_render.h:690
#define DRW_shgroup_uniform_block(shgroup, name, ubo)
Definition: DRW_render.h:651
#define DRW_shgroup_call(shgroup, geom, ob)
Definition: DRW_render.h:414
GPUBatch
Definition: GPU_batch.h:78
void GPU_framebuffer_bind(GPUFrameBuffer *fb)
struct GPUShader GPUShader
Definition: GPU_shader.h:20
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 Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input 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 a color
GPUBatch * DRW_cache_lattice_vert_overlay_get(Object *ob)
Definition: draw_cache.c:3043
GPUBatch * DRW_cache_lattice_wire_get(Object *ob, bool use_weight)
Definition: draw_cache.c:3029
int DRW_object_wire_theme_get(Object *ob, ViewLayer *view_layer, float **r_color)
Definition: draw_common.c:279
struct DRW_Global G_draw
Definition: draw_common.c:32
bool DRW_state_is_fbo(void)
const DRWContextState * DRW_context_state_get(void)
void DRW_shgroup_uniform_texture(DRWShadingGroup *shgroup, const char *name, const GPUTexture *tex)
DRWShadingGroup * DRW_shgroup_create(struct GPUShader *shader, DRWPass *pass)
void DRW_draw_pass(DRWPass *pass)
const int state
ccl_gpu_kernel_postfix ccl_global float int int int int sh
OVERLAY_ExtraCallBuffers * OVERLAY_extra_call_buffer_get(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_extra_wire(OVERLAY_ExtraCallBuffers *cb, struct GPUBatch *geom, const float mat[4][4], const float color[4])
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_wire(void)
GPUShader * OVERLAY_shader_edit_lattice_point(void)
struct ViewLayer * view_layer
Definition: DRW_render.h:980
struct GPUUniformBuf * block_ubo
Definition: draw_common.h:129
struct GPUTexture * weight_ramp
Definition: draw_common.h:132
OVERLAY_PassList * psl
OVERLAY_StorageList * stl
OVERLAY_FramebufferList * fbl
struct GPUFrameBuffer * overlay_default_fb
DRWPass * edit_lattice_ps
DRWShadingGroup * edit_lattice_wires_grp
DRWShadingGroup * edit_lattice_points_grp
struct OVERLAY_PrivateData * pd
float obmat[4][4]