PortingNotes.docx

(12 KB) Pobierz

Notes on Porting XNA 3.1 to 4.0

References

Overview: http://msdn.microsoft.com/en-us/library/bb417503.aspx#ID4ETD

Cheat Sheet: http://www.nelxon.com/blog/xna-3-1-to-xna-4-0-cheatsheet/

RenderState: http://blogs.msdn.com/b/shawnhar/archive/2010/04/02/state-objects-in-xna-game-studio-4-0.aspx

Vertex Data: http://blogs.msdn.com/b/shawnhar/archive/2010/04/19/vertex-data-in-xna-game-studio-4-0.aspx

Custom Vertex: http://msdn.microsoft.com/en-us/library/bb976065.aspx

 

Tutorial Changes

Tutorial 6:

Change the Content Processor->Premultiply Alpha” property of each PNG files (e.g., fire.png) to False in the content.

Tutorial 7:

Changed:

              pyramid.VertexBuffer = new VertexBuffer(graphics.GraphicsDevice,

           VertexPositionNormalTexture.SizeInBytes * 16, BufferUsage.None);

       pyramid.SizeInBytes = VertexPositionNormalTexture.SizeInBytes;

       pyramid.VertexDeclaration = new VertexDeclaration(graphics.GraphicsDevice,

           VertexPositionNormalTexture.VertexElements);

 

To:

              pyramid.VertexBuffer = new VertexBuffer(graphics.GraphicsDevice,

            typeof(VertexPositionNormalTexture), 16, BufferUsage.None);

      pyramid.VertexDeclaration = VertexPositionNormalTexture.VertexDeclaration;

 

Zgłoś jeśli naruszono regulamin