Unify framebuffer api naming.

This commit is contained in:
Paul Chote
2015-12-28 11:02:22 +00:00
parent 4372ed650e
commit e63fc00b76
9 changed files with 108 additions and 126 deletions

View File

@@ -9,6 +9,7 @@
#endregion
using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
using System.Text;
@@ -439,7 +440,18 @@ namespace OpenRA.Platforms.Default
throw new InvalidProgramException("OpenGL Version Error: See graphics.log for details.");
}
ErrorHandler.CheckGlError();
CheckGlError();
}
public static void CheckGLError()
{
var n = OpenGL.glGetError();
if (n != OpenGL.GL_NO_ERROR)
{
var error = "GL Error: {0}\n{1}".F(n, new StackTrace());
WriteGraphicsLog(error);
throw new InvalidOperationException("OpenGL Error: See graphics.log for details.");
}
}
public static void WriteGraphicsLog(string message)