Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
draco_decoder.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4#include <cstdint>
5#include <vector>
6
7namespace pulp::render {
8
11 std::vector<float> positions;
12 std::vector<float> normals;
13 std::vector<float> tex_coords;
14 std::vector<float> tex_coords1;
15 std::vector<float> tangents;
16 std::vector<float> colors;
17 std::vector<uint32_t> indices;
18 int vertex_count = 0;
19 int face_count = 0;
20 bool success = false;
22};
23
27 int position = -1;
28 int normal = -1;
29 int texcoord0 = -1;
30 int texcoord1 = -1;
31 int tangent = -1;
32 int color0 = -1;
33};
34
37DecodedMesh decode_draco(const uint8_t* data, size_t size);
38
41DecodedMesh decode_draco(const uint8_t* data,
42 size_t size,
43 const DracoAttributeIds& attribute_ids);
44
47
48} // namespace pulp::render
Definition gpu_fwd.hpp:31
bool draco_decoder_available()
True when this build was compiled with the native DRACO decoder enabled.
DecodedMesh decode_draco(const uint8_t *data, size_t size)
Decode a DRACO-compressed mesh buffer.
Decoded mesh geometry from DRACO-compressed data.
Definition draco_decoder.hpp:10
std::vector< float > tangents
Flat xyzw tangents (may be empty).
Definition draco_decoder.hpp:15
std::vector< uint32_t > indices
Triangle indices.
Definition draco_decoder.hpp:17
std::vector< float > normals
Flat xyz normals (may be empty).
Definition draco_decoder.hpp:12
std::vector< float > colors
Flat rgba vertex colors (may be empty).
Definition draco_decoder.hpp:16
bool unique_id_attributes_applied
Definition draco_decoder.hpp:21
int vertex_count
Definition draco_decoder.hpp:18
std::vector< float > tex_coords
Flat uv coordinates (may be empty).
Definition draco_decoder.hpp:13
bool success
Definition draco_decoder.hpp:20
std::vector< float > tex_coords1
Flat secondary uv coordinates (may be empty).
Definition draco_decoder.hpp:14
std::vector< float > positions
Flat xyz positions.
Definition draco_decoder.hpp:11
int face_count
Definition draco_decoder.hpp:19
Draco attribute unique IDs from a glTF KHR_draco_mesh_compression attributes map.
Definition draco_decoder.hpp:26
int tangent
Definition draco_decoder.hpp:31
int color0
Definition draco_decoder.hpp:32
int normal
Definition draco_decoder.hpp:28
int position
Definition draco_decoder.hpp:27
int texcoord1
Definition draco_decoder.hpp:30
int texcoord0
Definition draco_decoder.hpp:29