Blender  V2.93
overlay_volume.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #include "DNA_volume_types.h"
22 
23 #include "DRW_render.h"
24 #include "GPU_shader.h"
25 
26 #include "overlay_private.h"
27 
29 {
30  OVERLAY_PassList *psl = vedata->psl;
31  OVERLAY_PrivateData *pd = vedata->stl->pd;
32  const bool is_select = DRW_state_is_select();
33 
34  if (is_select) {
40  DRW_shgroup_uniform_block(grp, "globalsBlock", G_draw.block_ubo);
41  }
42  else {
43  psl->volume_ps = NULL;
45  }
46 }
47 
49 {
50  OVERLAY_PrivateData *pd = vedata->stl->pd;
51  const bool is_select = DRW_state_is_select();
52 
53  if (is_select) {
55  if (geom != NULL) {
57  }
58  }
59 }
60 
62 {
63  OVERLAY_PassList *psl = vedata->psl;
64 
65  if (psl->volume_ps) {
67  }
68 }
DRWState
Definition: DRW_render.h:312
@ DRW_STATE_WRITE_DEPTH
Definition: DRW_render.h:314
@ DRW_STATE_DEPTH_LESS_EQUAL
Definition: DRW_render.h:323
#define DRW_PASS_CREATE(pass, state)
Definition: DRW_render.h:593
#define DRW_shgroup_call(shgroup, geom, ob)
Definition: DRW_render.h:420
GPUBatch
Definition: GPU_batch.h:93
struct GPUShader GPUShader
Definition: GPU_shader.h:33
GPUBatch * DRW_cache_volume_selection_surface_get(Object *ob)
Definition: draw_cache.c:3320
struct DRW_Global G_draw
Definition: draw_common.c:45
bool DRW_state_is_select(void)
void DRW_shgroup_uniform_block(DRWShadingGroup *shgroup, const char *name, const GPUUniformBuf *ubo)
DRWShadingGroup * DRW_shgroup_create(struct GPUShader *shader, DRWPass *pass)
void DRW_draw_pass(DRWPass *pass)
static ulong state[N]
GPUShader * OVERLAY_shader_depth_only(void)
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)
struct GPUUniformBuf * block_ubo
Definition: draw_common.h:210
OVERLAY_PassList * psl
OVERLAY_StorageList * stl
DRWShadingGroup * volume_selection_surface_grp
struct OVERLAY_PrivateData * pd