UNPKG

@awayjs/stage

Version:
35 lines (34 loc) 1.13 kB
import { AbstractMethodError } from '@awayjs/core'; import { SamplerState } from '../base/SamplerState'; var TextureBaseWebGL = /** @class */ (function () { function TextureBaseWebGL(context) { this.textureType = ''; /* internal */ this._state = new SamplerState(); this._context = context; this._gl = context._gl; this._id = TextureBaseWebGL.TEXTURE_ID++; } Object.defineProperty(TextureBaseWebGL.prototype, "id", { get: function () { return this._id; }, enumerable: false, configurable: true }); TextureBaseWebGL.prototype.dispose = function () { this._gl.deleteTexture(this._glTexture); }; Object.defineProperty(TextureBaseWebGL.prototype, "glTexture", { get: function () { return this._glTexture; }, enumerable: false, configurable: true }); TextureBaseWebGL.prototype.generateMipmaps = function () { throw new AbstractMethodError(); }; TextureBaseWebGL.TEXTURE_ID = 0; return TextureBaseWebGL; }()); export { TextureBaseWebGL };