public SimpleRenderable(Buffer buffer, IEnumerable <PipelineType> pipelines, int indexOffset, int indexCount) { _buffer = buffer; _pipelines = pipelines.ToHashSet(); IndexOffset = indexOffset; IndexCount = indexCount; }
internal ViewportOverlay(IViewport viewport) { _viewport = viewport; _width = -1; _height = -1; _buffer = Engine.Engine.Interface.CreateBuffer(); _buffer.Update(new [] { new VertexStandard { Position = new Vector3(0, 0, 0), Texture = new Vector2(0, 0) }, new VertexStandard { Position = new Vector3(0, 1, 0), Texture = new Vector2(0, 1) }, new VertexStandard { Position = new Vector3(1, 1, 0), Texture = new Vector2(1, 1) }, new VertexStandard { Position = new Vector3(1, 0, 0), Texture = new Vector2(1, 0) }, }, new uint[] { 0, 2, 1, 0, 3, 2 }); }
public SimpleRenderable(Buffer buffer, PipelineType pipeline, int indexOffset, int indexCount) : this(buffer, new [] { pipeline }, indexOffset, indexCount) { }
/// <summary> /// Create a grid renderable for a specific viewport. /// </summary> /// <param name="viewport">The viewport that will render this grid</param> /// <param name="engine">The engine interface, to create a buffer</param> public GridRenderable(IViewport viewport, EngineInterface engine) { _viewport = viewport; _validated = false; _buffer = engine.CreateBuffer(); }