Exemplo n.º 1
0
        public WorldRenderLayer(string fullName
                                , AbstractCamera camera
                                , GlobalLayerScaleType layerScaleType    = GlobalLayerScaleType.Dynamic
                                , UniformLayerScaleType uniformScaleType = UniformLayerScaleType.Stretch
                                , World world = null)
            : base(UriUtilities.GetLastPart(fullName), layerScaleType, uniformScaleType)
        {
            rp = ArtemisEngine.RenderPipeline; // for convenience

            Camera       = camera;
            camera.Layer = this;

            _world = world;
        }
        public AbstractRenderLayer(string fullName)
            : base(UriUtilities.GetLastPart(fullName))
        {
            tempFullName = fullName;
            Managed      = false;

            AllRenderables = new RenderableGroup(TOP_LEVEL);
            AddObservedNode(TOP_LEVEL, AllRenderables);

            LayerTarget = ArtemisEngine.RenderPipeline.CreateRenderTarget();

            // LayerTarget properties
            TargetFill                = Color.Transparent;
            TargetFormat              = SurfaceFormat.Color;
            TargetDepthFormat         = DepthFormat.None;
            PreferredMultiSampleCount = 0;
            TargetUsage               = RenderTargetUsage.DiscardContents;
            TargetIsMipMap            = false;
        }
 public AbstractOrderableRenderLayer(string fullName)
     : base(UriUtilities.GetLastPart(fullName))
 {
     GlobalTraversalOptions = TraversalOptions.Pre;
 }
 /// <summary>
 /// Add an empty group with the given name to the layer.
 /// </summary>
 /// <param name="name"></param>
 public void AddGroup(string name)
 {
     AllRenderables.AddSubnode(name, new RenderableGroup(UriUtilities.GetLastPart(name)));
 }