예제 #1
0
        public void Clear(ClearType Type)
        {
            ProfilerHelper_.Begin(ProfilerElementType.ClearTime);

            if ((Type & ClearType.Color) == ClearType.Color)
            {
                TaskDispatcher_.PushTask(0 % Context_.CoreNum, new ClearColorTask(Context_, 0, (byte)(Context_.ClearColor.B * 255)));
                TaskDispatcher_.PushTask(1 % Context_.CoreNum, new ClearColorTask(Context_, 1, (byte)(Context_.ClearColor.G * 255)));
                TaskDispatcher_.PushTask(2 % Context_.CoreNum, new ClearColorTask(Context_, 2, (byte)(Context_.ClearColor.R * 255)));
                TaskDispatcher_.PushTask(3 % Context_.CoreNum, new ClearColorTask(Context_, 3, (byte)(Context_.ClearColor.A * 255)));
            }

            if ((Type & ClearType.Depth) == ClearType.Depth)
            {
                TaskDispatcher_.PushTask(4 % Context_.CoreNum, new ClearDepthTask(Context_));
            }

            /*if ((Type & ClearType.Stencil) == ClearType.Stencil)
             * {
             * }*/

            TaskDispatcher_.Wait();
            Context_.FrameCount++;

            ProfilerHelper_.End(ProfilerElementType.ClearTime);
        }