Vertex Shader with Mesh

Started by
1 comment, last by blackpawn 18 years, 5 months ago
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?
Advertisement
The latter. The shader will automaticlly pick up anything rendered between BeginPass() and EndPass.

Illco
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.

This topic is closed to new replies.

Advertisement