Updated to work with the new bindings.
This commit is contained in:
parent
df733c7719
commit
484cf71cb0
1 changed files with 23 additions and 22 deletions
|
@ -13,38 +13,39 @@ using OpenTK.Platform;
|
||||||
using OpenTK.Input;
|
using OpenTK.Input;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using OpenTK.OpenGL;
|
using OpenTK.OpenGL;
|
||||||
|
using OpenTK.OpenGL.Enums;
|
||||||
|
|
||||||
namespace OpenTK
|
namespace OpenTK
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The GameWindow class contains cross-platform methods to create and render on an OpenGL
|
/// The GameWindow class contains cross-platform methods to create and render on an OpenGL
|
||||||
/// window, handle input and load resources.
|
/// window, handle input and load resources.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// GameWindow contains several events you can hook or override to add your custom logic:
|
/// GameWindow contains several events you can hook or override to add your custom logic:
|
||||||
/// <list>
|
/// <list>
|
||||||
/// <item>
|
/// <item>
|
||||||
/// OnLoad: Occurs after creating the OpenGL context, but before entering the main loop.
|
/// OnLoad: Occurs after creating the OpenGL context, but before entering the main loop.
|
||||||
/// Override to load resources.
|
/// Override to load resources.
|
||||||
/// </item>
|
/// </item>
|
||||||
/// <item>
|
/// <item>
|
||||||
/// OnUnload: Occurs after exiting the main loop, but before deleting the OpenGL context.
|
/// OnUnload: Occurs after exiting the main loop, but before deleting the OpenGL context.
|
||||||
/// Override to unload resources.
|
/// Override to unload resources.
|
||||||
/// </item>
|
/// </item>
|
||||||
/// <item>
|
/// <item>
|
||||||
/// OnResize: Occurs whenever GameWindow is resized. You should update the OpenGL Viewport
|
/// OnResize: Occurs whenever GameWindow is resized. You should update the OpenGL Viewport
|
||||||
/// and Projection Matrix here.
|
/// and Projection Matrix here.
|
||||||
/// </item>
|
/// </item>
|
||||||
/// <item>
|
/// <item>
|
||||||
/// OnUpdateFrame: Occurs at the specified logic update rate. Override to add your game
|
/// OnUpdateFrame: Occurs at the specified logic update rate. Override to add your game
|
||||||
/// logic.
|
/// logic.
|
||||||
/// </item>
|
/// </item>
|
||||||
/// <item>
|
/// <item>
|
||||||
/// OnRenderFrame: Occurs at the specified frame render rate. Override to add your
|
/// OnRenderFrame: Occurs at the specified frame render rate. Override to add your
|
||||||
/// rendering code.
|
/// rendering code.
|
||||||
/// </item>
|
/// </item>
|
||||||
/// </list>
|
/// </list>
|
||||||
/// Call the Run() method to start the application's main loop. Run(double, double) takes two
|
/// Call the Run() method to start the application's main loop. Run(double, double) takes two
|
||||||
/// parameters that
|
/// parameters that
|
||||||
/// specify the logic update rate, and the render update rate.
|
/// specify the logic update rate, and the render update rate.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
|
@ -86,7 +87,7 @@ namespace OpenTK
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a new GameWindow using a safe DisplayMode.
|
/// Constructs a new GameWindow using a safe DisplayMode.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public GameWindow() : this(new DisplayMode(640, 480, 0, 16, false), "OpenTK game window")
|
public GameWindow() : this(new DisplayMode(640, 480, 0, 16, false), "OpenTK game window")
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -96,7 +97,7 @@ namespace OpenTK
|
||||||
public GameWindow(DisplayMode mode) : this(mode, "OpenTK game window") { }
|
public GameWindow(DisplayMode mode) : this(mode, "OpenTK game window") { }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a new GameWindow with the specified title, and opens a render window with the
|
/// Constructs a new GameWindow with the specified title, and opens a render window with the
|
||||||
/// specified DisplayMode.
|
/// specified DisplayMode.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="mode">The DisplayMode of the GameWindow.</param>
|
/// <param name="mode">The DisplayMode of the GameWindow.</param>
|
||||||
|
@ -721,9 +722,9 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.WriteLine(String.Format("OpenGL driver information: {0}, {1}, {2}",
|
Debug.WriteLine(String.Format("OpenGL driver information: {0}, {1}, {2}",
|
||||||
GL.GetString(GL.Enums.StringName.RENDERER),
|
GL.GetString(StringName.Renderer),
|
||||||
GL.GetString(GL.Enums.StringName.VENDOR),
|
GL.GetString(StringName.Vendor),
|
||||||
GL.GetString(GL.Enums.StringName.VERSION)));
|
GL.GetString(StringName.Version)));
|
||||||
|
|
||||||
if (this.Load != null)
|
if (this.Load != null)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue