Beispiel #1
0
        /// <summary>Initializes a new deferred primitive queuer</summary>
        /// <param name="batchDrawer">
        ///   Batch drawer that will be used to render completed vertex batches
        /// </param>
        public DeferredQueuer(IBatchDrawer <VertexType> batchDrawer) :
            base(batchDrawer)
        {
            // Create a new list of queued rendering operations
            this.operations       = new List <RenderOperation>();
            this.currentOperation = new RenderOperation(0, (PrimitiveType)(-1), null);
            this.operations.Add(this.currentOperation);

            // Set up some arrays to store the vertices and indices in
            this.vertices = new VertexType[batchDrawer.MaximumBatchSize];
            this.indices  = new short[batchDrawer.MaximumBatchSize];
        }
Beispiel #2
0
 /// <summary>Initializes a new primitive queuer</summary>
 /// <param name="batchDrawer">
 ///   Batch drawer that will be used to render completed vertex batches
 /// </param>
 public Queuer(IBatchDrawer <VertexType> batchDrawer)
 {
     this.BatchDrawer = batchDrawer;
 }
Beispiel #3
0
 /// <summary>Initializes a new immediate primitive queuer</summary>
 /// <param name="batchDrawer">
 ///   Batch drawer that will be used to render completed vertex batches
 /// </param>
 public ImmediateQueuer(IBatchDrawer <VertexType> batchDrawer) :
     base(batchDrawer)
 {
 }
Beispiel #4
0
 /// <summary>Initializes a new primitive batcher</summary>
 /// <param name="batchDrawer">
 ///   Vertex batch drawer that will be used by the primitive batcher
 /// </param>
 internal PrimitiveBatch(IBatchDrawer <VertexType> batchDrawer)
 {
     this.batchDrawer      = batchDrawer;
     this.queueingStrategy = QueueingStrategy.Immediate;
     this.primitiveQueuer  = new ImmediateQueuer <VertexType>(this.batchDrawer);
 }
Beispiel #5
0
 /// <summary>Initializes a new draw context primitive queuer</summary>
 /// <param name="batchDrawer">
 ///   Batch drawer that will be used to render completed vertex batches
 /// </param>
 public DrawContextQueuer(IBatchDrawer <VertexType> batchDrawer) :
     base(batchDrawer)
 {
     this.contexts = new Dictionary <DrawContext, Deque <VertexType> >();
 }