Example #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            courierFont = new FixedFont(content.Load <Texture2D>("Fonts/Courier"));

            spriteBatch = new SpriteBatch(graphics.GraphicsDevice);

            effect = content.Load <Effect>("Shaders/Simple");
            effectParamWorldViewProjection = effect.Parameters["WorldViewProjection"];

            vertexDeclaration = new VertexDeclaration(graphics.GraphicsDevice, VertexPositionColor.VertexElements);
        }
Example #2
0
        /// <summary>
        /// Load your graphics content.  If loadAllContent is true, you should
        /// load content from both ResourceManagementMode pools.  Otherwise, just
        /// load ResourceManagementMode.Manual content.
        /// </summary>
        protected override void LoadContent()
        {
            base.LoadContent();
            // TODO: Load any ResourceManagementMode.Automatic content
            courierFont = new FixedFont(content.Load <Texture2D>("Content/Fonts/Courier"));

            spriteBatch = new SpriteBatch(graphics.GraphicsDevice);

            effect = content.Load <Effect>("Content/Shaders/Simple");
            effectParamWorldViewProjection = effect.Parameters["WorldViewProjection"];

            // TODO: Load any ResourceManagementMode.Manual content
            vertexDeclaration = new VertexDeclaration(VertexPositionTexture.VertexDeclaration.GetVertexElements());
        }
Example #3
0
        /// <summary>
        /// Load your graphics content.  If loadAllContent is true, you should
        /// load content from both ResourceManagementMode pools.  Otherwise, just
        /// load ResourceManagementMode.Manual content.
        /// </summary>
        /// <param name="loadAllContent">Which type of content to load.</param>
        protected override void LoadGraphicsContent(bool loadAllContent)
        {
            if (loadAllContent)
            {
                // TODO: Load any ResourceManagementMode.Automatic content
                courierFont = new FixedFont(content.Load <Texture2D>("Content/Fonts/Courier"));

                spriteBatch = new SpriteBatch(graphics.GraphicsDevice);

                effect = content.Load <Effect>("Content/Shaders/Simple");
                effectParamWorldViewProjection = effect.Parameters["WorldViewProjection"];
            }

            // TODO: Load any ResourceManagementMode.Manual content
            vertexDeclaration = new VertexDeclaration(graphics.GraphicsDevice, VertexPositionColor.VertexElements);
        }
Example #4
0
        /// <summary>
        /// Load your graphics content.  If loadAllContent is true, you should
        /// load content from both ResourceManagementMode pools.  Otherwise, just
        /// load ResourceManagementMode.Manual content.
        /// </summary>
        protected override void LoadContent()
        {
            base.LoadContent();
            // TODO: Load any ResourceManagementMode.Automatic content
            courierFont = new FixedFont(content.Load<Texture2D>("Content/Fonts/Courier"));

            spriteBatch = new SpriteBatch(graphics.GraphicsDevice);

            effect = content.Load<Effect>("Content/Shaders/Simple");
            effectParamWorldViewProjection = effect.Parameters["WorldViewProjection"];

            // TODO: Load any ResourceManagementMode.Manual content
            vertexDeclaration = new VertexDeclaration(VertexPositionTexture.VertexDeclaration.GetVertexElements());
        }