开发者

using setvertexdeclaration with fixed-function pipeline in directx 9

I am trying to use my own vertex structure, upload the vertices into a vertex buffer (indices into index buffer, without FVF code), set up the vertex declaration and stream source and use, and draw them using DrawIndexedPrimitive with fixed shader (but not FVF).

Do I have to write my own shader to use directx 开发者_C百科9 SetVertexDeclaration ? Can I use a customised vertex structure with SetVertexDeclaration and fixed-pipeline ? If I can ,is there any restriction on fixed-pipeline and vertex declaration ?

Customised vertex structure:

struct PosNormTexCoord
{
float x,y,z;
float nx,ny,nz;
float tu,tv;
};


Unfortunately, you can't use fixed pipeline with custom vertex format. But your structure can be expressed in FVF, why would you want to skip its usage?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜