Blender
V3.3
|
Volume API for render engines. More...
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
#include "BLI_math_base.h"
#include "BLI_math_vector.h"
#include "BLI_utildefines.h"
#include "DNA_object_types.h"
#include "DNA_volume_types.h"
#include "BKE_global.h"
#include "BKE_volume.h"
#include "BKE_volume_render.h"
#include "GPU_batch.h"
#include "GPU_capabilities.h"
#include "GPU_texture.h"
#include "DEG_depsgraph_query.h"
#include "DRW_render.h"
#include "draw_cache.h"
#include "draw_cache_impl.h"
Go to the source code of this file.
Classes | |
struct | VolumeBatchCache |
struct | VolumeWireframeUserData |
Typedefs | |
typedef struct VolumeBatchCache | VolumeBatchCache |
typedef struct VolumeWireframeUserData | VolumeWireframeUserData |
Volume API for render engines.
Definition in file draw_cache_impl_volume.c.
typedef struct VolumeBatchCache VolumeBatchCache |
typedef struct VolumeWireframeUserData VolumeWireframeUserData |
Definition at line 95 of file draw_cache_impl_volume.c.
References Volume::batch_cache, BKE_VOLUME_BATCH_DIRTY_ALL, BLI_assert, VolumeBatchCache::is_dirty, and NULL.
Referenced by DRW_engines_register().
Definition at line 128 of file draw_cache_impl_volume.c.
References Volume::batch_cache, MEM_SAFE_FREE, and volume_batch_cache_clear().
Referenced by DRW_engines_register().
DRWVolumeGrid* DRW_volume_batch_cache_get_grid | ( | Volume * | volume, |
const VolumeGrid * | volume_grid | ||
) |
Definition at line 338 of file draw_cache_impl_volume.c.
References NULL, DRWVolumeGrid::texture, volume_batch_cache_get(), and volume_grid_cache_get().
Definition at line 257 of file draw_cache_impl_volume.c.
References BKE_volume_grid_active_get_for_read(), BKE_volume_grid_selection_surface(), drw_volume_selection_surface_cb(), NULL, VolumeBatchCache::selection_surface, and volume_batch_cache_get().
Referenced by DRW_cache_volume_selection_surface_get().
Definition at line 203 of file draw_cache_impl_volume.c.
References VolumeBatchCache::batch, BKE_volume_grid_active_get_for_read(), BKE_volume_grid_wireframe(), Volume::display, DRW_context_state_get(), drw_volume_wireframe_cb(), VolumeBatchCache::face_wire, NULL, VolumeWireframeUserData::scene, DRWContextState::scene, VolumeWireframeUserData::volume, volume_batch_cache_get(), VOLUME_WIREFRAME_NONE, and VolumeDisplay::wireframe_type.
Referenced by DRW_cache_volume_face_wireframe_get().
Definition at line 81 of file draw_cache_impl_volume.c.
References volume_batch_cache_clear(), volume_batch_cache_init(), and volume_batch_cache_valid().
Referenced by drw_batch_cache_validate(), and volume_batch_cache_get().
int DRW_volume_material_count_get | ( | Volume * | volume | ) |
Definition at line 345 of file draw_cache_impl_volume.c.
References max_ii(), and Volume::totcol.
Referenced by DRW_cache_object_material_count_get().
|
static |
Definition at line 228 of file draw_cache_impl_volume.c.
References Volume::batch_cache, GPU_batch_create_ex(), GPU_BATCH_OWNS_INDEX, GPU_BATCH_OWNS_VBO, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_indexbuf_add_tri_verts(), GPU_indexbuf_build(), GPU_indexbuf_init(), GPU_PRIM_TRIS, GPU_vertbuf_attr_fill(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), VolumeBatchCache::selection_surface, UNPACK3, and verts.
Referenced by DRW_volume_batch_cache_get_selection_surface().
|
static |
Definition at line 138 of file draw_cache_impl_volume.c.
References attr_id, VolumeBatchCache::batch, Volume::batch_cache, data, Volume::display, DRW_vertbuf_create_wiredata(), VolumeBatchCache::face_wire, GPU_batch_create, GPU_batch_create_ex(), GPU_BATCH_OWNS_INDEX, GPU_batch_vertbuf_add_ex(), GPU_COMP_F32, GPU_COMP_I10, GPU_COMP_I16, GPU_FETCH_FLOAT, GPU_FETCH_INT_TO_FLOAT_UNIT, GPU_indexbuf_add_line_verts(), GPU_indexbuf_build(), GPU_indexbuf_init(), GPU_normal_convert_v3(), GPU_PRIM_LINES, GPU_PRIM_POINTS, GPU_use_hq_normals_workaround(), GPU_vertbuf_attr_fill(), GPU_vertbuf_attr_fill_stride(), GPU_vertbuf_calloc(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), normal, NULL, RenderData::perf_flag, VolumeBatchCache::pos_nor_in_order, Scene::r, SCE_PERF_HQ_NORMALS, scene, verts, VOLUME_WIREFRAME_POINTS, and VolumeDisplay::wireframe_type.
Referenced by DRW_volume_batch_cache_get_wireframes_face().
Definition at line 110 of file draw_cache_impl_volume.c.
References VolumeBatchCache::batch, Volume::batch_cache, BLI_freelistN(), DRW_TEXTURE_FREE_SAFE, VolumeBatchCache::face_wire, GPU_BATCH_DISCARD_SAFE, GPU_VERTBUF_DISCARD_SAFE, VolumeBatchCache::grids, LISTBASE_FOREACH, MEM_SAFE_FREE, VolumeBatchCache::pos_nor_in_order, and VolumeBatchCache::selection_surface.
Referenced by DRW_volume_batch_cache_free(), and DRW_volume_batch_cache_validate().
|
static |
Definition at line 89 of file draw_cache_impl_volume.c.
References Volume::batch_cache, and DRW_volume_batch_cache_validate().
Referenced by DRW_volume_batch_cache_get_grid(), DRW_volume_batch_cache_get_selection_surface(), and DRW_volume_batch_cache_get_wireframes_face().
Definition at line 67 of file draw_cache_impl_volume.c.
References Volume::batch_cache, VolumeBatchCache::is_dirty, and MEM_callocN.
Referenced by DRW_volume_batch_cache_validate().
Definition at line 61 of file draw_cache_impl_volume.c.
References Volume::batch_cache, and VolumeBatchCache::is_dirty.
Referenced by DRW_volume_batch_cache_validate().
|
static |
Definition at line 271 of file draw_cache_impl_volume.c.
References BKE_volume_dense_float_grid_clear(), BKE_volume_grid_channels(), BKE_volume_grid_dense_floats(), BKE_volume_grid_is_loaded(), BKE_volume_grid_name(), BKE_volume_grid_unload(), BKE_volume_load(), BLI_addtail(), BLI_strdup(), channels(), copy_m4_m4(), ELEM, ListBase::first, G, GPU_DATA_FLOAT, GPU_R16F, GPU_RGB16F, GPU_texture_create_3d(), GPU_texture_swizzle_set(), GPU_texture_wrap_mode(), VolumeBatchCache::grids, invert_m4_m4(), MEM_callocN, MEM_freeN, DRWVolumeGrid::name, DRWVolumeGrid::next, NULL, DRWVolumeGrid::object_to_texture, DenseFloatVolumeGrid::resolution, STREQ, DRWVolumeGrid::texture, DenseFloatVolumeGrid::texture_to_object, DRWVolumeGrid::texture_to_object, UNPACK3, and DenseFloatVolumeGrid::voxels.
Referenced by DRW_volume_batch_cache_get_grid().