fixed #989: don't do renderer setup in a reflected call.
This commit is contained in:
@@ -21,12 +21,17 @@ namespace OpenRA.FileFormats.Graphics
|
||||
|
||||
public RendererAttribute( Type graphicsDeviceType )
|
||||
{
|
||||
if( !typeof( IGraphicsDevice ).IsAssignableFrom( graphicsDeviceType ) )
|
||||
if( !typeof( IDeviceFactory ).IsAssignableFrom( graphicsDeviceType ) )
|
||||
throw new InvalidOperationException( "Incorrect type in RendererAttribute" );
|
||||
Type = graphicsDeviceType;
|
||||
}
|
||||
}
|
||||
|
||||
public interface IDeviceFactory
|
||||
{
|
||||
IGraphicsDevice Create( Size size, WindowMode windowMode, bool vsync );
|
||||
}
|
||||
|
||||
public interface IGraphicsDevice
|
||||
{
|
||||
IVertexBuffer<Vertex> CreateVertexBuffer( int length );
|
||||
|
||||
Reference in New Issue
Block a user