{"version":3,"file":"GlTexture.mjs","sources":["../../../../../src/rendering/renderers/gl/texture/GlTexture.ts"],"sourcesContent":["import { type GPUData } from '../../../../scene/view/ViewContainer';\nimport { GL_FORMATS, GL_TARGETS, GL_TYPES } from './const';\n\n/**\n * Internal texture for WebGL context\n * @category rendering\n * @ignore\n */\nexport class GlTexture implements GPUData\n{\n    public target: GL_TARGETS = GL_TARGETS.TEXTURE_2D;\n\n    /** The WebGL texture. */\n    public texture: WebGLTexture;\n\n    /**\n     * Bitmask tracking which array layers / sub-targets have been initialized at mip level 0.\n     * Used by uploaders that need per-layer allocation semantics (e.g. cube faces).\n     * @internal\n     */\n    public _layerInitMask = 0;\n\n    /** Width of texture that was used in texImage2D. */\n    public width: number;\n\n    /** Height of texture that was used in texImage2D. */\n    public height: number;\n\n    /** Whether mip levels has to be generated. */\n    public mipmap: boolean;\n\n    /** Type copied from texture source. */\n    public type: number;\n\n    /** Type copied from texture source. */\n    public internalFormat: number;\n\n    /** Type of sampler corresponding to this texture. See {@link SAMPLER_TYPES} */\n    public samplerType: number;\n\n    public format: GL_FORMATS;\n\n    constructor(texture: WebGLTexture)\n    {\n        this.texture = texture;\n        this.width = -1;\n        this.height = -1;\n        this.type = GL_TYPES.UNSIGNED_BYTE;\n        this.internalFormat = GL_FORMATS.RGBA;\n        this.format = GL_FORMATS.RGBA;\n        this.samplerType = 0;\n    }\n\n    public destroy(): void\n    {\n        // BOOM\n    }\n}\n"],"names":[],"mappings":";;;AAQO,MAAM,SAAA,CACb;AAAA,EAiCI,YAAY,OAAA,EACZ;AAjCA,IAAA,IAAA,CAAO,SAAqB,UAAA,CAAW,UAAA;AAUvC;AAAA;AAAA;AAAA;AAAA;AAAA,IAAA,IAAA,CAAO,cAAA,GAAiB,CAAA;AAwBpB,IAAA,IAAA,CAAK,OAAA,GAAU,OAAA;AACf,IAAA,IAAA,CAAK,KAAA,GAAQ,CAAA,CAAA;AACb,IAAA,IAAA,CAAK,MAAA,GAAS,CAAA,CAAA;AACd,IAAA,IAAA,CAAK,OAAO,QAAA,CAAS,aAAA;AACrB,IAAA,IAAA,CAAK,iBAAiB,UAAA,CAAW,IAAA;AACjC,IAAA,IAAA,CAAK,SAAS,UAAA,CAAW,IAAA;AACzB,IAAA,IAAA,CAAK,WAAA,GAAc,CAAA;AAAA,EACvB;AAAA,EAEO,OAAA,GACP;AAAA,EAEA;AACJ;;;;"}