Skip to main content
GameDev.net gamedev.net
🔒 Locked

A question about MD2 loader in D3D

Started by mylrex Jan 15, 2010 at 3:05 AM 2 replies 1k views
Original Post
mylrex
mylrex
Do I need a buffer to render ? or using CreaterMesh() to create LPD3DXMesh to render? I don't konw about Opengl very well,so can anybody give some introduction about loading md2 files in D3D? thanx!
Evil Steve
Evil Steve
The way I'd do it is to create a static index buffer and a dynamic vertex buffer. Each frame, you can update the dynamic vertex buffer with the vertices based on the animation frame you're on, and then rendering the model is just a case of rendering a single triangle list.
You could use an ID3DXMesh, but I don't think you'd gain anything from using it.
mylrex
mylrex
thank you ! I'm a beginner so it looks diffault to write a d3d loader after opengl turial. so i'll go on.
Quote:
Original post by Evil Steve
The way I'd do it is to create a static index buffer and a dynamic vertex buffer. Each frame, you can update the dynamic vertex buffer with the vertices based on the animation frame you're on, and then rendering the model is just a case of rendering a single triangle list.
You could use an ID3DXMesh, but I don't think you'd gain anything from using it.


mylrex
mylrex
sorry,I just think it's appropriate to post DirectX Forums..

Quote:
Original post by Evil Steve
The way I'd do it is to create a static index buffer and a dynamic vertex buffer. Each frame, you can update the dynamic vertex buffer with the vertices based on the animation frame you're on, and then rendering the model is just a case of rendering a single triangle list.
You could use an ID3DXMesh, but I don't think you'd gain anything from using it.


Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.