remove unused vsync parameter from renderers
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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!");
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user