Exemple #1
0
        public ImperativeRenderer(
            IBatchContainer container,
            DefaultMaterialSet materials,
            int layer = 0,
            RasterizerState rasterizerState     = null,
            DepthStencilState depthStencilState = null,
            BlendState blendState                     = null,
            SamplerState samplerState                 = null,
            bool worldSpace                           = true,
            bool useZBuffer                           = false,
            bool autoIncrementSortKey                 = false,
            bool autoIncrementLayer                   = false,
            bool lowPriorityMaterialOrdering          = false,
            Sorter <BitmapDrawCall> declarativeSorter = null,
            Tags tags = default(Tags)
            )
        {
            if (container == null)
            {
                throw new ArgumentNullException("container");
            }
            if (materials == null)
            {
                throw new ArgumentNullException("materials");
            }

            Container                   = container;
            Materials                   = materials;
            Layer                       = layer;
            RasterizerState             = rasterizerState;
            DepthStencilState           = depthStencilState;
            BlendState                  = blendState;
            SamplerState                = samplerState;
            UseZBuffer                  = useZBuffer;
            WorldSpace                  = worldSpace;
            AutoIncrementSortKey        = autoIncrementSortKey;
            AutoIncrementLayer          = autoIncrementLayer;
            NextSortKey                 = new DrawCallSortKey(tags, 0);
            Cache                       = new CachedBatches();
            LowPriorityMaterialOrdering = lowPriorityMaterialOrdering;
            DeclarativeSorter           = declarativeSorter;
        }
Exemple #2
0
        public ImperativeRenderer(
            IBatchContainer container,
            DefaultMaterialSet materials,
            int layer = 0,
            RasterizerState rasterizerState     = null,
            DepthStencilState depthStencilState = null,
            BlendState blendState     = null,
            SamplerState samplerState = null,
            bool worldSpace           = true,
            bool useZBuffer           = false,
            bool autoIncrementSortKey = false,
            bool autoIncrementLayer   = false
            )
        {
            if (container == null)
            {
                throw new ArgumentNullException("container");
            }
            if (materials == null)
            {
                throw new ArgumentNullException("materials");
            }

            Container            = container;
            Materials            = materials;
            Layer                = layer;
            RasterizerState      = rasterizerState;
            DepthStencilState    = depthStencilState;
            BlendState           = blendState;
            SamplerState         = samplerState;
            UseZBuffer           = useZBuffer;
            WorldSpace           = worldSpace;
            AutoIncrementSortKey = autoIncrementSortKey;
            AutoIncrementLayer   = autoIncrementLayer;
            NextSortKey          = 0;
            Cache                = new CachedBatches();
        }