Skip to content

Commit

Permalink
Rename the new formats
Browse files Browse the repository at this point in the history
  • Loading branch information
GabeRundlett committed Apr 28, 2023
1 parent e415ea3 commit cf77373
Show file tree
Hide file tree
Showing 15 changed files with 125 additions and 114 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.out*
.vs*
build/
.cache/

imgui.ini
*.dot
Expand Down
20 changes: 9 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if(GVOX_ENABLE_TESTS)
list(APPEND VCPKG_MANIFEST_FEATURES "tests")
endif()

project(gvox VERSION 1.2.7)
project(gvox VERSION 1.2.8)

if(GVOX_ENABLE_STATIC_ANALYSIS)
set(CPPCHECK_TEMPLATE "gcc")
Expand Down Expand Up @@ -45,23 +45,21 @@ set(GVOX_OUTPUT_ADAPTERS
set(GVOX_PARSE_ADAPTERS
"gvox_raw"
"gvox_palette"
"gvox_run_length_encoding"
"gvox_octree"
"gvox_global_palette"
"gvox_brickmap"
"voxlap"
"magicavoxel"

"run_length_encoding"
"octree"
"global_palette"
"brickmap"
)
set(GVOX_SERIALIZE_ADAPTERS
"gvox_raw"
"gvox_palette"
"gvox_run_length_encoding"
"gvox_octree"
"gvox_global_palette"
"gvox_brickmap"
"colored_text"

"run_length_encoding"
"octree"
"global_palette"
"brickmap"
)

if(GVOX_BUILD_FOR_JAVA)
Expand Down
10 changes: 10 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/cmake/vcpkg_triplets"
}
},
{
"name": "clangd-support",
"binaryDir": "${sourceDir}/build",
"inherits": [
"defaults"
],
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": true
}
},
{
"name": "defaults-windows",
"hidden": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <gvox/gvox.h>
// #include <gvox/adapters/parse/brickmap.h>
// #include <gvox/adapters/parse/gvox_brickmap.h>

#include <cstdlib>
#include <cstdint>
Expand All @@ -9,7 +9,7 @@
#include <vector>
#include <new>

#include "../shared/brickmap.hpp"
#include "../shared/gvox_brickmap.hpp"

struct BrickmapParseUserState {
GvoxRegionRange range{};
Expand All @@ -23,19 +23,19 @@ struct BrickmapParseUserState {
};

// Base
extern "C" void gvox_parse_adapter_brickmap_create(GvoxAdapterContext *ctx, void const * /*unused*/) {
extern "C" void gvox_parse_adapter_gvox_brickmap_create(GvoxAdapterContext *ctx, void const * /*unused*/) {
auto *user_state_ptr = malloc(sizeof(BrickmapParseUserState));
[[maybe_unused]] auto &user_state = *(new (user_state_ptr) BrickmapParseUserState());
gvox_adapter_set_user_pointer(ctx, user_state_ptr);
}

extern "C" void gvox_parse_adapter_brickmap_destroy(GvoxAdapterContext *ctx) {
extern "C" void gvox_parse_adapter_gvox_brickmap_destroy(GvoxAdapterContext *ctx) {
auto &user_state = *static_cast<BrickmapParseUserState *>(gvox_adapter_get_user_pointer(ctx));
user_state.~BrickmapParseUserState();
free(&user_state);
}

extern "C" void gvox_parse_adapter_brickmap_blit_begin(GvoxBlitContext *blit_ctx, GvoxAdapterContext *ctx, GvoxRegionRange const * /*unused*/, uint32_t /*unused*/) {
extern "C" void gvox_parse_adapter_gvox_brickmap_blit_begin(GvoxBlitContext *blit_ctx, GvoxAdapterContext *ctx, GvoxRegionRange const * /*unused*/, uint32_t /*unused*/) {
auto &user_state = *static_cast<BrickmapParseUserState *>(gvox_adapter_get_user_pointer(ctx));

uint32_t magic = 0;
Expand Down Expand Up @@ -73,22 +73,22 @@ extern "C" void gvox_parse_adapter_brickmap_blit_begin(GvoxBlitContext *blit_ctx
user_state.offset += user_state.bricks_heap.size() * sizeof(user_state.bricks_heap[0]);
}

extern "C" void gvox_parse_adapter_brickmap_blit_end(GvoxBlitContext * /*unused*/, GvoxAdapterContext * /*unused*/) {
extern "C" void gvox_parse_adapter_gvox_brickmap_blit_end(GvoxBlitContext * /*unused*/, GvoxAdapterContext * /*unused*/) {
}

// General
extern "C" auto gvox_parse_adapter_brickmap_query_details() -> GvoxParseAdapterDetails {
extern "C" auto gvox_parse_adapter_gvox_brickmap_query_details() -> GvoxParseAdapterDetails {
return {
.preferred_blit_mode = GVOX_BLIT_MODE_DONT_CARE,
};
}

extern "C" auto gvox_parse_adapter_brickmap_query_parsable_range(GvoxBlitContext * /*unused*/, GvoxAdapterContext *ctx) -> GvoxRegionRange {
extern "C" auto gvox_parse_adapter_gvox_brickmap_query_parsable_range(GvoxBlitContext * /*unused*/, GvoxAdapterContext *ctx) -> GvoxRegionRange {
auto &user_state = *static_cast<BrickmapParseUserState *>(gvox_adapter_get_user_pointer(ctx));
return user_state.range;
}

extern "C" auto gvox_parse_adapter_brickmap_sample_region(GvoxBlitContext * /*blit_ctx*/, GvoxAdapterContext *ctx, GvoxRegion const * /*unused*/, GvoxOffset3D const *offset, uint32_t channel_id) -> GvoxSample {
extern "C" auto gvox_parse_adapter_gvox_brickmap_sample_region(GvoxBlitContext * /*blit_ctx*/, GvoxAdapterContext *ctx, GvoxRegion const * /*unused*/, GvoxOffset3D const *offset, uint32_t channel_id) -> GvoxSample {
auto &user_state = *static_cast<BrickmapParseUserState *>(gvox_adapter_get_user_pointer(ctx));
uint32_t voxel_data = 0;
uint32_t voxel_channel_index = 0;
Expand Down Expand Up @@ -121,11 +121,11 @@ extern "C" auto gvox_parse_adapter_brickmap_sample_region(GvoxBlitContext * /*bl
}

// Serialize Driven
extern "C" auto gvox_parse_adapter_brickmap_query_region_flags(GvoxBlitContext * /*unused*/, GvoxAdapterContext * /*unused*/, GvoxRegionRange const * /*unused*/, uint32_t /*unused*/) -> uint32_t {
extern "C" auto gvox_parse_adapter_gvox_brickmap_query_region_flags(GvoxBlitContext * /*unused*/, GvoxAdapterContext * /*unused*/, GvoxRegionRange const * /*unused*/, uint32_t /*unused*/) -> uint32_t {
return 0;
}

extern "C" auto gvox_parse_adapter_brickmap_load_region(GvoxBlitContext * /*unused*/, GvoxAdapterContext *ctx, GvoxRegionRange const *range, uint32_t channel_flags) -> GvoxRegion {
extern "C" auto gvox_parse_adapter_gvox_brickmap_load_region(GvoxBlitContext * /*unused*/, GvoxAdapterContext *ctx, GvoxRegionRange const *range, uint32_t channel_flags) -> GvoxRegion {
auto &user_state = *static_cast<BrickmapParseUserState *>(gvox_adapter_get_user_pointer(ctx));
if ((channel_flags & ~user_state.channel_flags) != 0) {
gvox_adapter_push_error(ctx, GVOX_RESULT_ERROR_PARSE_ADAPTER_REQUESTED_CHANNEL_NOT_PRESENT, "Tried loading a region with a channel that wasn't present in the original data");
Expand All @@ -139,11 +139,11 @@ extern "C" auto gvox_parse_adapter_brickmap_load_region(GvoxBlitContext * /*unus
return region;
}

extern "C" void gvox_parse_adapter_brickmap_unload_region(GvoxBlitContext * /*unused*/, GvoxAdapterContext * /*unused*/, GvoxRegion * /*unused*/) {
extern "C" void gvox_parse_adapter_gvox_brickmap_unload_region(GvoxBlitContext * /*unused*/, GvoxAdapterContext * /*unused*/, GvoxRegion * /*unused*/) {
}

// Parse Driven
extern "C" void gvox_parse_adapter_brickmap_parse_region(GvoxBlitContext *blit_ctx, GvoxAdapterContext *ctx, GvoxRegionRange const *range, uint32_t channel_flags) {
extern "C" void gvox_parse_adapter_gvox_brickmap_parse_region(GvoxBlitContext *blit_ctx, GvoxAdapterContext *ctx, GvoxRegionRange const *range, uint32_t channel_flags) {
auto &user_state = *static_cast<BrickmapParseUserState *>(gvox_adapter_get_user_pointer(ctx));
if ((channel_flags & ~user_state.channel_flags) != 0) {
gvox_adapter_push_error(ctx, GVOX_RESULT_ERROR_PARSE_ADAPTER_REQUESTED_CHANNEL_NOT_PRESENT, "Tried loading a region with a channel that wasn't present in the original data");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <gvox/gvox.h>
// #include <gvox/adapters/parse/global_palette.h>
// #include <gvox/adapters/parse/gvox_global_palette.h>

#include <cstdlib>
#include <cstdint>
Expand All @@ -25,19 +25,19 @@ struct GlobalPaletteParseUserState {
};

// Base
extern "C" void gvox_parse_adapter_global_palette_create(GvoxAdapterContext *ctx, void const * /*unused*/) {
extern "C" void gvox_parse_adapter_gvox_global_palette_create(GvoxAdapterContext *ctx, void const * /*unused*/) {
auto *user_state_ptr = malloc(sizeof(GlobalPaletteParseUserState));
[[maybe_unused]] auto &user_state = *(new (user_state_ptr) GlobalPaletteParseUserState());
gvox_adapter_set_user_pointer(ctx, user_state_ptr);
}

extern "C" void gvox_parse_adapter_global_palette_destroy(GvoxAdapterContext *ctx) {
extern "C" void gvox_parse_adapter_gvox_global_palette_destroy(GvoxAdapterContext *ctx) {
auto &user_state = *static_cast<GlobalPaletteParseUserState *>(gvox_adapter_get_user_pointer(ctx));
user_state.~GlobalPaletteParseUserState();
free(&user_state);
}

extern "C" void gvox_parse_adapter_global_palette_blit_begin(GvoxBlitContext *blit_ctx, GvoxAdapterContext *ctx, GvoxRegionRange const * /*unused*/, uint32_t /*unused*/) {
extern "C" void gvox_parse_adapter_gvox_global_palette_blit_begin(GvoxBlitContext *blit_ctx, GvoxAdapterContext *ctx, GvoxRegionRange const * /*unused*/, uint32_t /*unused*/) {
auto &user_state = *static_cast<GlobalPaletteParseUserState *>(gvox_adapter_get_user_pointer(ctx));

uint32_t magic = 0;
Expand Down Expand Up @@ -82,22 +82,22 @@ extern "C" void gvox_parse_adapter_global_palette_blit_begin(GvoxBlitContext *bl
}
}

extern "C" void gvox_parse_adapter_global_palette_blit_end(GvoxBlitContext * /*unused*/, GvoxAdapterContext * /*unused*/) {
extern "C" void gvox_parse_adapter_gvox_global_palette_blit_end(GvoxBlitContext * /*unused*/, GvoxAdapterContext * /*unused*/) {
}

// General
extern "C" auto gvox_parse_adapter_global_palette_query_details() -> GvoxParseAdapterDetails {
extern "C" auto gvox_parse_adapter_gvox_global_palette_query_details() -> GvoxParseAdapterDetails {
return {
.preferred_blit_mode = GVOX_BLIT_MODE_DONT_CARE,
};
}

extern "C" auto gvox_parse_adapter_global_palette_query_parsable_range(GvoxBlitContext * /*unused*/, GvoxAdapterContext *ctx) -> GvoxRegionRange {
extern "C" auto gvox_parse_adapter_gvox_global_palette_query_parsable_range(GvoxBlitContext * /*unused*/, GvoxAdapterContext *ctx) -> GvoxRegionRange {
auto &user_state = *static_cast<GlobalPaletteParseUserState *>(gvox_adapter_get_user_pointer(ctx));
return user_state.range;
}

extern "C" auto gvox_parse_adapter_global_palette_sample_region(GvoxBlitContext * /*blit_ctx*/, GvoxAdapterContext *ctx, GvoxRegion const * /*unused*/, GvoxOffset3D const *offset, uint32_t channel_id) -> GvoxSample {
extern "C" auto gvox_parse_adapter_gvox_global_palette_sample_region(GvoxBlitContext * /*blit_ctx*/, GvoxAdapterContext *ctx, GvoxRegion const * /*unused*/, GvoxOffset3D const *offset, uint32_t channel_id) -> GvoxSample {
auto &user_state = *static_cast<GlobalPaletteParseUserState *>(gvox_adapter_get_user_pointer(ctx));
uint32_t voxel_data = 0;
uint32_t voxel_channel_index = 0;
Expand Down Expand Up @@ -125,11 +125,11 @@ extern "C" auto gvox_parse_adapter_global_palette_sample_region(GvoxBlitContext
}

// Serialize Driven
extern "C" auto gvox_parse_adapter_global_palette_query_region_flags(GvoxBlitContext * /*unused*/, GvoxAdapterContext * /*unused*/, GvoxRegionRange const * /*unused*/, uint32_t /*unused*/) -> uint32_t {
extern "C" auto gvox_parse_adapter_gvox_global_palette_query_region_flags(GvoxBlitContext * /*unused*/, GvoxAdapterContext * /*unused*/, GvoxRegionRange const * /*unused*/, uint32_t /*unused*/) -> uint32_t {
return 0;
}

extern "C" auto gvox_parse_adapter_global_palette_load_region(GvoxBlitContext * /*unused*/, GvoxAdapterContext *ctx, GvoxRegionRange const *range, uint32_t channel_flags) -> GvoxRegion {
extern "C" auto gvox_parse_adapter_gvox_global_palette_load_region(GvoxBlitContext * /*unused*/, GvoxAdapterContext *ctx, GvoxRegionRange const *range, uint32_t channel_flags) -> GvoxRegion {
auto &user_state = *static_cast<GlobalPaletteParseUserState *>(gvox_adapter_get_user_pointer(ctx));
if ((channel_flags & ~user_state.channel_flags) != 0) {
gvox_adapter_push_error(ctx, GVOX_RESULT_ERROR_PARSE_ADAPTER_REQUESTED_CHANNEL_NOT_PRESENT, "Tried loading a region with a channel that wasn't present in the original data");
Expand All @@ -143,11 +143,11 @@ extern "C" auto gvox_parse_adapter_global_palette_load_region(GvoxBlitContext *
return region;
}

extern "C" void gvox_parse_adapter_global_palette_unload_region(GvoxBlitContext * /*unused*/, GvoxAdapterContext * /*unused*/, GvoxRegion * /*unused*/) {
extern "C" void gvox_parse_adapter_gvox_global_palette_unload_region(GvoxBlitContext * /*unused*/, GvoxAdapterContext * /*unused*/, GvoxRegion * /*unused*/) {
}

// Parse Driven
extern "C" void gvox_parse_adapter_global_palette_parse_region(GvoxBlitContext *blit_ctx, GvoxAdapterContext *ctx, GvoxRegionRange const *range, uint32_t channel_flags) {
extern "C" void gvox_parse_adapter_gvox_global_palette_parse_region(GvoxBlitContext *blit_ctx, GvoxAdapterContext *ctx, GvoxRegionRange const *range, uint32_t channel_flags) {
auto &user_state = *static_cast<GlobalPaletteParseUserState *>(gvox_adapter_get_user_pointer(ctx));
if ((channel_flags & ~user_state.channel_flags) != 0) {
gvox_adapter_push_error(ctx, GVOX_RESULT_ERROR_PARSE_ADAPTER_REQUESTED_CHANNEL_NOT_PRESENT, "Tried loading a region with a channel that wasn't present in the original data");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <gvox/gvox.h>
// #include <gvox/adapters/parse/octree.h>
#include "../shared/octree.hpp"
// #include <gvox/adapters/parse/gvox_octree.h>
#include "../shared/gvox_octree.hpp"

#include <cstdlib>
#include <cstdint>
Expand All @@ -12,23 +12,23 @@

struct OctreeParseUserState {
size_t offset{};
Octree octree{};
Octree gvox_octree{};
};

// Base
extern "C" void gvox_parse_adapter_octree_create(GvoxAdapterContext *ctx, void const * /*unused*/) {
extern "C" void gvox_parse_adapter_gvox_octree_create(GvoxAdapterContext *ctx, void const * /*unused*/) {
auto *user_state_ptr = malloc(sizeof(OctreeParseUserState));
[[maybe_unused]] auto &user_state = *(new (user_state_ptr) OctreeParseUserState());
gvox_adapter_set_user_pointer(ctx, user_state_ptr);
}

extern "C" void gvox_parse_adapter_octree_destroy(GvoxAdapterContext *ctx) {
extern "C" void gvox_parse_adapter_gvox_octree_destroy(GvoxAdapterContext *ctx) {
auto &user_state = *static_cast<OctreeParseUserState *>(gvox_adapter_get_user_pointer(ctx));
user_state.~OctreeParseUserState();
free(&user_state);
}

extern "C" void gvox_parse_adapter_octree_blit_begin(GvoxBlitContext *blit_ctx, GvoxAdapterContext *ctx, GvoxRegionRange const * /*unused*/, uint32_t /*unused*/) {
extern "C" void gvox_parse_adapter_gvox_octree_blit_begin(GvoxBlitContext *blit_ctx, GvoxAdapterContext *ctx, GvoxRegionRange const * /*unused*/, uint32_t /*unused*/) {
auto &user_state = *static_cast<OctreeParseUserState *>(gvox_adapter_get_user_pointer(ctx));

uint32_t magic = 0;
Expand All @@ -40,50 +40,50 @@ extern "C" void gvox_parse_adapter_octree_blit_begin(GvoxBlitContext *blit_ctx,
return;
}

gvox_input_read(blit_ctx, user_state.offset, sizeof(GvoxRegionRange), &user_state.octree.range);
gvox_input_read(blit_ctx, user_state.offset, sizeof(GvoxRegionRange), &user_state.gvox_octree.range);
user_state.offset += sizeof(GvoxRegionRange);

uint32_t node_n = 0;
gvox_input_read(blit_ctx, user_state.offset, sizeof(node_n), &node_n);
user_state.offset += sizeof(node_n);

user_state.octree.nodes.resize(node_n);
gvox_input_read(blit_ctx, user_state.offset, sizeof(user_state.octree.nodes[0]) * node_n, user_state.octree.nodes.data());
user_state.gvox_octree.nodes.resize(node_n);
gvox_input_read(blit_ctx, user_state.offset, sizeof(user_state.gvox_octree.nodes[0]) * node_n, user_state.gvox_octree.nodes.data());
}

extern "C" void gvox_parse_adapter_octree_blit_end(GvoxBlitContext * /*unused*/, GvoxAdapterContext * /*unused*/) {
extern "C" void gvox_parse_adapter_gvox_octree_blit_end(GvoxBlitContext * /*unused*/, GvoxAdapterContext * /*unused*/) {
}

// General
extern "C" auto gvox_parse_adapter_octree_query_details() -> GvoxParseAdapterDetails {
extern "C" auto gvox_parse_adapter_gvox_octree_query_details() -> GvoxParseAdapterDetails {
return {
.preferred_blit_mode = GVOX_BLIT_MODE_DONT_CARE,
};
}

extern "C" auto gvox_parse_adapter_octree_query_parsable_range(GvoxBlitContext * /*unused*/, GvoxAdapterContext *ctx) -> GvoxRegionRange {
extern "C" auto gvox_parse_adapter_gvox_octree_query_parsable_range(GvoxBlitContext * /*unused*/, GvoxAdapterContext *ctx) -> GvoxRegionRange {
auto &user_state = *static_cast<OctreeParseUserState *>(gvox_adapter_get_user_pointer(ctx));
return user_state.octree.range;
return user_state.gvox_octree.range;
}

extern "C" auto gvox_parse_adapter_octree_sample_region(GvoxBlitContext * /*blit_ctx*/, GvoxAdapterContext *ctx, GvoxRegion const * /*unused*/, GvoxOffset3D const *offset, uint32_t /*channel_id*/) -> GvoxSample {
extern "C" auto gvox_parse_adapter_gvox_octree_sample_region(GvoxBlitContext * /*blit_ctx*/, GvoxAdapterContext *ctx, GvoxRegion const * /*unused*/, GvoxOffset3D const *offset, uint32_t /*channel_id*/) -> GvoxSample {
auto &user_state = *static_cast<OctreeParseUserState *>(gvox_adapter_get_user_pointer(ctx));
if (user_state.octree.nodes.size() == 1) {
return {user_state.octree.nodes[0].leaf.color, 1u};
if (user_state.gvox_octree.nodes.size() == 1) {
return {user_state.gvox_octree.nodes[0].leaf.color, 1u};
}
auto x_pos = static_cast<uint32_t>(offset->x - user_state.octree.range.offset.x);
auto y_pos = static_cast<uint32_t>(offset->y - user_state.octree.range.offset.y);
auto z_pos = static_cast<uint32_t>(offset->z - user_state.octree.range.offset.z);
uint32_t voxel_data = user_state.octree.sample(user_state.octree.nodes[0].parent, x_pos, y_pos, z_pos);
auto x_pos = static_cast<uint32_t>(offset->x - user_state.gvox_octree.range.offset.x);
auto y_pos = static_cast<uint32_t>(offset->y - user_state.gvox_octree.range.offset.y);
auto z_pos = static_cast<uint32_t>(offset->z - user_state.gvox_octree.range.offset.z);
uint32_t voxel_data = user_state.gvox_octree.sample(user_state.gvox_octree.nodes[0].parent, x_pos, y_pos, z_pos);
return {voxel_data, 1u};
}

// Serialize Driven
extern "C" auto gvox_parse_adapter_octree_query_region_flags(GvoxBlitContext * /*unused*/, GvoxAdapterContext * /*unused*/, GvoxRegionRange const * /*unused*/, uint32_t /*unused*/) -> uint32_t {
extern "C" auto gvox_parse_adapter_gvox_octree_query_region_flags(GvoxBlitContext * /*unused*/, GvoxAdapterContext * /*unused*/, GvoxRegionRange const * /*unused*/, uint32_t /*unused*/) -> uint32_t {
return 0;
}

extern "C" auto gvox_parse_adapter_octree_load_region(GvoxBlitContext * /*unused*/, GvoxAdapterContext *ctx, GvoxRegionRange const *range, uint32_t channel_flags) -> GvoxRegion {
extern "C" auto gvox_parse_adapter_gvox_octree_load_region(GvoxBlitContext * /*unused*/, GvoxAdapterContext *ctx, GvoxRegionRange const *range, uint32_t channel_flags) -> GvoxRegion {
// auto &user_state = *static_cast<OctreeParseUserState *>(gvox_adapter_get_user_pointer(ctx));
if ((channel_flags & ~static_cast<uint32_t>(GVOX_CHANNEL_BIT_COLOR)) != 0u) {
gvox_adapter_push_error(ctx, GVOX_RESULT_ERROR_PARSE_ADAPTER_REQUESTED_CHANNEL_NOT_PRESENT, "Tried loading a region with a channel that wasn't present in the original data");
Expand All @@ -97,11 +97,11 @@ extern "C" auto gvox_parse_adapter_octree_load_region(GvoxBlitContext * /*unused
return region;
}

extern "C" void gvox_parse_adapter_octree_unload_region(GvoxBlitContext * /*unused*/, GvoxAdapterContext * /*unused*/, GvoxRegion * /*unused*/) {
extern "C" void gvox_parse_adapter_gvox_octree_unload_region(GvoxBlitContext * /*unused*/, GvoxAdapterContext * /*unused*/, GvoxRegion * /*unused*/) {
}

// Parse Driven
extern "C" void gvox_parse_adapter_octree_parse_region(GvoxBlitContext *blit_ctx, GvoxAdapterContext *ctx, GvoxRegionRange const *range, uint32_t channel_flags) {
extern "C" void gvox_parse_adapter_gvox_octree_parse_region(GvoxBlitContext *blit_ctx, GvoxAdapterContext *ctx, GvoxRegionRange const *range, uint32_t channel_flags) {
// auto &user_state = *static_cast<OctreeParseUserState *>(gvox_adapter_get_user_pointer(ctx));
if ((channel_flags & ~static_cast<uint32_t>(GVOX_CHANNEL_BIT_COLOR)) != 0u) {
gvox_adapter_push_error(ctx, GVOX_RESULT_ERROR_PARSE_ADAPTER_REQUESTED_CHANNEL_NOT_PRESENT, "Tried loading a region with a channel that wasn't present in the original data");
Expand Down
Loading

0 comments on commit cf77373

Please sign in to comment.