Add support for WebGL2 framebuffer invalidation

Adds support for the `invalidateFramebuffer` and `invalideSubFramebuffer`
WebGL2 calls.

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.4
This commit is contained in:
Mátyás Mustoha 2020-02-14 13:14:07 +01:00
parent d42835b238
commit cc07d930c8
10 changed files with 127 additions and 148 deletions

View file

@ -1968,6 +1968,12 @@ impl WebGLImpl {
WebGLCommand::ClearBufferfi(buffer, draw_buffer, depth, stencil) => {
gl.clear_buffer_fi(buffer, draw_buffer, depth, stencil)
},
WebGLCommand::InvalidateFramebuffer(target, ref attachments) => {
gl.invalidate_framebuffer(target, attachments)
},
WebGLCommand::InvalidateSubFramebuffer(target, ref attachments, x, y, w, h) => {
gl.invalidate_sub_framebuffer(target, attachments, x, y, w, h)
},
}
// If debug asertions are enabled, then check the error state.