directx-how to use no texture
This (should) be fairly easy.
I've been using meshes loaded from .x files and also loading materials and textures from them. Now i want to use a custom made material without a texture (just a solid diffuse color basically), like they do here.
I can set the material correctly. I've tried resetting the texture to a default white with
Code:
d3ddev->SetTexture(0,NULL);
but all the objects then appear pure white. the diffuse and ambient colors of the amterial doesn't seem to have any effect. How to i make the colors of the object be the color of the material diffuse?
Thank you!
Also, I know the function D3DXMatrixLookAtLH can make a view translation/rotation matrix based on a position vector, look-at vector, and up direction. Is there any function that can make a translation/rotation matrix for transforming an object (not view matrix) based on its position and vectors representing its rotated local axis?
(I have a position vector and a "looking at" vector (corresponding to the z axis) which i want to use to transform objects. The up direction would remain {0,1,0}.