コード例 #1
0
ファイル: Mesh.cs プロジェクト: Entrivax/42run
 public void Draw()
 {
     if (Material?.Texture != null)
     {
         Draw(Material.Texture);
     }
     else
     {
         _vao.Bind();
         GL.PolygonMode(MaterialFace.FrontAndBack, PolygonMode.Fill);
         GL.DrawArrays(PrimitiveType.Triangles, 0, VerticesCount);
     }
 }
コード例 #2
0
        public void Draw()
        {
            var color = new Vector3(Color.R, Color.G, Color.B);

            Shader.SetUniform3("col", ref color);
            TextureManager.Use(Font.Texture);
            _vao.Bind();
            GL.PolygonMode(MaterialFace.Front, PolygonMode.Fill);
            GL.DrawArrays(PrimitiveType.Triangles, 0, _trianglesCount);
            _vao.Unbind();
            TextureManager.Disable();
        }