Exemplo n.º 1
0
 public void EnqueueDrawCalls(GLDrawCallBatch drawCallbatch)
 {
     if (_vertexArrayObject == null)
     {
         _vertexArrayObject = new GLVertexArrayObject(_glMesh, _textMaterial.Program);
         _vertexArrayObject.GpuAllocateDeferred();
     }
     drawCallbatch.AddDrawCall(new GLDrawCall(
                                   _textMaterial.Program,
                                   _textMaterial.GenerateTexturebinds(),
                                   _vertexArrayObject,
                                   _textMaterial.GenerateUniformBinds(Transform.GetWorldMatrix()),
                                   () =>
                                   GL.DrawElements(PrimitiveType.Triangles, _glMesh.IndexBuffer.BufferCount, DrawElementsType.UnsignedInt,
                                                   IntPtr.Zero)));
 }