/// <inheritdoc/>
 public void SetGeometryStream(GeometryStream stream)
 {
     Contract.EnsureNotDisposed(this, Disposed);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Ensures that the control's geometry stream exists.
 /// </summary>
 /// <returns>The control's geometry stream.</returns>
 private GeometryStream EnsureGeometryStream()
 {
     if (geometryStream == null)
     {
         geometryStream = GeometryStream.Create();
         geometryStream.Attach(EnsureVertexBuffer());
     }
     return geometryStream;
 }
        /// <inheritdoc/>
        public void SetGeometryStream(GeometryStream stream)
        {
            Contract.EnsureNotDisposed(this, Disposed);

            Ultraviolet.ValidateResource(stream);

            if (stream == null)
            {
                this.geometryStream = null;
                OpenGLState.BindVertexArrayObject(0, 0, 0);
            }
            else
            {
                if (this.geometryStream != stream)
                {
                    this.geometryStream = (OpenGLGeometryStream)stream;
                    this.geometryStream.Apply();
                }
            }
        }