Marked all IPlatformFactory interface implementations as virtual.

This commit is contained in:
the_fiddler 2009-07-24 21:52:01 +00:00
parent dc94314e3a
commit a3f61f6d65
5 changed files with 32 additions and 27 deletions

View file

@ -33,7 +33,7 @@ namespace OpenTK.Platform
{
using Graphics;
class Factory : IPlatformFactory
sealed class Factory : IPlatformFactory
{
#region Fields
@ -125,7 +125,12 @@ namespace OpenTK.Platform
throw new PlatformNotSupportedException(error_string);
}
public IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, bool DirectRendering, int major, int minor, GraphicsContextFlags flags)
public IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags)
{
throw new PlatformNotSupportedException(error_string);
}
public IGraphicsContext CreateESContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, int major, int minor, GraphicsContextFlags flags)
{
throw new PlatformNotSupportedException(error_string);
}

View file

@ -41,7 +41,7 @@ namespace OpenTK.Platform
IDisplayDeviceDriver CreateDisplayDeviceDriver();
IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, bool DirectRendering, int major, int minor, GraphicsContextFlags flags);
IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags);
OpenTK.Graphics.GraphicsContext.GetCurrentContextDelegate CreateGetCurrentGraphicsContext();

View file

@ -37,27 +37,27 @@ namespace OpenTK.Platform.MacOS
{
#region IPlatformFactory Members
public INativeWindow CreateNativeWindow(int x, int y, int width, int height, string title, GraphicsMode mode, GameWindowFlags options, DisplayDevice device)
public virtual INativeWindow CreateNativeWindow(int x, int y, int width, int height, string title, GraphicsMode mode, GameWindowFlags options, DisplayDevice device)
{
return new CarbonGLNative(x, y, width, height, title, mode, options, device);
}
public IGLControl CreateGLControl(GraphicsMode mode, GLControl owner)
public virtual IGLControl CreateGLControl(GraphicsMode mode, GLControl owner)
{
return new CarbonGLControl(mode, owner);
}
public IDisplayDeviceDriver CreateDisplayDeviceDriver()
public virtual IDisplayDeviceDriver CreateDisplayDeviceDriver()
{
return new QuartzDisplayDeviceDriver();
}
public IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, bool DirectRendering, int major, int minor, GraphicsContextFlags flags)
public virtual IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags)
{
return new AglContext(mode, window, shareContext);
}
public GraphicsContext.GetCurrentContextDelegate CreateGetCurrentGraphicsContext()
public virtual GraphicsContext.GetCurrentContextDelegate CreateGetCurrentGraphicsContext()
{
return (GraphicsContext.GetCurrentContextDelegate)delegate
{
@ -65,12 +65,12 @@ namespace OpenTK.Platform.MacOS
};
}
public IGraphicsMode CreateGraphicsMode()
public virtual IGraphicsMode CreateGraphicsMode()
{
return new MacOSGraphicsMode();
}
public OpenTK.Input.IKeyboardDriver CreateKeyboardDriver()
public virtual OpenTK.Input.IKeyboardDriver CreateKeyboardDriver()
{
throw new NotImplementedException();
}

View file

@ -32,33 +32,33 @@ using System.Text;
namespace OpenTK.Platform.Windows
{
using Graphics;
using OpenTK.Input;
using OpenTK.Input;
class WinFactory : IPlatformFactory
{
#region IPlatformFactory Members
public INativeWindow CreateNativeWindow(int x, int y, int width, int height, string title, GraphicsMode mode, GameWindowFlags options, DisplayDevice device)
public virtual INativeWindow CreateNativeWindow(int x, int y, int width, int height, string title, GraphicsMode mode, GameWindowFlags options, DisplayDevice device)
{
return new WinGLNative(x, y, width, height, title, options, device);
}
public IGLControl CreateGLControl(GraphicsMode mode, GLControl owner)
public virtual IGLControl CreateGLControl(GraphicsMode mode, GLControl owner)
{
return new WinGLControl(mode, owner);
}
public IDisplayDeviceDriver CreateDisplayDeviceDriver()
public virtual IDisplayDeviceDriver CreateDisplayDeviceDriver()
{
return new WinDisplayDeviceDriver();
}
public IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags)
public virtual IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags)
{
return new WinGLContext(mode, (WinWindowInfo)window, shareContext, major, minor, flags);
}
public GraphicsContext.GetCurrentContextDelegate CreateGetCurrentGraphicsContext()
public virtual GraphicsContext.GetCurrentContextDelegate CreateGetCurrentGraphicsContext()
{
return (GraphicsContext.GetCurrentContextDelegate)delegate
{
@ -66,12 +66,12 @@ using OpenTK.Input;
};
}
public IGraphicsMode CreateGraphicsMode()
public virtual IGraphicsMode CreateGraphicsMode()
{
return new WinGraphicsMode();
}
public OpenTK.Input.IKeyboardDriver CreateKeyboardDriver()
public virtual OpenTK.Input.IKeyboardDriver CreateKeyboardDriver()
{
throw new NotImplementedException();
}

View file

@ -10,27 +10,27 @@ namespace OpenTK.Platform.X11
{
#region IPlatformFactory Members
public INativeWindow CreateNativeWindow(int x, int y, int width, int height, string title, GraphicsMode mode, GameWindowFlags options, DisplayDevice device)
public virtual INativeWindow CreateNativeWindow(int x, int y, int width, int height, string title, GraphicsMode mode, GameWindowFlags options, DisplayDevice device)
{
return new X11GLNative(x, y, width, height, title, mode, options, device);
}
public IGLControl CreateGLControl(GraphicsMode mode, GLControl owner)
public virtual IGLControl CreateGLControl(GraphicsMode mode, GLControl owner)
{
return new X11GLControl(mode, owner);
}
public IDisplayDeviceDriver CreateDisplayDeviceDriver()
public virtual IDisplayDeviceDriver CreateDisplayDeviceDriver()
{
return new X11XrandrDisplayDevice();
}
public IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, bool DirectRendering, int major, int minor, GraphicsContextFlags flags)
public virtual IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags)
{
return new X11GLContext(mode, window, shareContext, DirectRendering, major, minor, flags);
return new X11GLContext(mode, window, shareContext, directRendering, major, minor, flags);
}
public OpenTK.Graphics.GraphicsContext.GetCurrentContextDelegate CreateGetCurrentGraphicsContext()
public virtual OpenTK.Graphics.GraphicsContext.GetCurrentContextDelegate CreateGetCurrentGraphicsContext()
{
return (GraphicsContext.GetCurrentContextDelegate)delegate
{
@ -38,12 +38,12 @@ namespace OpenTK.Platform.X11
};
}
public IGraphicsMode CreateGraphicsMode()
public virtual IGraphicsMode CreateGraphicsMode()
{
return new X11GraphicsMode();
}
public OpenTK.Input.IKeyboardDriver CreateKeyboardDriver()
public virtual OpenTK.Input.IKeyboardDriver CreateKeyboardDriver()
{
throw new NotImplementedException();
}