fix indent; make this work for Cg renderer too

This commit is contained in:
Chris Forbes
2011-03-08 19:28:57 +13:00
parent 16cb275a5f
commit e9a1c3f477
2 changed files with 5 additions and 5 deletions

View File

@@ -280,14 +280,14 @@ namespace OpenRA.Renderer.Cg
public void DrawIndexedPrimitives( PrimitiveType pt, Range<int> vertices, Range<int> indices )
{
Gl.glDrawElements( ModeFromPrimitiveType( pt ), indices.End - indices.Start,
Gl.GL_UNSIGNED_SHORT, new IntPtr( indices.Start * 2 ) );
Gl.GL_UNSIGNED_INT, new IntPtr( indices.Start * 4 ) );
CheckGlError();
}
public void DrawIndexedPrimitives( PrimitiveType pt, int numVerts, int numPrimitives )
{
Gl.glDrawElements( ModeFromPrimitiveType( pt ), numPrimitives * IndicesPerPrimitive( pt ),
Gl.GL_UNSIGNED_SHORT, IntPtr.Zero );
Gl.glDrawElements( ModeFromPrimitiveType( pt ), numPrimitives * IndicesPerPrimitive( pt ),
Gl.GL_UNSIGNED_INT, IntPtr.Zero);
CheckGlError();
}

View File

@@ -273,14 +273,14 @@ namespace OpenRA.Renderer.Glsl
public void DrawIndexedPrimitives( PrimitiveType pt, Range<int> vertices, Range<int> indices )
{
Gl.glDrawElements( ModeFromPrimitiveType( pt ), indices.End - indices.Start,
Gl.GL_UNSIGNED_INT, new IntPtr( indices.Start * 4 ) );
Gl.GL_UNSIGNED_INT, new IntPtr( indices.Start * 4 ) );
CheckGlError();
}
public void DrawIndexedPrimitives( PrimitiveType pt, int numVerts, int numPrimitives )
{
Gl.glDrawElements( ModeFromPrimitiveType( pt ), numPrimitives * IndicesPerPrimitive( pt ),
Gl.GL_UNSIGNED_INT, IntPtr.Zero);
Gl.GL_UNSIGNED_INT, IntPtr.Zero);
CheckGlError();
}