UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

38 lines 1.79 kB
import type { IBuffer } from "../array/typed-array/i-buffer-view.js"; import type { IManagedObject, IManagedResourceNode } from "../lifecycle/manged-resources.js"; import type { IEmscriptenWrapper } from "../web-assembly/emscripten/i-emscripten-wrapper.js"; import type { TTypedArrayCtor } from "../array/typed-array/t-typed-array-ctor.js"; import type { IInteropBindings } from "../web-assembly/emscripten/i-interop-bindings.js"; /** * @public * Describes a buffer in a fashion similar to an OpenGL attribute. */ export declare class SegmentedBufferDescriptor { readonly blockSize: number; readonly stride: number; readonly start: number; readonly count: number; readonly end: number; constructor(blockSize: number, stride?: number, start?: number, count?: number); } /** * @public * A view into a typed array. */ export interface ISegmentedBufferView<TCTor extends TTypedArrayCtor> { getBuffer(): IBuffer<TCTor>; getDescriptor(): SegmentedBufferDescriptor; } /** * @public * A view into a shared typed array. */ export interface ISharedSegmentedBufferView<TCTor extends TTypedArrayCtor> extends ISegmentedBufferView<TCTor>, IManagedObject { } /** * @public * Creates a view of a (possibly shared) buffer, according to {@link SegmentedBufferDescriptor}. */ export declare function createSegmentedBufferView<TCTor extends TTypedArrayCtor>(buffer: IBuffer<TCTor>, descriptor: SegmentedBufferDescriptor, wrapper: IEmscriptenWrapper<IInteropBindings>, owner: IManagedResourceNode | null): ISharedSegmentedBufferView<TCTor>; export declare function createSegmentedBufferView<TCTor extends TTypedArrayCtor>(buffer: IBuffer<TCTor>, descriptor: SegmentedBufferDescriptor): ISegmentedBufferView<TCTor>; //# sourceMappingURL=segmented-buffer-view.d.ts.map