Add glDrawElements
This commit is contained in:
committed by
Matthias Mailänder
parent
f6c1453b5b
commit
9b8895df39
@@ -48,6 +48,7 @@ namespace OpenRA.Platforms.Default
|
||||
Func<object, IVertexBuffer<Vertex>> getCreateVertexBuffer;
|
||||
Func<object, IIndexBuffer> getCreateIndexBuffer;
|
||||
Action<object> doDrawPrimitives;
|
||||
Action<object> doDrawElements;
|
||||
Action<object> doEnableScissor;
|
||||
Action<object> doSetBlendMode;
|
||||
Action<object> doSetVSync;
|
||||
@@ -102,6 +103,12 @@ namespace OpenRA.Platforms.Default
|
||||
var t = ((PrimitiveType, int, int))tuple;
|
||||
context.DrawPrimitives(t.Item1, t.Item2, t.Item3);
|
||||
};
|
||||
doDrawElements =
|
||||
tuple =>
|
||||
{
|
||||
var t = ((int, int))tuple;
|
||||
context.DrawElements(t.Item1, t.Item2);
|
||||
};
|
||||
doEnableScissor =
|
||||
tuple =>
|
||||
{
|
||||
@@ -431,6 +438,11 @@ namespace OpenRA.Platforms.Default
|
||||
Post(doDrawPrimitives, (type, firstVertex, numVertices));
|
||||
}
|
||||
|
||||
public void DrawElements(int numIndices, int offset)
|
||||
{
|
||||
Post(doDrawElements, (numIndices, offset));
|
||||
}
|
||||
|
||||
public void EnableDepthBuffer()
|
||||
{
|
||||
Post(doEnableDepthBuffer);
|
||||
|
||||
Reference in New Issue
Block a user