Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines.cc
| Show All 15 Lines | |||||
| * The Original Code is Copyright (C) 2021 by Blender Foundation. | * The Original Code is Copyright (C) 2021 by Blender Foundation. | ||||
| * All rights reserved. | * All rights reserved. | ||||
| */ | */ | ||||
| /** \file | /** \file | ||||
| * \ingroup draw | * \ingroup draw | ||||
| */ | */ | ||||
| #include "draw_cache_extract_mesh_private.h" | |||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "extract_mesh.h" | |||||
| namespace blender::draw { | namespace blender::draw { | ||||
| /* ---------------------------------------------------------------------- */ | /* ---------------------------------------------------------------------- */ | ||||
| /** \name Extract Edges Indices | /** \name Extract Edges Indices | ||||
| * \{ */ | * \{ */ | ||||
| static void extract_lines_init(const MeshRenderData *mr, | static void extract_lines_init(const MeshRenderData *mr, | ||||
| struct MeshBatchCache *UNUSED(cache), | struct MeshBatchCache *UNUSED(cache), | ||||
| ▲ Show 20 Lines • Show All 196 Lines • ▼ Show 20 Lines | static void extract_lines_loose_only_init(const MeshRenderData *mr, | ||||
| UNUSED_VARS_NDEBUG(buf); | UNUSED_VARS_NDEBUG(buf); | ||||
| extract_lines_loose_subbuffer(mr, cache); | extract_lines_loose_subbuffer(mr, cache); | ||||
| } | } | ||||
| constexpr MeshExtract create_extractor_lines_loose_only() | constexpr MeshExtract create_extractor_lines_loose_only() | ||||
| { | { | ||||
| MeshExtract extractor = {nullptr}; | MeshExtract extractor = {nullptr}; | ||||
| extractor.init = extract_lines_loose_only_init; | extractor.init = extract_lines_loose_only_init; | ||||
| extractor.data_type = MR_DATA_NONE; | extractor.data_type = MR_DATA_LOOSE_GEOM; | ||||
| extractor.data_size = 0; | extractor.data_size = 0; | ||||
| extractor.use_threading = false; | extractor.use_threading = false; | ||||
| extractor.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.lines_loose); | extractor.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.lines_loose); | ||||
| return extractor; | return extractor; | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| } // namespace blender::draw | } // namespace blender::draw | ||||
| extern "C" { | extern "C" { | ||||
| const MeshExtract extract_lines = blender::draw::create_extractor_lines(); | const MeshExtract extract_lines = blender::draw::create_extractor_lines(); | ||||
| const MeshExtract extract_lines_with_lines_loose = | const MeshExtract extract_lines_with_lines_loose = | ||||
| blender::draw::create_extractor_lines_with_lines_loose(); | blender::draw::create_extractor_lines_with_lines_loose(); | ||||
| const MeshExtract extract_lines_loose_only = blender::draw::create_extractor_lines_loose_only(); | const MeshExtract extract_lines_loose_only = blender::draw::create_extractor_lines_loose_only(); | ||||
| } | } | ||||