mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-27 23:55:46 +00:00
223c742648
Update X11 stack to use System.Windows.Forms.XPlatUI for its Display, Screen and RootWindow. Fixed mode setting for X11GLControl. Fixed X11 shutdown (was generating X11 errors). Added DeviceContext getter to WinWindowInfo. Made IWindowInfo disposable. Added documentation to many public methods. Worked around a Mono 1.2.4 bug with Handle creation on Windows.Forms.Control. Updated GL.BuildExtensionList to correctly parse GL_VERSION when in indirect rendering mode. Fixed crash errors in X11GLContext.CreateContext and X11GraphicsMode. Added a ref overload to Glx.ChooseVisual() IGraphicsContext.MakeCurrent now takes an IWindowInfo parameter. This allows the user to change to window is context is bound to (untested). Renamed XyzWindowInfo.Handle to XyzWindowInfo.WindowHandle.
70 lines
2.1 KiB
C#
70 lines
2.1 KiB
C#
#region --- License ---
|
|
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
|
* See license.txt for license info
|
|
*/
|
|
#endregion
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using OpenTK.Graphics;
|
|
|
|
namespace OpenTK.Platform
|
|
{
|
|
/// <summary>
|
|
/// An empty IGraphicsContext implementation to be used inside the Visual Studio designer.
|
|
/// This class supports OpenTK, and is not intended for use by OpenTK programs.
|
|
/// </summary>
|
|
internal sealed class DummyGLContext : IGraphicsContext
|
|
{
|
|
GraphicsMode format;
|
|
bool vsync;
|
|
|
|
#region --- Constructors ---
|
|
|
|
public DummyGLContext(GraphicsMode format) { this.format = format; }
|
|
|
|
#endregion
|
|
|
|
#region --- IGraphicsContext Members ---
|
|
|
|
public IntPtr Context { get { return IntPtr.Zero; } }
|
|
public GraphicsMode GraphicsMode { get { return format; } }
|
|
|
|
//public void CreateContext() { }
|
|
//public void CreateContext(bool direct) { }
|
|
public void CreateContext(bool direct, IGraphicsContext source) { }
|
|
|
|
public void SwapBuffers() { }
|
|
public void MakeCurrent(IWindowInfo info) { }
|
|
public bool IsCurrent { get { return true; } set { } }
|
|
public IntPtr GetCurrentContext() { return IntPtr.Zero; }
|
|
|
|
public event DestroyEvent<IGraphicsContext> Destroy;
|
|
void OnDestroy() { if (Destroy != null) Destroy(this, EventArgs.Empty); }
|
|
|
|
public void RegisterForDisposal(IDisposable resource)
|
|
{
|
|
throw new NotImplementedException("Use the general GraphicsContext class instead.");
|
|
}
|
|
|
|
public void DisposeResources()
|
|
{
|
|
throw new NotImplementedException("Use the general GraphicsContext class instead.");
|
|
}
|
|
|
|
public IntPtr GetAddress(string function) { return IntPtr.Zero; }
|
|
public IEnumerable<DisplayMode> GetDisplayModes() { return null; }
|
|
|
|
public bool VSync { get { return vsync; } set { vsync = value; } }
|
|
|
|
#endregion
|
|
|
|
#region --- IDisposable Members ---
|
|
|
|
public void Dispose() { }
|
|
|
|
#endregion
|
|
}
|
|
}
|