Skip to content

Instantly share code, notes, and snippets.

Created Sep 24, 2021
What would you like to do?
check WebGL_multi_draw
import * as twgl from '';
const vs = `#version 300 es
#extension GL_ANGLE_multi_draw : require
uniform float foo;
uniform float moo;
void main() {
gl_Position = vec4(gl_DrawID, foo, moo, 1);
const fs = `#version 300 es
precision highp float;
out vec4 outColor;
void main()
outColor = vec4(0, 1, 0, 1);
const canvas = document.createElement('canvas');
const gl = canvas.getContext('webgl2');
const ext = gl.getExtension('WEBGL_multi_draw');
const programInfo = twgl.createProgramInfo(gl, [vs, fs]);
{"name":"check WebGL_multi_draw","settings":{},"filenames":["index.html","index.css","index.js"]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment