molstar
Version:
A comprehensive macromolecular library.
21 lines (20 loc) • 1.1 kB
TypeScript
/**
* Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author Alexander Rose <alexander.rose@weirdbyte.de>
*/
import { GLRenderingContext } from './compat';
import { Framebuffer } from './framebuffer';
export declare type RenderbufferFormat = 'depth16' | 'stencil8' | 'rgba4' | 'depth-stencil' | 'depth32f';
export declare type RenderbufferAttachment = 'depth' | 'stencil' | 'depth-stencil' | 'color0';
export declare function getFormat(gl: GLRenderingContext, format: RenderbufferFormat): number;
export declare function getAttachment(gl: GLRenderingContext, attachment: RenderbufferAttachment): number;
export interface Renderbuffer {
readonly id: number;
bind: () => void;
attachFramebuffer: (framebuffer: Framebuffer) => void;
setSize: (width: number, height: number) => void;
reset: () => void;
destroy: () => void;
}
export declare function createRenderbuffer(gl: GLRenderingContext, format: RenderbufferFormat, attachment: RenderbufferAttachment, _width: number, _height: number): Renderbuffer;