mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
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:
parent
c9909643a2
commit
2810c8d413
3 changed files with 21 additions and 62 deletions
|
@ -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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue