Add support for WebGL2 buffer types in GetBufferParameter

This makes the new buffer types introduced in WebGL2 usable by the
GetBufferParameter call.
This commit is contained in:
Mátyás Mustoha 2020-04-28 13:12:06 +02:00
parent c9909643a2
commit 2810c8d413
3 changed files with 21 additions and 62 deletions

View file

@ -867,8 +867,10 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
}
/// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.5
fn GetBufferParameter(&self, cx: JSContext, target: u32, parameter: u32) -> JSVal {
self.base.GetBufferParameter(cx, target, parameter)
fn GetBufferParameter(&self, _cx: JSContext, target: u32, parameter: u32) -> JSVal {
let buffer =
handle_potential_webgl_error!(self.base, self.bound_buffer(target), return NullValue());
self.base.get_buffer_param(buffer, parameter)
}
#[allow(unsafe_code)]