- Started Windows, Metro and Linux Platform-Plugins - Moved the RecordingSample to the Samples folder - Started two samples for using the graphics device in a WinForms and Wpf Editor - Refactorings in the AddIn-System - Moved the Window initialization-code to the Platform modules - Changed the License text in all code files which is now way smaller - Started ProjectConverter tool which converts all the projects and solution to the target configuration - Changed the SupportedPlatform names in the Resource files - Changed the WIN8 define to WINDOWSMETRO which is actually meant - Removed NLog and started our own Logger class - Many more stuff...
31 lines
765 B
C#
31 lines
765 B
C#
using System.Diagnostics;
|
|
using System.Reflection;
|
|
using ANX.Framework.NonXNA;
|
|
using OpenTK.Graphics.OpenGL;
|
|
|
|
namespace ANX.RenderSystem.Windows.GL3
|
|
{
|
|
internal static class ErrorHelper
|
|
{
|
|
public static void Check(string extraInformation = "")
|
|
{
|
|
ErrorCode code = GL.GetError();
|
|
if (code != ErrorCode.NoError)
|
|
{
|
|
string frameInfo = "";
|
|
foreach (StackFrame frame in new StackTrace().GetFrames())
|
|
{
|
|
MethodBase method = frame.GetMethod();
|
|
frameInfo += "\n\t" + "at " + method.DeclaringType + "." +
|
|
method + ":" + frame.GetFileLineNumber();
|
|
}
|
|
|
|
string message = "OpenGL Error '" + code + "' Checked at: '" +
|
|
extraInformation + "'" + frameInfo;
|
|
|
|
Logger.Info(message);
|
|
}
|
|
}
|
|
}
|
|
}
|