{"size": 525, "ext": "js", "max_stars_repo_path": "node_modules/gl/src/javascript/webgl-texture.js", "max_stars_repo_name": "aaverty/editly", "max_stars_repo_stars_event_min_datetime": "2015-01-02T15:08:36.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-29T01:22:12.000Z", "max_issues_repo_path": "node_modules/gl/src/javascript/webgl-texture.js", "max_issues_repo_name": "aaverty/editly", "max_issues_repo_issues_event_min_datetime": "2015-01-22T00:02:27.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-27T02:51:09.000Z", "max_forks_repo_path": "node_modules/gl/src/javascript/webgl-texture.js", "max_forks_repo_name": "aaverty/editly", "max_forks_repo_forks_event_min_datetime": "2015-01-13T15:56:40.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-31T16:45:41.000Z"}
{"max_stars_count": 1429, "max_issues_count": 203, "max_forks_count": 183, "avg_line_length": 21.875, "max_line_length": 42, "alphanum_fraction": 0.6361904762}
const { Linkable } = require('./linkable')
const { gl } = require('./native-gl')

class WebGLTexture extends Linkable {
  constructor (_, ctx) {
    super(_)
    this._ctx = ctx
    this._binding = 0
    this._levelWidth = new Int32Array(32)
    this._levelHeight = new Int32Array(32)
    this._format = 0
    this._type = 0
    this._complete = true
  }

  _performDelete () {
    const ctx = this._ctx
    delete ctx._textures[this._ | 0]
    gl.deleteTexture.call(ctx, this._ | 0)
  }
}

module.exports = { WebGLTexture }
