mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Store a reference to the WebGLRenderingContext in WebGLObject
This commit is contained in:
parent
8933a06eb8
commit
661e258b28
10 changed files with 231 additions and 233 deletions
|
@ -48,15 +48,7 @@ impl OESVertexArrayObjectMethods for OESVertexArrayObject {
|
|||
fn CreateVertexArrayOES(&self) -> Option<DomRoot<WebGLVertexArrayObjectOES>> {
|
||||
let (sender, receiver) = webgl_channel().unwrap();
|
||||
self.ctx.send_command(WebGLCommand::CreateVertexArray(sender));
|
||||
|
||||
let result = receiver.recv().unwrap();
|
||||
result.map(|vao_id| {
|
||||
WebGLVertexArrayObjectOES::new(
|
||||
&self.global(),
|
||||
vao_id,
|
||||
self.ctx.limits().max_vertex_attribs,
|
||||
)
|
||||
})
|
||||
receiver.recv().unwrap().map(|id| WebGLVertexArrayObjectOES::new(&self.ctx, id))
|
||||
}
|
||||
|
||||
// https://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue