unsafe fn draw_elements_instanced_base_vertex(
&self,
_mode: u32,
_count: i32,
_element_type: u32,
_offset: i32,
_instance_count: i32,
_base_vertex: i32,
) {
panic!("Draw elements instanced base vertex is not supported");
}
I understand what draw instanced in OpenGL/WebGL is. I don't understand the above error (and how to work around it). Can someone explain what the above problem is with WebGL2 and how to route around it? (Rust on wasm32 on Chrome).
WebGL2 is a binding of OpenGL ES 3.0 into the web platform; glDrawElementsInstancedBaseVertex is part of OpenGL ES 3.2, and as such is not available in WebGL1 or WebGL2.
You'll need to write your code to use draw_elements_instanced instead of draw_elements_instanced_base_vertex, since you need to stick to APIs available in OpenGL 3.0.