Esempio n. 1
0
        public VertigoRenderSystem(Camera camera, Application application)
        {
            this.camera             = camera;
            this.commandBuffer      = new CommandBuffer(); // todo -- per view
            this.commandBuffer.name = "UIForia Main Command Buffer";
            this.renderContext      = new RenderContext(application.settings, application.invertY);
            this.renderOwner        = new RenderOwner();

            if (this.camera != null)
            {
                this.camera.AddCommandBuffer(CameraEvent.BeforeForwardOpaque, commandBuffer);
            }

            application.StyleSystem.onStylePropertyChanged += HandleStylePropertyChanged;

            views = application.views;
        }
Esempio n. 2
0
        public VertigoRenderSystem(Camera camera, Application application)
        {
            this.camera             = camera;
            this.commandBuffer      = new CommandBuffer(); // todo -- per view
            this.commandBuffer.name = "UIForia Main Command Buffer";
            this.renderContext      = new RenderContext(application.settings);
            this.renderOwners       = new LightList <RenderOwner>();

            if (this.camera != null)
            {
                this.camera.AddCommandBuffer(CameraEvent.BeforeForwardOpaque, commandBuffer);
            }

            application.StyleSystem.onStylePropertyChanged += HandleStylePropertyChanged;
            application.onViewsSorted += uiViews => {
                renderOwners.Sort((o1, o2) => o1.view.Depth.CompareTo(o2.view.Depth));
            };
        }