public void Draw() { var color = new Vector3(Color.R, Color.G, Color.B); Shader.SetUniform3("col", ref color); _vao.Bind(); GL.PolygonMode(MaterialFace.FrontAndBack, PolygonMode.Fill); GL.DrawArrays(PrimitiveType.Triangles, 0, _trianglesCount); _vao.Unbind(); TextureManager.Disable(); }
public void Draw() { if (VerticesCount <= 0) { return; } if (_vao == null) { throw new InvalidOperationException("Vao must be created before drawing"); } if (Material?.Texture != null) { Draw(Material.Texture); } else { _vao.Bind(); GL.PolygonMode(MaterialFace.FrontAndBack, PolygonMode.Fill); GL.DrawArrays(PrimitiveType.Triangles, 0, VerticesCount); } }
public void Draw() { if (VerticesCount <= 0) { return; } if (_vao == null) { throw new InvalidOperationException("Vao must be created before drawing"); } _vao.Bind(); GL.DrawArrays(PrimitiveType.Points, 0, VerticesCount); }