Archived

This topic is now archived and is closed to further replies.

scaling meshes

This topic is 5625 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My current code is shown below.

D3DXMatrixRotationY(&rot_matrixy,rot_squarey);
D3DXMatrixRotationX(&rot_matrixx,rot_squarex);
D3DXMatrixMultiply(&rot_matrix,&rot_matrixx,&rot_matrixy);
D3DXMatrixTranslation(&trans_matrix,y2_pos,x2_pos,zpos);
D3DXMatrixMultiply(&matWorld2,&rot_matrix,&trans_matrix);
DXTigerPage.D3DDevice->SetTransform( D3DTS_WORLD, &matWorld2 );


for(DWORD i=0; i {
DXTigerPage.D3DDevice->SetMaterial(&g_pMeshMaterials);
DXTigerPage.D3DDevice->SetTexture(0,g_pMeshTextures[i]);
g_pMesh->DrawSubset(i);
}

My backdrop is a tiled backgrond and my mesh dissapers behind

Share this post


Link to post
Share on other sites
Although be carful since unless you have SetRenderState( D3DRS_NORMALIZENORMALS ,TRUE ) set, your normals will also be scaled, this will affect dynamic lighting if you have it turned on.

Share this post


Link to post
Share on other sites