Original Post
hi there.
i just posted this but it somehow didn''t work. so i do it again =) i''m relatively new to graphics programming using dx. now i want to convert the examples done in a course in unversity from java to dx (vc++). the first task is to present a wireframe from a polygon model data file (PLG format if anyone knows that).
i''ve played a bit with the examples from the dx sdk tutorials and they help a lot. but i cannot find out how to just use dx to present a polygon model or at least a simple polygon consisting if three vertices as a wireframe. i don''t wanna have that polygon filled or anything. just the borders in plain old white. simply a wireframe.
in the dx sdk tutorials they use
// A structure for our custom vertex type
struct CUSTOMVERTEX
{
FLOAT x, y, z; // The untransformed, 3D position for the vertex
DWORD color; // The vertex color
};
// Our custom FVF, which describes our custom vertex structure
#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ|D3DFVF_DIFFUSE)
as the vertex buffer. after that they fill it with their data and finish up by calling
// Render the vertex buffer contents
g_pd3dDevice->SetStreamSource( 0, g_pVB, sizeof(CUSTOMVERTEX) );
g_pd3dDevice->SetVertexShader( D3DFVF_CUSTOMVERTEX );
g_pd3dDevice->DrawPrimitive( D3DPT_TRIANGLESTRIP, 0, 1 );
could anyone tell me in what way i should fill the vertex buffer? what FVF should i use? how to use the DrawPrimitive function of the dx device? all of these question concering simple wireframe presentation.
i''d appreciate any help. greetings. radix.