Make the mesh library serializable and deserializable.
This is needed for the new WebRender infrastructure.
This commit is contained in:
parent
18121208d4
commit
6c2c34aa3c
|
@ -120,7 +120,7 @@ pub(crate) enum BVertexKind {
|
||||||
ConcaveControlPoint,
|
ConcaveControlPoint,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug)]
|
#[derive(Clone, Copy, Debug, Serialize, Deserialize)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct BVertexLoopBlinnData {
|
pub struct BVertexLoopBlinnData {
|
||||||
pub tex_coord: [u8; 2],
|
pub tex_coord: [u8; 2],
|
||||||
|
|
|
@ -23,7 +23,7 @@ use std::u32;
|
||||||
|
|
||||||
use {BQuad, BQuadVertexPositions, BVertexLoopBlinnData};
|
use {BQuad, BQuadVertexPositions, BVertexLoopBlinnData};
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
pub struct MeshLibrary {
|
pub struct MeshLibrary {
|
||||||
pub path_ranges: Vec<PathRanges>,
|
pub path_ranges: Vec<PathRanges>,
|
||||||
pub b_quads: Vec<BQuad>,
|
pub b_quads: Vec<BQuad>,
|
||||||
|
@ -424,7 +424,7 @@ pub(crate) struct MeshLibraryLengths {
|
||||||
b_boxes: u32,
|
b_boxes: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
pub struct PathRanges {
|
pub struct PathRanges {
|
||||||
pub b_quads: Range<u32>,
|
pub b_quads: Range<u32>,
|
||||||
pub b_quad_vertex_positions: Range<u32>,
|
pub b_quad_vertex_positions: Range<u32>,
|
||||||
|
|
Loading…
Reference in New Issue