Style fixes for Renderer.SdlCommon.

This commit is contained in:
Paul Chote
2013-07-18 18:13:16 +12:00
parent 1b4e387ecc
commit 7853c2127e
7 changed files with 127 additions and 122 deletions

View File

@@ -64,6 +64,22 @@ namespace OpenRA.Renderer.SdlCommon
ErrorHandler.CheckGlError();
}
static int[] ViewportRectangle()
{
var v = new int[4];
unsafe
{
fixed (int* ptr = &v[0])
{
IntPtr intPtr = new IntPtr((void*)ptr);
Gl.glGetIntegerv(Gl.GL_VIEWPORT, intPtr);
}
}
ErrorHandler.CheckGlError();
return v;
}
void FinalizeInner()
{
Gl.glDeleteFramebuffersEXT(1, ref framebuffer);
@@ -74,22 +90,6 @@ namespace OpenRA.Renderer.SdlCommon
~FrameBuffer() { Game.RunAfterTick(FinalizeInner); }
static int[] ViewportRectangle()
{
int[] v = new int[4];
unsafe
{
fixed (int *ptr = &v[0])
{
IntPtr intPtr = new IntPtr((void*)ptr);
Gl.glGetIntegerv(Gl.GL_VIEWPORT, intPtr);
}
}
ErrorHandler.CheckGlError();
return v;
}
int[] cv = new int[4];
public void Bind()
{