Blender V4.3
overlay_volume.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#include "DNA_volume_types.h"
10
11#include "DRW_render.hh"
12#include "GPU_shader.hh"
13
14#include "overlay_private.hh"
15
17{
18 OVERLAY_PassList *psl = vedata->psl;
19 OVERLAY_PrivateData *pd = vedata->stl->pd;
20 const bool is_select = DRW_state_is_select();
21
22 if (is_select) {
28 }
29 else {
30 psl->volume_ps = nullptr;
31 pd->volume_selection_surface_grp = nullptr;
32 }
33}
34
36{
37 using namespace blender::draw;
38 OVERLAY_PrivateData *pd = vedata->stl->pd;
39 const bool is_select = DRW_state_is_select();
40
41 if (is_select) {
42 blender::gpu::Batch *geom = DRW_cache_volume_selection_surface_get(ob);
43 if (geom != nullptr) {
45 }
46 }
47}
48
50{
51 OVERLAY_PassList *psl = vedata->psl;
52
53 if (psl->volume_ps) {
55 }
56}
#define DRW_PASS_CREATE(pass, state)
#define DRW_shgroup_call(shgroup, geom, ob)
struct GPUShader GPUShader
bool DRW_state_is_select()
DRWShadingGroup * DRW_shgroup_create(GPUShader *shader, DRWPass *pass)
void DRW_draw_pass(DRWPass *pass)
DRWState
Definition draw_state.hh:25
@ DRW_STATE_WRITE_DEPTH
Definition draw_state.hh:29
@ DRW_STATE_DEPTH_LESS_EQUAL
Definition draw_state.hh:38
static ulong state[N]
GPUShader * OVERLAY_shader_depth_only()
void OVERLAY_volume_draw(OVERLAY_Data *vedata)
void OVERLAY_volume_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_volume_cache_init(OVERLAY_Data *vedata)
OVERLAY_PassList * psl
OVERLAY_StorageList * stl
DRWShadingGroup * volume_selection_surface_grp
OVERLAY_PrivateData * pd