glslCanvas icon indicating copy to clipboard operation
glslCanvas copied to clipboard

Is it possible to draw vertex data (i.e. gl.drawArrays)?

Open hrbigelow opened this issue 3 years ago • 0 comments

Hi,

Is it possible to draw vertices? For instance, with this [vertex shader]](https://github.com/hrbigelow/wij-wemnan/blob/master/shaders/scatter-v.cc), I eventually call it with:

write_to_gl: function() {
      this.gl.bindBuffer(this.gl.ARRAY_BUFFER, this.glbuf);
      this.gl.bufferData(this.gl.ARRAY_BUFFER, this.jsbuf, this.gl.STATIC_DRAW);
      this.gl.bindBuffer(this.gl.ARRAY_BUFFER, null);
}

But I don't see any part of glslCanvas API that allows sending vertex data to it, is there?

Thanks!

hrbigelow avatar Jul 29 '21 03:07 hrbigelow