• Advertisement
Sign in to follow this  

Vertex Shader with Mesh

This topic is 4506 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

If i want to use vertex shader, do i have to extract out the vertices and indices of the mesh then set the shader and render using DrawIndexedPrimitive, or can i set the shader and call DrawSubset?

Share this post


Link to post
Share on other sites
Advertisement
The latter. The shader will automaticlly pick up anything rendered between BeginPass() and EndPass.

Illco

Share this post


Link to post
Share on other sites
calling DrawSubset on D3DXMesh will just set the index and vertex buffer and call DrawPrimitive for you. any other device/render states you've set or D3DXEffect has set for you will be applied to what you're drawing.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement