Example #1
0
        public void Draw(IBaseEffect effect)
        {
            effect.Texture = _texture;

            _graphicsDevice.SetVertexBuffer(_buffer);
            effect.Apply();
            _graphicsDevice.DrawPrimitives(PrimitiveType.TriangleList, 0, _buffer.VertexCount/3);
        }
Example #2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here

            //_effect = new SimpleEffect(Content.Load<Effect>(@"Shaders\SimpleEffect"));
            //_effect = new StandardEffect(Content.Load<Effect>(@"Shaders\StandardEffect"));
            _effect = new MultiLightEffect(Content.Load<Effect>(@"Shaders\MultiLightEffect"));
            //_effect = new BasicEffectWrapper(GraphicsDevice);

            Window.Title = "Pila 2 (Alt + Enter for full screen)";

            base.Initialize();
        }