2 <meta http-equiv=
"content-type" content=
"text/html; charset=utf-8" />
4 <title>WebGL2 test: Framebuffers
</title>
6 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
7 <link rel=
"stylesheet" href=
"/tests/SimpleTest/test.css">
8 <script src=
"driver-info.js"></script>
9 <script src=
"webgl-util.js"></script>
11 <canvas id=
"c" width=
"64" height=
"64"></canvas>
14 WebGLUtil
.withWebGL2('c', function (gl
) {
15 gl
.invalidateFramebuffer(gl
.FRAMEBUFFER
, [gl
.COLOR
]);
16 ok(gl
.getError() == 0, 'invalidateFramebuffer');
17 gl
.invalidateSubFramebuffer(gl
.FRAMEBUFFER
, [gl
.COLOR
], 0, 0, 64, 64);
18 ok(gl
.getError() == 0, 'invalidateSubFramebuffer');
19 gl
.invalidateFramebuffer(gl
.FRAMEBUFFER
, [gl
.GL_COLOR_ATTACHMENT0
]);
20 ok(gl
.getError() == gl
.INVALID_ENUM
, 'invalidateFrameBuffer should fail with GL_COLOR_ATTACHMENT on the default framebuffer');
25 SimpleTest
.waitForExplicitFinish();