UNPKG

@thi.ng/webgl

Version:

WebGL & GLSL abstraction layer

8 lines (7 loc) 414 B
import { TextureType } from "./api/texture.js"; const isGL2Context = (gl) => typeof WebGL2RenderingContext !== "undefined" && gl instanceof WebGL2RenderingContext; const isFloatTexture = (tex) => tex.type === TextureType.FLOAT || tex.type === TextureType.HALF_FLOAT || tex.type === TextureType.HALF_FLOAT_OES || tex.type === TextureType.FLOAT_32_UNSIGNED_INT_24_8_REV; export { isFloatTexture, isGL2Context };