예제 #1
0
        // Constructor: ----------------------------------------------------------------------------------------
        public LayoutSystem(Game game, Ubershader ubershader)
        {
            env     = game;
            shader  = ubershader;
            device  = env.GraphicsDevice;
            factory = new StateFactory(shader, typeof(ComputeFlags), (plState, comb) =>
            {
                plState.RasterizerState   = RasterizerState.CullNone;
                plState.BlendState        = BlendState.NegMultiply;
                plState.DepthStencilState = DepthStencilState.Readonly;
                plState.Primitive         = Primitive.PointList;
            });

            paramsCB = new ConstantBuffer(env.GraphicsDevice, typeof(ComputeParams));

            categories      = new List <Category>();
            categoryIndices = new List <int>();

            SpringTension = env.GetService <GraphSystem>().Config.SpringTension;
            StepMode      = env.GetService <GraphSystem>().Config.StepMode;
            calcAuto      = new CalculationSystemAuto(this);
            calcFixed     = new CalculationSystemFixed(this);
            calcWolfram   = new CalculationSystemWolfram(this);
        }
예제 #2
0
        // Constructor: ----------------------------------------------------------------------------------------
        public LayoutSystem(Game game, Ubershader ubershader)
        {
            env = game;
            shader = ubershader;
            device = env.GraphicsDevice;
            factory = new StateFactory(shader, typeof(ComputeFlags), (plState, comb) =>
            {
                plState.RasterizerState = RasterizerState.CullNone;
                plState.BlendState = BlendState.AlphaBlend; //BlendState.NegMultiply;
                plState.DepthStencilState = DepthStencilState.Readonly;
                plState.Primitive = Primitive.PointList;
            });

            paramsCB = new ConstantBuffer(env.GraphicsDevice, typeof(ComputeParams));

            categories		= new List<Category>();
            categoryIndices	= new List<int>();

            SpringTension = env.GetService<GraphSystem>().Config.SpringTension;
            StepMode	= env.GetService<GraphSystem>().Config.StepMode;
            calcAuto	= new CalculationSystemAuto(this);
            calcFixed	= new CalculationSystemFixed(this);
            calcWolfram = new CalculationSystemWolfram(this);
        }