mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-19 07:51:26 +00:00
examples(webgl): run rustfmt
This commit is contained in:
@ -57,18 +57,17 @@ pub fn draw() {
|
|||||||
Some(&vert_array.buffer()),
|
Some(&vert_array.buffer()),
|
||||||
WebGlRenderingContext::STATIC_DRAW,
|
WebGlRenderingContext::STATIC_DRAW,
|
||||||
);
|
);
|
||||||
context.vertex_attrib_pointer_with_i32(0,
|
context.vertex_attrib_pointer_with_i32(0, 3, WebGlRenderingContext::FLOAT, false, 0, 0);
|
||||||
3,
|
|
||||||
WebGlRenderingContext::FLOAT,
|
|
||||||
false,
|
|
||||||
0,
|
|
||||||
0);
|
|
||||||
context.enable_vertex_attrib_array(0);
|
context.enable_vertex_attrib_array(0);
|
||||||
|
|
||||||
context.clear_color(0.0, 0.0, 0.0, 1.0);
|
context.clear_color(0.0, 0.0, 0.0, 1.0);
|
||||||
context.clear(WebGlRenderingContext::COLOR_BUFFER_BIT);
|
context.clear(WebGlRenderingContext::COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
context.draw_arrays(WebGlRenderingContext::TRIANGLES, 0, (vertices.len() / 3) as i32);
|
context.draw_arrays(
|
||||||
|
WebGlRenderingContext::TRIANGLES,
|
||||||
|
0,
|
||||||
|
(vertices.len() / 3) as i32,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn compile_shader(
|
pub fn compile_shader(
|
||||||
|
Reference in New Issue
Block a user