-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);
}
MSDN 기사 시리즈의 링크를 제발 ... – Tasleem
@Tasleem, 북마크 목록 상단에서 링크를 추가했습니다. 오류를 열거하면 도와 드리겠습니다. –
치트 시트가 http://www.nelsonhurst.com/xna-3-1-to-xna-4-0-cheatsheet/으로 이동했습니다. – Hammerstad