Beispiel #1
0
        /// <summary>
        /// 
        /// </summary>
        public override void Initialize()
        {
            particleTex		=	Game.Content.Load<Texture2D>("smaller");
            highlightTex	=	Game.Content.Load<Texture2D>("selection");
            sparkTex		=	Game.Content.Load<Texture2D>("spark");
            renderShader	=	Game.Content.Load<Ubershader>("Render");
            computeShader	=	Game.Content.Load<Ubershader>("Compute");

            atlas			=	Game.Content.Load<TextureAtlas>("protein_textures");

            // creating the layout system:
            lay = new LayoutSystem(Game, computeShader);
            lay.UseGPU = Config.UseGPU;
            lay.RunPause = LayoutSystem.State.PAUSE;

            factory = new StateFactory( renderShader, typeof(RenderFlags), ( plState, comb ) =>
            {
                plState.RasterizerState	= RasterizerState.CullNone;
                plState.BlendState = BlendMode;
                plState.DepthStencilState = DepthStencilState.Readonly;
                plState.Primitive		= Primitive.PointList;
            } );

            paramsCB			=	new ConstantBuffer( Game.GraphicsDevice, typeof(Params) );
            particleMass		=	1.0f;
            edgeSize			=	1000.0f;

            edgeList			=	new List<Link>();
            nodeList			=	new List<Particle3d>();
            edgeIndexLists		=	new List<List<int>>();
            sparkList			=	new List<Spark>();
            commandQueue		=	new Queue<int>();

            referenceNodeIndex	=	0;

            Game.InputDevice.KeyDown += keyboardHandler;

            base.Initialize();
        }
Beispiel #2
0
 /// <summary>
 /// 
 /// </summary>
 public void LoadContent()
 {
     spotAtlas	=	Content.Load<TextureAtlas>("spots|srgb");
 }
Beispiel #3
0
        /// <summary>
        /// 
        /// </summary>
        void LoadContent()
        {
            texture		=	Content.Load<Texture2D>("lena");
            texture2	=	Content.Load<Texture2D>("manul" );
            font1		=	Content.Load<SpriteFont>("segoe80");
            font2		=	Content.Load<SpriteFont>("segoe40");

            atlas		=	Content.Load<TextureAtlas>("sprites");

            foreach ( var name in atlas.SubImageNames ) {
                Log.Message( "...{0}", name );
            }
        }