import { Buffer } from '../buffer'; import { Context } from '../context'; import { Geometry } from '../geometry'; import { Material } from '../scene'; export declare class IndexBinding { buffer: Buffer; type: GLenum; numIndices: number; offset: GLintptr; } export declare class VertexBinding { buffer: Buffer; attributeIndex: GLint; numVertices: GLint; size: GLint; type: GLenum; normalized: boolean; stride: GLsizei; offset: GLintptr; } /** * This class includes all information to render a primitive as specified by the glTF standard. * The logic for binding the necessary buffers and drawing the primitive are also included. * The material for the primitive as specified by glTF is stored, however it is not bound * automatically, i.e., material handling needs to be performed outside this class. * See https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#geometry. */ export declare class GLTFPrimitive extends Geometry { protected _drawMode: GLenum; protected _indexBinding: IndexBinding | undefined; protected _bindings: Array; protected _material: Material; protected _geometryFlags: number; constructor(context: Context, bindings: Array, indexBinding: IndexBinding | undefined, drawMode: GLenum, material: Material, flags: number, identifier?: string); protected bindBuffers(): void; protected unbindBuffers(): void; draw(): void; get drawMode(): GLenum; get material(): Material; get flags(): number; get indexBufferInformation(): IndexBinding | undefined; /** * Returns information about the attribute buffer used by this primitive for a specific attribute semantic. * If the attribute buffer is not present, undefined is returned. * * @param attribute - Name of the attribute semantic defined by glTF, e.g., "POSITION" or "TEXCOORD_0", * see https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#meshes */ getVertexBufferInformationFromAttribute(attribute: string): VertexBinding | undefined; }