using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; namespace PreShaderTest { class PreShaderTestGame : Game { GraphicsDeviceManager graphics; VertexBuffer vertexBuffer; Effect pbrEffect; public PreShaderTestGame() { graphics = new GraphicsDeviceManager(this); graphics.PreferredBackBufferWidth = 1280; graphics.PreferredBackBufferHeight = 720; graphics.PreferMultiSampling = true; Content.RootDirectory = "Content"; Window.AllowUserResizing = true; IsMouseVisible = true; } protected override void LoadContent() { vertexBuffer = new VertexBuffer(GraphicsDevice, typeof(VertexPositionNormalTexture), 1, BufferUsage.None); vertexBuffer.SetData(new VertexPositionNormalTexture[] { new VertexPositionNormalTexture( new Vector3(0, 1, 1), new Vector3(0, 1, 1), new Vector2(0, 1) ) }); pbrEffect = new Smuggler.PBREffect(GraphicsDevice); } protected override void UnloadContent() { base.UnloadContent(); } protected override void Update(GameTime gameTime) { // // Insert your game update logic here. // base.Update(gameTime); } protected override void Draw(GameTime gameTime) { // // Replace this with your own drawing code. // GraphicsDevice.Clear(Color.CornflowerBlue); pbrEffect.Techniques[0].Passes[0].Apply(); GraphicsDevice.SetVertexBuffer(vertexBuffer); GraphicsDevice.DrawPrimitives(PrimitiveType.PointListEXT, 0, 1); base.Draw(gameTime); } } }