mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 12:15:37 +00:00
Added DummyGLContext.cs amd DummyGLControl.cs drivers.
This commit is contained in:
parent
6ddd024fbf
commit
7403987e5c
42
Source/OpenTK/Platform/DummyGLContext.cs
Normal file
42
Source/OpenTK/Platform/DummyGLContext.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenTK.Platform
|
||||
{
|
||||
/// <summary>
|
||||
/// A dummy GLContext to be used inside the Visual Studio designer.
|
||||
/// </summary>
|
||||
internal class DummyGLContext : IGLContext
|
||||
{
|
||||
#region --- IGLContext Members ---
|
||||
|
||||
public void SwapBuffers()
|
||||
{
|
||||
}
|
||||
|
||||
public void MakeCurrent()
|
||||
{
|
||||
}
|
||||
|
||||
public IntPtr GetAddress(string function)
|
||||
{
|
||||
return IntPtr.Zero;
|
||||
}
|
||||
|
||||
public IEnumerable<DisplayMode> GetDisplayModes()
|
||||
{
|
||||
throw new Exception("The method or operation is not implemented.");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region --- IDisposable Members ---
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
47
Source/OpenTK/Platform/DummyGLControl.cs
Normal file
47
Source/OpenTK/Platform/DummyGLControl.cs
Normal file
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenTK.Platform
|
||||
{
|
||||
/// <summary>
|
||||
/// A dummy GLControl to be used inside the Visual Studio designer.
|
||||
/// </summary>
|
||||
internal class DummyGLControl : IGLControl
|
||||
{
|
||||
bool fullscreen;
|
||||
IGLContext glContext = new DummyGLContext();
|
||||
|
||||
#region --- IGLControl Members ---
|
||||
|
||||
public bool IsIdle
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Fullscreen
|
||||
{
|
||||
get
|
||||
{
|
||||
return fullscreen;
|
||||
}
|
||||
set
|
||||
{
|
||||
fullscreen = value;
|
||||
}
|
||||
}
|
||||
|
||||
public IGLContext Context
|
||||
{
|
||||
get
|
||||
{
|
||||
return glContext;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue