Merge code from Draw* and Draw*Instanced methods

This made me realise we weren't supporting OES_element_index_uint in the
ANGLE_instanced_arrays extension.
This commit is contained in:
Anthony Ramine 2018-08-02 22:54:39 +02:00
parent c5aaae7333
commit 04c81c5cc3
3 changed files with 30 additions and 128 deletions

View file

@ -201,8 +201,6 @@ pub enum WebGLCommand {
BindRenderbuffer(u32, Option<WebGLRenderbufferId>),
BindTexture(u32, Option<WebGLTextureId>),
DisableVertexAttribArray(u32),
DrawArrays(u32, i32, i32),
DrawElements(u32, i32, u32, i64),
EnableVertexAttribArray(u32),
FramebufferRenderbuffer(u32, u32, u32, Option<WebGLRenderbufferId>),
FramebufferTexture2D(u32, u32, u32, Option<WebGLTextureId>, i32),
@ -278,7 +276,9 @@ pub enum WebGLCommand {
GetTexParameterInt(u32, TexParameterInt, WebGLSender<i32>),
TexParameteri(u32, u32, i32),
TexParameterf(u32, u32, f32),
DrawArrays { mode: u32, first: i32, count: i32 },
DrawArraysInstanced { mode: u32, first: i32, count: i32, primcount: i32 },
DrawElements { mode: u32, count: i32, type_: u32, offset: u32 },
DrawElementsInstanced { mode: u32, count: i32, type_: u32, offset: u32, primcount: i32 },
VertexAttribDivisor { index: u32, divisor: u32 },
GetUniformBool(WebGLProgramId, i32, WebGLSender<bool>),