public unsafe void Submit(byte viewId, Program program, Matrix4x4 *transform, RenderStateGroup renderStateGroup, IUniformGroup uniforms, Texture texture, Uniform textureSampler) { foreach (var group in groups) { if (uniforms != null) { uniforms.SubmitPerDrawUniforms(); } if (texture != null) { Bgfx.SetTexture(0, textureSampler, texture); } Bgfx.SetTransform((float *)transform); Bgfx.SetIndexBuffer(group.IndexBuffer); Bgfx.SetVertexBuffer(0, group.VertexBuffer); Bgfx.SetRenderState(renderStateGroup.State, (int)renderStateGroup.BlendFactorRgba); Bgfx.SetStencil(renderStateGroup.FrontFace, renderStateGroup.BackFace); Bgfx.Submit(viewId, program); } }
public unsafe void Submit(byte viewId, Program program, Matrix4x4 *transform, RenderStateGroup renderStateGroup, IUniformGroup uniforms) { Submit(viewId, program, transform, renderStateGroup, uniforms, null, default(Uniform)); }