Skip to main content
gamedev.net
🔒 Locked

DrawSubset()

Started by programmer_tom Feb 21, 2005 at 10:35 AM 3 replies 500+ views
Original Post
programmer_tom
programmer_tom
Anyone know how to set a custom vertex shader when rendering a .x file mesh with DrawSubset? I see that you can set the FVF with clone mesh, but can't find where it's setting the shader in there.
DrunkenHyena
DrunkenHyena
DrawSubset doesn't set anything related to shaders, all it does is a DrawPrim call. So set your shader the same way you would if you weren't using a mesh and it should work fine.
Stay Casual,KenDrunken Hyena</FON
DrunkenHyena
DrunkenHyena
Quote:
Original post by Anonymous Poster
On a related note, say I call DrawSubset and its drawing my mesh as a triangle strip. What if I want to render it as quads? How can you set the primitive type for DrawSubset?


You can't set the primitive type. DrawSubset is a wrapper to make things easier, to do that it sacrifices flexibility. If you need additional flexibility, you can get direct access to the IB/VB of the mesh.

There is no Quad primitive in D3D.
Stay Casual,KenDrunken Hyena</FON
programmer_tom
programmer_tom

thanks DH

thx for the tutorials too...can be hard to find easily understandable d3d8 source.

lemme see if i can get this model to work with my shader now...


Topic Locked

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

Sign in to reply to this topic.