public void SetIndices(ushort[] indices) { int errorCode = PsmVertexBuffer.SetIndices(this.handle, indices, 0, 0, -1); if (errorCode != 0) { Error.ThrowNativeException(errorCode); } }
public void SetVertices(int stream, Array vertices, VertexFormat format, Vector4 trans, Vector4 scale) { int errorCode = PsmVertexBuffer.SetVertices2(this.handle, stream, vertices, format, ref trans, ref scale, 0, 0, 0, 0, this.vertexCount); if (errorCode != 0) { Error.ThrowNativeException(errorCode); } }
public void SetVertices(int stream, Array vertices, int offset, int stride) { int errorCode = PsmVertexBuffer.SetVertices2(this.handle, stream, vertices, VertexFormat.None, ref VertexBuffer.zero, ref VertexBuffer.one, offset, stride, 0, 0, this.vertexCount); if (errorCode != 0) { Error.ThrowNativeException(errorCode); } }
public void SetVertices(Array vertices) { int errorCode = PsmVertexBuffer.SetVertices(this.handle, vertices, 0, 0, -1); if (errorCode != 0) { Error.ThrowNativeException(errorCode); } }
protected VertexBuffer(VertexBuffer buffer) { int errorCode = PsmVertexBuffer.AddRef(buffer.handle); if (errorCode != 0) { Error.ThrowNativeException(errorCode); } this.handle = buffer.handle; this.formats = buffer.formats; this.vertexCount = buffer.vertexCount; this.indexCount = buffer.indexCount; }
public VertexBuffer(int vertexCount, int indexCount, int instDivisor, params VertexFormat[] formats) { int errorCode = PsmVertexBuffer.Create(vertexCount, indexCount, instDivisor, 0, formats, out this.handle); if (errorCode != 0) { Error.ThrowNativeException(errorCode); } this.formats = formats; this.vertexCount = vertexCount; this.indexCount = indexCount; this.instDivisor = instDivisor; }
public void SetIndices(ushort[] indices, int to, int from, int count) { if (count < 0) { count = int.MaxValue; } int errorCode = PsmVertexBuffer.SetIndices(this.handle, indices, to, from, count); if (errorCode != 0) { Error.ThrowNativeException(errorCode); } }
public void SetVertices(int stream, Array vertices, VertexFormat format, Vector4 trans, Vector4 scale, int offset, int stride, int to, int from, int count) { if (count < 0) { count = int.MaxValue; } int errorCode = PsmVertexBuffer.SetVertices2(this.handle, stream, vertices, format, ref trans, ref scale, offset, stride, to, from, count); if (errorCode != 0) { Error.ThrowNativeException(errorCode); } }
public void SetVertices(int stream, Array vertices, int to, int from, int count) { if (count < 0) { count = int.MaxValue; } int errorCode = PsmVertexBuffer.SetVertices2(this.handle, stream, vertices, VertexFormat.None, ref VertexBuffer.zero, ref VertexBuffer.one, 0, 0, to, from, count); if (errorCode != 0) { Error.ThrowNativeException(errorCode); } }
protected virtual void Dispose(bool disposing) { PsmVertexBuffer.Delete(this.handle); this.handle = 0; }