2008-01-24 09:13:50 +00:00
|
|
|
|
#region --- License ---
|
|
|
|
|
/* Licensed under the MIT/X11 license.
|
|
|
|
|
* Copyright (c) 2006-2008 the OpenTK team.
|
|
|
|
|
* This notice may not be removed.
|
|
|
|
|
* See license.txt for licensing detailed licensing details.
|
|
|
|
|
*/
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace OpenTK.Graphics
|
|
|
|
|
{
|
|
|
|
|
/// <summary>Represents errors related to unavailable graphics parameters..</summary>
|
|
|
|
|
public class GraphicsModeException : Exception
|
|
|
|
|
{
|
2008-11-20 22:24:11 +00:00
|
|
|
|
/// <summary>Constructs a new GraphicsModeException.</summary>
|
2008-01-24 09:13:50 +00:00
|
|
|
|
public GraphicsModeException() : base() { }
|
2008-11-20 22:24:11 +00:00
|
|
|
|
/// <summary>Constructs a new GraphicsModeException with the given error message.</summary>
|
2008-01-24 09:13:50 +00:00
|
|
|
|
public GraphicsModeException(string message) : base(message) { }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>Represents errors related to a GraphicsContext.</summary>
|
|
|
|
|
public class GraphicsContextException : Exception
|
|
|
|
|
{
|
2008-11-20 22:24:11 +00:00
|
|
|
|
/// <summary>Constructs a new GraphicsContextException.</summary>
|
2008-01-24 09:13:50 +00:00
|
|
|
|
public GraphicsContextException() : base() { }
|
2008-11-20 22:24:11 +00:00
|
|
|
|
/// <summary>Constructs a new GraphicsContextException with the given error message..</summary>
|
2008-01-24 09:13:50 +00:00
|
|
|
|
public GraphicsContextException(string message) : base(message) { }
|
|
|
|
|
}
|
2008-11-20 22:24:11 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Thrown when an operation that required GraphicsContext is performed, when no
|
|
|
|
|
/// GraphicsContext is current in the calling thread.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class GraphicsContextMissingException : GraphicsContextException
|
|
|
|
|
{
|
|
|
|
|
/// <summary>Constructs a new GraphicsContextMissingException.</summary>
|
|
|
|
|
public GraphicsContextMissingException()
|
|
|
|
|
: base(String.Format(
|
|
|
|
|
"No context is current in the calling thread (ThreadId: {0}).",
|
|
|
|
|
System.Threading.Thread.CurrentThread.ManagedThreadId))
|
|
|
|
|
{ }
|
|
|
|
|
}
|
2008-01-24 09:13:50 +00:00
|
|
|
|
}
|