test feedback check ‣
Error: expected: /fbPrg/, actual:
at assertStringMatchesREs (https://greggman.github.io/webgl-lint/test/assert.js:147:15)
at assertThrowsWith (https://greggman.github.io/webgl-lint/test/assert.js:71:3)
at Context.<anonymous> (https://greggman.github.io/webgl-lint/test/tests/framebuffer-feedback-tests.js:39:5)
at callFn (https://greggman.github.io/webgl-lint/test/mocha.js:13124:23)
at Runnable$3.run (https://greggman.github.io/webgl-lint/test/mocha.js:13112:7)
at Runner.runTest (https://greggman.github.io/webgl-lint/test/mocha.js:14657:12)
at https://greggman.github.io/webgl-lint/test/mocha.js:14780:14
at next (https://greggman.github.io/webgl-lint/test/mocha.js:14572:16)
at https://greggman.github.io/webgl-lint/test/mocha.js:14582:9
at next (https://greggman.github.io/webgl-lint/test/mocha.js:14465:16)
const {gl, tagObject} = createContext();
const vs = `
void main() {
gl_Position = vec4(0, 0, 0, 1);
gl_PointSize = 100.0;
}
`;
const fs = `
precision mediump float;
uniform sampler2D u_diffuse;
void main() {
gl_FragColor = texture2D(u_diffuse, vec2(0));
}
`;
const prg = twgl.createProgram(gl, [vs, fs]);
tagObject(prg, 'fbPrg');
const tex = gl.createTexture();
tagObject(tex, 'fbTex');
gl.bindTexture(gl.TEXTURE_2D, tex);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
const fb = gl.createFramebuffer();
tagObject(fb, 'fbTest');
gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex, 0);
gl.useProgram(prg);
assertThrowsWith(() => {
gl.drawArrays(gl.POINTS, 0, 1);
}, [/fbPrg/, /fbTex/, /fbTest/, /u_diffuse/, /COLOR_ATTACHMENT0/]);