Axiom.Graphics.RenderQueue.GetQueueGroup C# (CSharp) Method

GetQueueGroup() public method

Get a render queue group.
New queue groups are registered as they are requested, therefore this method will always return a valid group.
public GetQueueGroup ( RenderQueueGroupID queueID ) : RenderQueueGroup
queueID RenderQueueGroupID ID of the queue group to retreive.
return RenderQueueGroup
		public RenderQueueGroup GetQueueGroup( RenderQueueGroupID queueID )
		{
			RenderQueueGroup group = renderGroups[ queueID ] as RenderQueueGroup;

			// see if there is a current queue group for this group id
			if ( group == null )
			{
				// create a new queue group for this group id
				group = new RenderQueueGroup( this, splitPassesByLightingType,
											 splitNoShadowPasses,
											 shadowCastersCannotBeReceivers );

				// add the new group to cached render group
				renderGroups.Add( queueID, group );
			}

			return group;
		}

Usage Example

        /// <summary>
        ///		Internal method for initializing the render queue.
        /// </summary>
        /// <remarks>
        ///		Subclasses can use this to install their own <see cref="RenderQueue"/> implementation.
        /// </remarks>
        protected virtual void InitRenderQueue()
        {
            renderQueue = new RenderQueue();

            // init render queues that do not need shadows
            renderQueue.GetQueueGroup(RenderQueueGroupID.Background).ShadowsEnabled = false;
            renderQueue.GetQueueGroup(RenderQueueGroupID.Overlay).ShadowsEnabled = false;
            renderQueue.GetQueueGroup(RenderQueueGroupID.SkiesEarly).ShadowsEnabled = false;
            renderQueue.GetQueueGroup(RenderQueueGroupID.SkiesLate).ShadowsEnabled = false;
        }