public GamePage(string launchArguments) { this.InitializeComponent(); // Create the game. _game = XamlGame <LightingGame> .Create(launchArguments, Window.Current.CoreWindow, this); }
//------------------------------------------------------------------------------------- // Class constructors public CubeObject(LightingGame game) : base(game) { // Have we already built the cube vertex array in a previous instance? if (_vertices == null) { // No, so build them now BuildVertices(); // Create a vertex buffer _vertexBuffer = new VertexBuffer(game.GraphicsDevice, typeof(VertexPositionNormalTexture), _vertices.Length, BufferUsage.WriteOnly); _vertexBuffer.SetData(_vertices); } }