Add initial support for WebGL2 uniform buffer functions

Adds initial support for the following WebGL2 calls:

- bindBufferBase
- bindBufferRange
- getUniformIndices
- getUniformBlockIndex
- getActiveUniforms
- getActiveUniformBlockParameter
- getActiveUniformBlockName
- uniformBlockBinding

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.16
This commit is contained in:
Mátyás Mustoha 2019-11-25 11:09:24 +01:00
parent f8c957dc1b
commit da94f8d0e7
33 changed files with 891 additions and 228 deletions

View file

@ -75,7 +75,13 @@ impl WebGLBuffer {
match usage {
WebGLRenderingContextConstants::STREAM_DRAW |
WebGLRenderingContextConstants::STATIC_DRAW |
WebGLRenderingContextConstants::DYNAMIC_DRAW => (),
WebGLRenderingContextConstants::DYNAMIC_DRAW |
WebGL2RenderingContextConstants::STATIC_READ |
WebGL2RenderingContextConstants::DYNAMIC_READ |
WebGL2RenderingContextConstants::STREAM_READ |
WebGL2RenderingContextConstants::STATIC_COPY |
WebGL2RenderingContextConstants::DYNAMIC_COPY |
WebGL2RenderingContextConstants::STREAM_COPY => (),
_ => return Err(WebGLError::InvalidEnum),
}