2011-10-31 05:36:24 +00:00
|
|
|
using System;
|
|
|
|
using ANX.Framework.Graphics;
|
|
|
|
|
2012-08-09 09:45:04 +00:00
|
|
|
// This file is part of the ANX.Framework created by the
|
|
|
|
// "ANX.Framework developer group" and released under the Ms-PL license.
|
|
|
|
// For details see: http://anxframework.codeplex.com/license
|
2011-10-31 05:36:24 +00:00
|
|
|
|
|
|
|
namespace ANX.Framework.NonXNA
|
|
|
|
{
|
2012-08-30 12:05:40 +00:00
|
|
|
public interface INativeGraphicsDevice : IDisposable
|
|
|
|
{
|
|
|
|
void Clear(ref Color color);
|
|
|
|
void Clear(ClearOptions options, Vector4 color, float depth, int stencil);
|
2011-10-31 05:36:24 +00:00
|
|
|
|
2012-08-30 12:05:40 +00:00
|
|
|
void Present();
|
2011-10-31 05:36:24 +00:00
|
|
|
|
2012-09-21 12:07:20 +00:00
|
|
|
void DrawIndexedPrimitives(PrimitiveType primitiveType, int baseVertex, int minVertexIndex, int numVertices, int startIndex, int primitiveCount, IndexBuffer indexBuffer);
|
2011-10-31 05:36:24 +00:00
|
|
|
|
2012-08-30 12:05:40 +00:00
|
|
|
void DrawInstancedPrimitives(PrimitiveType primitiveType, int baseVertex, int minVertexIndex, int numVertices,
|
|
|
|
int startIndex, int primitiveCount, int instanceCount);
|
2011-11-09 12:31:32 +00:00
|
|
|
|
2012-08-30 12:05:40 +00:00
|
|
|
void DrawUserIndexedPrimitives<T>(PrimitiveType primitiveType, T[] vertexData, int vertexOffset, int numVertices,
|
|
|
|
Array indexData, int indexOffset, int primitiveCount, VertexDeclaration vertexDeclaration,
|
|
|
|
IndexElementSize indexFormat) where T : struct, IVertexType;
|
2011-11-09 12:31:32 +00:00
|
|
|
|
2012-08-30 12:05:40 +00:00
|
|
|
void DrawUserPrimitives<T>(PrimitiveType primitiveType, T[] vertexData, int vertexOffset, int primitiveCount,
|
|
|
|
VertexDeclaration vertexDeclaration) where T : struct, IVertexType;
|
2011-11-09 12:31:32 +00:00
|
|
|
|
2012-08-30 12:05:40 +00:00
|
|
|
void DrawPrimitives(PrimitiveType primitiveType, int vertexOffset, int primitiveCount);
|
2011-10-31 05:36:24 +00:00
|
|
|
|
2012-08-29 10:48:21 +00:00
|
|
|
#if XNAEXT
|
2012-08-30 12:05:40 +00:00
|
|
|
void SetConstantBuffer(int slot, ConstantBuffer constantBuffer);
|
2012-08-29 10:48:21 +00:00
|
|
|
#endif
|
|
|
|
|
2012-08-30 12:05:40 +00:00
|
|
|
void SetVertexBuffers(VertexBufferBinding[] vertexBuffers);
|
2011-10-31 05:36:24 +00:00
|
|
|
|
2012-08-30 12:05:40 +00:00
|
|
|
void SetIndexBuffer(IndexBuffer indexBuffer);
|
2011-10-31 05:36:24 +00:00
|
|
|
|
2012-08-30 12:05:40 +00:00
|
|
|
void SetViewport(Viewport viewport);
|
2011-11-07 13:04:42 +00:00
|
|
|
|
2012-08-30 12:05:40 +00:00
|
|
|
void SetRenderTargets(params RenderTargetBinding[] renderTargets);
|
2011-11-07 14:53:33 +00:00
|
|
|
|
2012-08-30 12:05:40 +00:00
|
|
|
void GetBackBufferData<T>(Nullable<Rectangle> rect, T[] data, int startIndex, int elementCount) where T : struct;
|
|
|
|
void GetBackBufferData<T>(T[] data) where T : struct;
|
|
|
|
void GetBackBufferData<T>(T[] data, int startIndex, int elementCount) where T : struct;
|
2011-11-09 19:39:21 +00:00
|
|
|
|
2012-08-30 12:05:40 +00:00
|
|
|
void ResizeBuffers(PresentationParameters presentationParameters);
|
2011-11-11 07:29:49 +00:00
|
|
|
|
2012-08-30 12:05:40 +00:00
|
|
|
bool VSync { get; set; }
|
|
|
|
}
|
2011-10-31 05:36:24 +00:00
|
|
|
}
|