remove unused vsync parameter from renderers

This commit is contained in:
Chris Forbes
2011-07-12 22:22:03 +12:00
parent df1201b4c2
commit b0ccc58516
5 changed files with 13 additions and 13 deletions

View File

@@ -29,7 +29,7 @@ namespace OpenRA.FileFormats.Graphics
public interface IDeviceFactory
{
IGraphicsDevice Create( Size size, WindowMode windowMode, bool vsync );
IGraphicsDevice Create( Size size, WindowMode windowMode );
}
public interface IGraphicsDevice

View File

@@ -125,7 +125,7 @@ namespace OpenRA.Graphics
FixOSX();
var resolution = GetResolution( windowMode );
var rendererPath = Path.GetFullPath( "OpenRA.Renderer.{0}.dll".F(Game.Settings.Graphics.Renderer) );
device = CreateDevice( Assembly.LoadFile( rendererPath ), resolution.Width, resolution.Height, windowMode, false );
device = CreateDevice( Assembly.LoadFile( rendererPath ), resolution.Width, resolution.Height, windowMode );
}
static Size GetResolution(WindowMode windowmode)
@@ -136,12 +136,12 @@ namespace OpenRA.Graphics
return new Size(size.X, size.Y);
}
static IGraphicsDevice CreateDevice( Assembly rendererDll, int width, int height, WindowMode window, bool vsync )
static IGraphicsDevice CreateDevice( Assembly rendererDll, int width, int height, WindowMode window )
{
foreach( RendererAttribute r in rendererDll.GetCustomAttributes( typeof( RendererAttribute ), false ) )
{
var factory = (IDeviceFactory) r.Type.GetConstructor( Type.EmptyTypes ).Invoke( null );
return factory.Create( new Size( width, height ), window, vsync );
return factory.Create( new Size( width, height ), window );
}
throw new InvalidOperationException("Renderer DLL is missing RendererAttribute to tell us what type to use!");

View File

@@ -24,9 +24,9 @@ namespace OpenRA.Renderer.Cg
{
public class DeviceFactory : IDeviceFactory
{
public IGraphicsDevice Create(Size size, WindowMode windowMode, bool vsync)
public IGraphicsDevice Create(Size size, WindowMode windowMode)
{
return new GraphicsDevice( size, windowMode, vsync );
return new GraphicsDevice( size, windowMode );
}
}
@@ -85,7 +85,7 @@ namespace OpenRA.Renderer.Cg
throw new InvalidOperationException("CG Error. See graphics.log for details");
};
public GraphicsDevice( Size size, WindowMode window, bool vsync )
public GraphicsDevice( Size size, WindowMode window )
{
Console.WriteLine("Using Cg renderer");
Sdl.SDL_Init( Sdl.SDL_INIT_NOPARACHUTE | Sdl.SDL_INIT_VIDEO );

View File

@@ -25,9 +25,9 @@ namespace OpenRA.Renderer.Glsl
{
public class DeviceFactory : IDeviceFactory
{
public IGraphicsDevice Create(Size size, WindowMode windowMode, bool vsync)
public IGraphicsDevice Create(Size size, WindowMode windowMode)
{
return new GraphicsDevice( size, windowMode, vsync );
return new GraphicsDevice( size, windowMode );
}
}
@@ -38,7 +38,7 @@ namespace OpenRA.Renderer.Glsl
public Size WindowSize { get { return windowSize; } }
public GraphicsDevice( Size size, WindowMode window, bool vsync )
public GraphicsDevice( Size size, WindowMode window )
{
Console.WriteLine("Using Gl renderer");
Sdl.SDL_Init( Sdl.SDL_INIT_NOPARACHUTE | Sdl.SDL_INIT_VIDEO );

View File

@@ -19,9 +19,9 @@ namespace OpenRA.Renderer.Null
{
public class DeviceFactory : IDeviceFactory
{
public IGraphicsDevice Create(Size size, WindowMode windowMode, bool vsync)
public IGraphicsDevice Create(Size size, WindowMode windowMode)
{
return new NullGraphicsDevice( size, windowMode, vsync );
return new NullGraphicsDevice( size, windowMode );
}
}
@@ -29,7 +29,7 @@ namespace OpenRA.Renderer.Null
{
public Size WindowSize { get; internal set; }
public NullGraphicsDevice(Size size, WindowMode window, bool vsync)
public NullGraphicsDevice(Size size, WindowMode window)
{
Console.WriteLine("Using Null renderer");
WindowSize = size;