Exemplo n.º 1
0
        public void AllClientsNoPixelShader(bool enable)
        {
            var pkg = new S2C_NoPixelShader.ArgumentData();

            pkg.Enable = enable;
            if (ProfilerConnect != null)
            {
                S2C_NoPixelShader.Instance.DoCall(
                    ref pkg,
                    NetCore.ERouteTarget.Self, ProfilerConnect, null);
            }
        }
Exemplo n.º 2
0
        public void OnS2C_NoPixelShader(byte userFlags, ref S2C_NoPixelShader.ArgumentData cmd, UInt16 serialId, NetCore.NetConnection connect, ref NetCore.RPCRouter.RouteData routeInfo)
        {
            bool enable = cmd.Enable;

            CEngine.Instance.EventPoster.RunOn(() =>
            {
                if (CEngine.Instance.GameInstance != null)
                {
                    CEngine.Instance.GameInstance.NoPixelShader = enable;
                    var policy = CEngine.Instance.GameInstance.RenderPolicy as Graphics.RenderPolicy.CGfxRP_GameMobile;
                    if (policy != null)
                    {
                        var profiler = CEngine.Instance.GameInstance.GetGraphicProfiler();
                        policy.SetGraphicsProfiler(profiler);
                        Profiler.Log.WriteLine(Profiler.ELogTag.Info, "GraphicsDebugger", $"No Pixel Shader:{enable}");
                    }
                }
                return(null);
            }, Thread.Async.EAsyncTarget.Main);
        }