webgl-dsl
Version:
Thin functional WebGL wrapper with strong typed GLSL DSL
117 lines (116 loc) • 2.6 kB
TypeScript
export declare enum FaceCulling {
Front = 1028,
Back = 1029,
FrontAndBack = 1032
}
export declare enum BlendEquation {
Add = 32774,
Sub = 32778,
RSub = 32779,
Min = 32775,
Max = 32776
}
export declare enum DepthFunction {
Never = 512,
Less = 513,
Equal = 514,
LEqual = 515,
Greater = 516,
NotEqual = 517,
GEqual = 518,
Always = 519
}
export declare enum BlendFunction {
Zero = 0,
One = 1,
SrcColor = 768,
OneMinusSrcColor = 769,
DstColor = 774,
OneMinusDstColor = 775,
SrcAlpha = 770,
OneMinusSrcAlpha = 771,
DstAlpha = 772,
OneMinusDstAlpha = 773,
SrcAlphaSaturate = 776
}
export declare enum TextureFilter {
Nearest = 9728,
Linear = 9729
}
export declare enum TextureFormat {
Alpha = 6406,
Luminance = 6409,
LuminanceAlpha = 6410,
Rgb = 6407,
Rgba = 6408,
Srgb = 35904,
Srgba = 35907
}
export declare enum PixelFormat {
Rgba = 6408,
Rgb = 6407,
Alpha = 6406
}
export declare namespace PixelFormat {
function getChannelsCount(format: PixelFormat): 1 | 3 | 4;
}
export declare enum ShaderType {
Vertex = 35633,
Fragment = 35632
}
export declare enum ErrorCode {
NoError = 0,
InvalidEnum = 1280,
InvalidValue = 1281,
InvalidOperation = 1282,
OutOfMemory = 1285
}
export declare enum BufferUsage {
/**
* The data store contents will be modified once and used at most a few times.
*/
Stream = 35040,
/**
* The data store contents will be modified once and used many times.
*/
Static = 35044,
/**
* The data store contents will be modified repeatedly and used many times.
*/
Dynamic = 35048
}
export declare enum BufferTarget {
Array = 34962,
Elements = 34963
}
export declare enum PrimitivesType {
Points = 0,
Lines = 1,
LineStrip = 3,
LineLoop = 2,
Triangles = 4,
TriangleStrip = 5,
TriangleFan = 6
}
export declare enum AttributeDataType {
Float = 5126,
Vec2 = 35664,
Vec3 = 35665,
Vec4 = 35666
}
export declare enum UniformDataType {
Bool = 35670,
Sampler = 35678,
Float = 5126,
Vec2 = 35664,
Vec3 = 35665,
Vec4 = 35666,
Mat2 = 35674,
Mat3 = 35675,
Mat4 = 35676
}
export declare namespace AttributeDataType {
function getSizeInFloats(type: AttributeDataType): 1 | 2 | 3 | 4;
function getSizeInBytes(type: AttributeDataType): number;
function isVec(type: AttributeDataType): type is AttributeDataType.Vec2 | AttributeDataType.Vec3 | AttributeDataType.Vec4;
}