|
请教个菜鸟级的问题。各位大侠见笑了。还望不吝赐教。
我们都知道 当一个顶点包含 位置 和贴图信息时,它看起来像这样:
struct CUSTOMVERTEX
{
FLOAT x, y, z; // The transformed position for the vertex
float u,v;
};
// Our custom FVF, which describes our custom vertex structure
#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ|D3DFVF_TEX1)
但如果我还想加入一些自定义数据 例如骨骼ID 权重进去。我如何define下面的标志位好让显卡知道哪个数据该怎么解析呢?
或者让显卡直接忽略掉顶点里面的一些数据。比如像这样
struct CUSTOMVERTEX
{
FLOAT x, y, z; // The transformed position for the vertex
char boneId[4];
float u,v;
};
我该怎么define?或者该怎么做? |
|