split IGraphicsDevice.{Present,PumpInput}
This commit is contained in:
@@ -38,7 +38,8 @@ namespace OpenRA.FileFormats.Graphics
|
|||||||
int GpuMemoryUsed { get; }
|
int GpuMemoryUsed { get; }
|
||||||
|
|
||||||
void Clear( Color color );
|
void Clear( Color color );
|
||||||
void Present( IInputHandler inputHandler );
|
void Present();
|
||||||
|
void PumpInput(IInputHandler inputHandler);
|
||||||
|
|
||||||
void DrawPrimitives( PrimitiveType type, int firstVertex, int numVertices );
|
void DrawPrimitives( PrimitiveType type, int firstVertex, int numVertices );
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,8 @@ namespace OpenRA.Graphics
|
|||||||
public void EndFrame( IInputHandler inputHandler )
|
public void EndFrame( IInputHandler inputHandler )
|
||||||
{
|
{
|
||||||
Flush();
|
Flush();
|
||||||
device.Present( inputHandler );
|
device.PumpInput(inputHandler);
|
||||||
|
device.Present();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DrawBatch<T>(IVertexBuffer<T> vertices,
|
public void DrawBatch<T>(IVertexBuffer<T> vertices,
|
||||||
|
|||||||
@@ -181,9 +181,13 @@ namespace OpenRA.Renderer.Cg
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Present( IInputHandler inputHandler )
|
public void Present()
|
||||||
{
|
{
|
||||||
Sdl.SDL_GL_SwapBuffers();
|
Sdl.SDL_GL_SwapBuffers();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PumpInput( IInputHandler inputHandler )
|
||||||
|
{
|
||||||
Game.HasInputFocus = 0 != ( Sdl.SDL_GetAppState() & Sdl.SDL_APPINPUTFOCUS );
|
Game.HasInputFocus = 0 != ( Sdl.SDL_GetAppState() & Sdl.SDL_APPINPUTFOCUS );
|
||||||
|
|
||||||
var mods = MakeModifiers( Sdl.SDL_GetModState() );
|
var mods = MakeModifiers( Sdl.SDL_GetModState() );
|
||||||
|
|||||||
@@ -180,9 +180,13 @@ namespace OpenRA.Renderer.Glsl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Present( IInputHandler inputHandler )
|
public void Present()
|
||||||
{
|
{
|
||||||
Sdl.SDL_GL_SwapBuffers();
|
Sdl.SDL_GL_SwapBuffers();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PumpInput( IInputHandler inputHandler )
|
||||||
|
{
|
||||||
Game.HasInputFocus = 0 != ( Sdl.SDL_GetAppState() & Sdl.SDL_APPINPUTFOCUS );
|
Game.HasInputFocus = 0 != ( Sdl.SDL_GetAppState() & Sdl.SDL_APPINPUTFOCUS );
|
||||||
|
|
||||||
var mods = MakeModifiers( Sdl.SDL_GetModState() );
|
var mods = MakeModifiers( Sdl.SDL_GetModState() );
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ namespace OpenRA.Renderer.Null
|
|||||||
|
|
||||||
public void Clear(Color c) { }
|
public void Clear(Color c) { }
|
||||||
|
|
||||||
public void Present(IInputHandler ih)
|
public void Present() { }
|
||||||
|
public void PumpInput(IInputHandler ih)
|
||||||
{
|
{
|
||||||
Game.HasInputFocus = false;
|
Game.HasInputFocus = false;
|
||||||
ih.ModifierKeys(Modifiers.None);
|
ih.ModifierKeys(Modifiers.None);
|
||||||
|
|||||||
Reference in New Issue
Block a user