I started writing a basic window application and wanted to learn and make some primitives using DirectX.
I created window, created device and did all the necessary things needed to be done before enjoying drawing.
After declaring the vertices of a triangle, and then copying them to Vertex buffer, I rendered it. Finally, I got something on the screen .
The problem started when I wanted to transform the triangle. I wrote the code, with intention of rotating it along Y-axis, but it didn't worked. This is what I wrote:
D3DXMatrixIdentity(&mTestRotMat);
D3DXMatrixRotationY( &mTestRotMat, D3DXToRadian(55));
pd3dDevice->SetTransform(D3DTS_WORLD, &mTestRotMat);
pd3dDevice->SetFVF( D3DFVF_XYZRHW | D3DFVF_DIFFUSE );
pd3dDevice->SetStreamSource(0, m_v_buffer, 0, sizeof(vertex_info));
pd3dDevice->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 1);
but this has no effect... :S
Also, worst part is I tried changing the z-coordinates of the primitive, but the triangle remains at the same position...
Am I missing anything ?
NOTE : since, this is just the basic program, I have not implemented camera, nor I am manipulating any of View, Projection Matrix.
Thanks,
NJ