public IndexBuffer GetIndexBuffer() { if (this.indexBuffer == null) { ZeroIndexBuffer buffer = ZeroIndexBuffer.Create(DrawMode.TriangleFan, 0, 4); this.indexBuffer = buffer; } return(indexBuffer); }
public IndexBuffer GetIndexBuffer() { if (this.indexBuffer == null) { this.indexBuffer = ZeroIndexBuffer.Create(DrawMode.Triangles, 0, positions.Length); } return(this.indexBuffer); }
public IndexBuffer GetIndexBuffer() { if (this.indexBuffer == null) { this.indexBuffer = ZeroIndexBuffer.Create(DrawMode.Quads, 0, 4); } return(this.indexBuffer); }
public IndexBuffer GetIndexBuffer() { if (this.indexBuffer == null) { this.indexBuffer = ZeroIndexBuffer.Create(DrawMode.Triangles, 0, this.vTextureSlices.Length); } return(this.indexBuffer); }
public IndexBuffer GetIndexBuffer() { if (indexBuffer == null) { indexBuffer = ZeroIndexBuffer.Create(DrawMode.TriangleFan, 0, vertsData.Length); } return(indexBuffer); }
public IndexBuffer GetIndexBuffer() { if (this.indexBuffer == null) { ZeroIndexBuffer buffer = ZeroIndexBuffer.Create(DrawMode.Points, 0, particleCount); this.indexBuffer = buffer; } return(indexBuffer); }
/// <summary> /// /// </summary> /// <returns></returns> public IndexBuffer GetIndexBuffer() { if (this.indexBuffer == null) { ZeroIndexBuffer buffer = ZeroIndexBuffer.Create(DrawMode.Lines, 0, this.markerCount * 2); this.indexBuffer = buffer; } return(this.indexBuffer); }
public IndexBuffer GetIndexBuffer() { if (this.indexBuffer == null) { int primCount = 100;// render 100 instances. this.indexBuffer = ZeroIndexBuffer.Create(DrawMode.Triangles, 0, 6, primCount); } return(this.indexBuffer); }
/// <summary> /// /// </summary> /// <returns></returns> public IndexBuffer GetIndexBuffer() { if (this.indexBuffer == null) { ZeroIndexBuffer buffer = ZeroIndexBuffer.Create(this.Mode, this.FirstVertex, this.VertexCount, this.PrimCount); this.indexBuffer = buffer; } return(this.indexBuffer); }
/// <summary> /// /// </summary> /// <returns></returns> public IndexBuffer GetIndexBuffer() { if (this.indexBuffer == null) { ZeroIndexBuffer buffer = ZeroIndexBuffer.Create(DrawMode.QuadStrip, 0, (this.quadCount + 1) * 2); this.indexBuffer = buffer; } return(this.indexBuffer); }
public IndexBuffer GetIndexBuffer() { if (this.indexBuffer == null) { int uCount = GetUCount(interval); ZeroIndexBuffer buffer = ZeroIndexBuffer.Create(DrawMode.Points, 0, uCount); this.indexBuffer = buffer; } return(this.indexBuffer); }
public IndexBuffer GetIndexBuffer() { if (this.indexBuffer == null) { int vertexCount = 4; ZeroIndexBuffer buffer = ZeroIndexBuffer.Create(DrawMode.TriangleStrip, 0, vertexCount); this.indexBuffer = buffer; } return(this.indexBuffer); }
public IndexBuffer GetIndexBuffer() { if (this.indexBuffer == null) { int vertexCount = positions.Length; ZeroIndexBuffer buffer = ZeroIndexBuffer.Create(DrawMode.Lines, 0, vertexCount); this.indexBuffer = buffer; } return(this.indexBuffer); }
/// <summary> /// /// </summary> /// <param name="arg"></param> /// <param name="lastVertexId"></param> /// <param name="picker"></param> /// <returns></returns> internal override uint[] Search(PickingEventArgs arg, uint lastVertexId, ZeroIndexPicker picker) { var zeroIndexBuffer = picker.Node.PickingRenderUnit.VertexArrayObject.IndexBuffer as ZeroIndexBuffer; // when the temp index buffer could be long, it's no longer needed. // what a great OpenGL API design! ZeroIndexBuffer indexBuffer = ZeroIndexBuffer.Create(DrawMode.LineLoop, zeroIndexBuffer.FirstVertex, zeroIndexBuffer.RenderingVertexCount, zeroIndexBuffer.InstanceCount); picker.Node.Render4InnerPicking(arg, indexBuffer); uint id = ColorCodedPicking.ReadStageVertexId(arg.X, arg.Y); indexBuffer.Dispose(); if (id == zeroIndexBuffer.FirstVertex) { return(new uint[] { (uint)(zeroIndexBuffer.FirstVertex + zeroIndexBuffer.RenderingVertexCount - 1), id, }); } else { return(new uint[] { id - 1, id, }); } }
/// <summary> /// /// </summary> /// <param name="arg"></param> /// <param name="x">mouse position(Left Down is (0, 0)).</param> /// <param name="y">mouse position(Left Down is (0, 0)).</param> /// <param name="lastVertexId"></param> /// <param name="modernRenderer"></param> /// <returns></returns> internal override uint[] Search(RenderEventArgs arg, int x, int y, uint lastVertexId, ZeroIndexRenderer modernRenderer) { ZeroIndexBuffer zeroIndexBuffer = modernRenderer.IndexBuffer; // when the temp index buffer could be long, it's no longer needed. // what a great OpenGL API design! ZeroIndexBuffer indexBuffer = ZeroIndexBuffer.Create(DrawMode.LineLoop, zeroIndexBuffer.FirstVertex, zeroIndexBuffer.RenderingVertexCount, zeroIndexBuffer.PrimCount); modernRenderer.Render4InnerPicking(arg, indexBuffer); uint id = ColorCodedPicking.ReadStageVertexId(x, y); indexBuffer.Dispose(); if (id == zeroIndexBuffer.FirstVertex) { return(new uint[] { (uint)(zeroIndexBuffer.FirstVertex + zeroIndexBuffer.RenderingVertexCount - 1), id, }); } else { return(new uint[] { id - 1, id, }); } }