By the way: RenderStates is somehow buggy.
When I use the following renderstates, the program crashes:
renderStates = new RenderStates(Texture);
renderStates.BlendMode = BlendMode.Add;
target.Draw(vertices, PrimitiveType.Quads, renderStates);
"Access Violation" inside this:
sfRenderWindow_DrawPrimitives(CPointer, vertexPtr, (uint)vertices.Length, type, states.Marshal());
EDITED:
But when I try it that way, it works without problems:
var va = new VertexArray(PrimitiveType.Quads);
for (int i = 0; i < particles.Count; i++)
{
va.Append(vertices[i * 4 + 0]);
va.Append(vertices[i * 4 + 1]);
va.Append(vertices[i * 4 + 2]);
va.Append(vertices[i * 4 + 3]);
}
va.Draw(target, renderState);
That would be very inefficient. But strangely it works.
Maybe only the vertexarray should draw vertices ? But why does RenderTarget.Draw() have an overload that allows drawing Vertex[] types directly
?
I'm using that method for now :/
I hope its only a small bug.