fix rendering of very large maps

This commit is contained in:
Chris Forbes
2011-03-08 19:24:15 +13:00
parent 682cfcd466
commit 16cb275a5f
9 changed files with 31 additions and 27 deletions

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_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();
}