#[repr(C)]pub struct PatchArray {
pub reg_desc: u32,
pub desc: u32,
pub num_patches: u32,
pub index_base: u32,
pub stride: u32,
pub primitive_id_base: u32,
}Expand description
A run of patches of one type in a GpuPatchTable
(Osd::PatchArray, OsdPatchArray in the shaders).
The patches of the array are patches primitive_id_base.. of the
table (indices into its patch-param buffer), and patch
primitive_id_base + k has its stride control points at
index_base + k * stride in the index buffer.
Fields§
§reg_desc: u32Descriptor code of the array’s regular patches
(patch_descriptor); equal to desc for vertex
patches, as in OpenSubdiv.
desc: u32Descriptor code of the array’s patches (patch_descriptor).
num_patches: u32The number of patches in the array.
index_base: u32Where the array’s control points start in the index buffer.
stride: u32The number of index-buffer entries per patch.
primitive_id_base: u32The index of the array’s first patch in the table (and in its patch-param buffer).
Implementations§
Source§impl PatchArray
impl PatchArray
Sourcepub fn patch_type(&self) -> Option<PatchType>
pub fn patch_type(&self) -> Option<PatchType>
The patch type of the array, or None for a descriptor code no
GpuPatchTable emits.