StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics
https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
935 B
39 lines
935 B
"use strict"
|
|
|
|
var bindAttribs = require("./do-bind.js")
|
|
|
|
function VAOEmulated(gl) {
|
|
this.gl = gl
|
|
this._elements = null
|
|
this._attributes = null
|
|
this._elementsType = gl.UNSIGNED_SHORT
|
|
}
|
|
|
|
VAOEmulated.prototype.bind = function() {
|
|
bindAttribs(this.gl, this._elements, this._attributes)
|
|
}
|
|
|
|
VAOEmulated.prototype.update = function(attributes, elements, elementsType) {
|
|
this._elements = elements
|
|
this._attributes = attributes
|
|
this._elementsType = elementsType || this.gl.UNSIGNED_SHORT
|
|
}
|
|
|
|
VAOEmulated.prototype.dispose = function() { }
|
|
VAOEmulated.prototype.unbind = function() { }
|
|
|
|
VAOEmulated.prototype.draw = function(mode, count, offset) {
|
|
offset = offset || 0
|
|
var gl = this.gl
|
|
if(this._elements) {
|
|
gl.drawElements(mode, count, this._elementsType, offset)
|
|
} else {
|
|
gl.drawArrays(mode, offset, count)
|
|
}
|
|
}
|
|
|
|
function createVAOEmulated(gl) {
|
|
return new VAOEmulated(gl)
|
|
}
|
|
|
|
module.exports = createVAOEmulated |