2013-04-12 1 views
-2

이 코드 부분을 XNA 3.1에서 XNA 4.0으로 변환하는 방법
누군가가 도움이된다면.XNA3.1에서 XNA 4.0으로 변환

public ModelLightMesh(Viewer3D viewer, Vector3 position, float radius, Color color, float u0, float v0, float u1, float v1) 
    { 
     var verticies = new[] { 
      new VertexPositionColorTexture(new Vector3(position.X - radius, position.Y + radius, position.Z), color, new Vector2(u1, v0)), 
      new VertexPositionColorTexture(new Vector3(position.X + radius, position.Y + radius, position.Z), color, new Vector2(u0, v0)), 
      new VertexPositionColorTexture(new Vector3(position.X + radius, position.Y - radius, position.Z), color, new Vector2(u0, v1)), 
      new VertexPositionColorTexture(new Vector3(position.X - radius, position.Y - radius, position.Z), color, new Vector2(u1, v1)), 
     }; 
     VertexDeclaration = new VertexDeclaration(viewer.GraphicsDevice, VertexPositionColorTexture.VertexElements); 
     VertexBuffer = new VertexBuffer(viewer.GraphicsDevice, VertexPositionColorTexture.SizeInBytes * verticies.Length, BufferUsage.WriteOnly); 
     VertexBuffer.SetData(verticies); 
    } 

답변

0

Microsoft는 일련의 MSDN 기사에서 코드 예제와의 차이점을 강조했습니다.

http://nelxon.com/resources/xna-3-1-to-xna-4-0-cheatsheet.php

기사 :

또한 여기에 제공된 컨닝 페이퍼를 사용할 수 있습니다추신 : 특별히 문제가 생겨 구체적인 문제에 관해 질문하지 않았기 때문에 답이 내려졌습니다.

+0

MSDN 기사 시리즈의 링크를 제발 ... – Tasleem

+0

@Tasleem, 북마크 목록 상단에서 링크를 추가했습니다. 오류를 열거하면 도와 드리겠습니다. –

+0

치트 시트가 http://www.nelsonhurst.com/xna-3-1-to-xna-4-0-cheatsheet/으로 이동했습니다. – Hammerstad

관련 문제