TAILIEUCHUNG - Microsoft XNA Game Studio Creator’s Guide- P7

Microsoft XNA Game Studio Creator’s Guide- P7:The release of the XNA platform and specifically the ability for anyone to write Xbox 360 console games was truly a major progression in the game-programming world. Before XNA, it was simply too complicated and costly for a student, software hobbyist, or independent game developer to gain access to a decent development kit for a major console platform. | 158 MICROSOFT XNA GAME STUDIO CREATOR S GUIDE Once the indices have been defined the SetData method stores the index references in the index buffer. There are several overrides for this method but for our needs all you have to do is pass in the array of indices SetData T T data Managing Vertex Data with Index Buffers and Vertex Buffers By themselves the VertexPositionColor VertexPositionColorTexture VertexPositionTexture and VertexPositionNormalTexture objects that you have used will not permit live updates to the position color texture and normal data. DynamicVertexBuffer objects in combination with index buffers on the other hand will permit updates to large amounts of vertex data. You are going to want a structure like this when creating an effect such as water. When initialized the constructor for the vertex buffer takes parameters for the current graphics device vertex type element count and buffer usage for memory allocation VertexBuffer GraphicsDevice Type int BufferUsage graphicsDevice vertexType elementCount usage As explained above BufferUsage options are None as the default WriteOnly for efficient writes to memory and for efficient drawing and Points for point sprites. After the vertex data is loaded into an array the vertex data is moved into the vertex buffer with the VertexBuffer object s SetData method. There are several variations of this method. The method used here only passes the array of vertices SetData VertexBuffer vertexBuffer Rendering Vertex Buffers with an Index Buffer Reference The draw method you use for dynamic vertex buffers using index buffers differs in three ways from the draw methods you have used until now 1. The SetSource method is used to set the vertex buffer that stores the grid the starting element and the size of the vertex type in bytes 0 .SetSource VertexBuffer int int vertexBuffer startingElement sizeOfVertex CHAPTER 1 1 1 59 2. The GraphicsDevice s Indices object is set with the .

TÀI LIỆU MỚI ĐĂNG
41    188    5    26-12-2024
13    158    1    26-12-2024
54    150    1    26-12-2024
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.