IBOless rendering with quads; considerably reduces renderer complexity

This commit is contained in:
Chris Forbes
2011-05-05 17:50:23 +12:00
parent 8e1bc25006
commit 4d6b2c7954
13 changed files with 43 additions and 262 deletions

View File

@@ -30,7 +30,6 @@ namespace OpenRA.FileFormats.Graphics
public interface IGraphicsDevice
{
IVertexBuffer<Vertex> CreateVertexBuffer( int length );
IIndexBuffer CreateIndexBuffer( int length );
ITexture CreateTexture( Bitmap bitmap );
ITexture CreateTexture();
IShader CreateShader( string name );
@@ -41,8 +40,7 @@ namespace OpenRA.FileFormats.Graphics
void Clear( Color color );
void Present( IInputHandler inputHandler );
void DrawIndexedPrimitives( PrimitiveType type, Range<int> vertexRange, Range<int> indexRange );
void DrawIndexedPrimitives( PrimitiveType type, int vertexPool, int numPrimitives );
void DrawPrimitives( PrimitiveType type, int firstVertex, int numVertices );
void EnableScissor( int left, int top, int width, int height );
void DisableScissor();
@@ -54,12 +52,6 @@ namespace OpenRA.FileFormats.Graphics
void SetData( T[] vertices, int length );
}
public interface IIndexBuffer
{
void Bind();
void SetData( uint[] indices, int length );
}
public interface IShader
{
void SetValue( string name, float x, float y );
@@ -79,6 +71,7 @@ namespace OpenRA.FileFormats.Graphics
PointList,
LineList,
TriangleList,
QuadList,
}
public struct Range<T>