private DrawArrays ( uint mode, int first, int count ) : void | ||
mode | uint | |
first | int | |
count | int | |
return | void |
public override void Render(RenderEventArgs arg, ShaderProgram shaderProgram) { if (arg.RenderMode == RenderModes.ColorCodedPicking && arg.PickingGeometryType == GeometryType.Point && this.Mode.ToGeometryType() == GeometryType.Line) // picking point from a line { // this maybe render points that should not appear. // so need to select by another picking OpenGL.DrawArrays(DrawMode.Points, this.FirstVertex, this.VertexCount); } else { OpenGL.DrawArrays(this.Mode, this.FirstVertex, this.VertexCount); } }
/// <summary> /// /// </summary> /// <param name="arg"></param> public override void Render(RenderEventArgs arg) { uint mode = 0; if (arg.PickingGeometryType == PickingGeometryType.Point && this.Mode.ToGeometryType() == PickingGeometryType.Line) // picking point from a line { // this maybe render points that should not appear. // so need to select by another picking. mode = (uint)DrawMode.Points; } else { mode = (uint)this.Mode; } int primCount = this.PrimCount; if (primCount < 1) { throw new Exception("error: primCount is less than 1."); } else if (primCount == 1) { OpenGL.DrawArrays(mode, this.FirstVertex, this.RenderingVertexCount); } else { if (glDrawArraysInstanced == null) { glDrawArraysInstanced = OpenGL.GetDelegateFor <OpenGL.glDrawArraysInstanced>(); } glDrawArraysInstanced(mode, this.FirstVertex, this.RenderingVertexCount, primCount); } }
/// <summary> /// /// </summary> public override void Render() { uint mode = (uint)this.Mode; int primCount = this.PrimCount; if (primCount < 1) { throw new Exception("error: primCount is less than 1."); } else if (primCount == 1) { OpenGL.DrawArrays(mode, this.FirstVertex, this.RenderingVertexCount); } else { if (glDrawArraysInstanced == null) { glDrawArraysInstanced = OpenGL.GetDelegateFor <OpenGL.glDrawArraysInstanced>(); } glDrawArraysInstanced(mode, this.FirstVertex, this.RenderingVertexCount, primCount); } }