Exemple #1
0
        protected void Dispose(bool disposing)
        {
            if (mDisposed)
            {
                return;
            }

            if (disposing)
            {
                PositionBuffer?.Dispose();
                NormalBuffer?.Dispose();
                TangentBuffer?.Dispose();
                TexCoord0Buffer?.Dispose();
                TexCoord1Buffer?.Dispose();
                Color0Buffer?.Dispose();

                foreach (var subMesh in SubMeshes)
                {
                    subMesh.Dispose();
                }
            }

            GL.DeleteVertexArray(VertexArrayId);
            GL.Finish();

            mDisposed = true;
        }
Exemple #2
0
        protected void Dispose(bool disposing)
        {
            if (disposing)
            {
                PositionBuffer?.Dispose();
                NormalBuffer?.Dispose();
                TangentBuffer?.Dispose();
                TexCoord1Buffer?.Dispose();
                TexCoord2Buffer?.Dispose();
                ColorBuffer?.Dispose();

                foreach (var indexTable in SubMeshes)
                {
                    indexTable.Dispose();
                }
            }

            GL.DeleteVertexArray(VertexArrayId);
        }