예제 #1
0
        public void CreateStarScroller_ShouldCreateStars()
        {
            base.InitializeCluwneLib(1280, 720, false, 60);
            Stars       = new StarScroller();
            renderimage = new RenderImage("StarScroller", 1920, 1080);

            while (CluwneLib.IsRunning)
            {
                var lastFrameTime = clock.ElapsedTime.AsSeconds();
                clock.Restart();
                _frameEvent = new FrameEventArgs(lastFrameTime);
                CluwneLib.ClearCurrentRendertarget(SFML.Graphics.Color.Black);
                CluwneLib.Screen.DispatchEvents();


                renderimage.BeginDrawing();                       // set temp as CRT (Current Render Target)
                renderimage.Clear();                              //Clear
                base.GetResourceManager.GetSprite("AAAA").Draw(); //Draw NoSpritelogo

                renderimage.EndDrawing();                         // set previous rendertarget as CRT (screen in this case)

                renderimage.Blit(0, 0, 1280, 768);                // draw blurred nosprite logo

                CluwneLib.Screen.Display();
            }
        }
예제 #2
0
        public void CreateStarScroller_ShouldCreateStars()
        {
            base.InitializeCluwneLib(1280, 720, false, 60);
            Stars = new StarScroller();
            renderimage = new RenderImage("StarScroller", 1920, 1080);

            while (CluwneLib.IsRunning)
            {
                var lastFrameTime = clock.ElapsedTime.AsSeconds();
                clock.Restart();
                _frameEvent = new FrameEventArgs(lastFrameTime);
                CluwneLib.ClearCurrentRendertarget(SFML.Graphics.Color.Black);
                CluwneLib.Screen.DispatchEvents();

                renderimage.BeginDrawing(); // set temp as CRT (Current Render Target)
                renderimage.Clear();       //Clear
                base.GetResourceManager.GetSprite("AAAA").Draw(); //Draw NoSpritelogo

                renderimage.EndDrawing();  // set previous rendertarget as CRT (screen in this case)

                renderimage.Blit(0, 0, 1280, 768); // draw blurred nosprite logo

                CluwneLib.Screen.Display();

            }
        }