euan
New member
Some people and myself decided it would be nice to make a glide wrapper that truforms everything for playing N64 games. Well it is low poly stuff isn't it?
I think truform can be added into the D3D XGL200 wrapper by using these two lines:
I don't know what they do apart from the names sounding like truform. 7.0f was a varible from the ATI pntriangle demo, but I've just hardwired it becuase I'm lazy.
The program doesn't compile as it doesn't know the D3DRS_PATCHSEGMENTS constants that I've added. I either need to update the DX8 header files, or add them manually.
Hense the function I changed looks like this:
Is this actually possible?
I remember reading (although only vaguely as it was 5 minutes ago) that you need both the co-ordinates and the normals for truform to work. Are the normals in here:
struct XGLVertex {
float x, y, z;
float r, g, b;
float ooz;
float a;
float oow;
// XGLTmuVertex tmuvertex[XGLNUM_TMU];
XGLTmuVertex tmuvertex[2];
};
I get lost after the r,g,b;
I think truform can be added into the D3D XGL200 wrapper by using these two lines:
Code:
DX.D3DD->SetRenderState (D3DRS_PATCHSEGMENTS, *((DWORD*)7.0f));
DX.D3DD->SetRenderState (D3DRS_PATCHEDGESTYLE, D3DPATCHEDGE_DISCRETE);
I don't know what they do apart from the names sounding like truform. 7.0f was a varible from the ATI pntriangle demo, but I've just hardwired it becuase I'm lazy.
The program doesn't compile as it doesn't know the D3DRS_PATCHSEGMENTS constants that I've added. I either need to update the DX8 header files, or add them manually.
Hense the function I changed looks like this:
Code:
inline void drawpolygon(uint32 num, uint32 *index, XGLVertex *verts) {
_exebuffer->Flush();
DX.D3DD->SetRenderState (D3DRS_PATCHSEGMENTS, *((DWORD*)7.0f));
DX.D3DD->SetRenderState (D3DRS_PATCHEDGESTYLE, D3DPATCHEDGE_DISCRETE);
DX.D3DD->Begin(D3DPT_TRIANGLEFAN, D3DFVF_TLVERTEX, D3DDP_DONOTLIGHT);
for (uint32 i=0; i<num; i++) {
vconv(verts[index[i]], vert);
DX.D3DD->Vertex((LPVOID)&vert);
}
DX.D3DD->End(0);
}
Is this actually possible?
I remember reading (although only vaguely as it was 5 minutes ago) that you need both the co-ordinates and the normals for truform to work. Are the normals in here:
struct XGLVertex {
float x, y, z;
float r, g, b;
float ooz;
float a;
float oow;
// XGLTmuVertex tmuvertex[XGLNUM_TMU];
XGLTmuVertex tmuvertex[2];
};
I get lost after the r,g,b;
Last edited: