I initialize the material to be red with this code:
Originally Posted by Bubba
then use it with no texture with this code (d3ddev is the directx device):
material.Diffuse = D3DXCOLOR(1.0f, 0.0f, 0.0f, 1.0f);
material.Ambient = D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f);
material.Specular= D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f);
There is no texture, but I can't get the color to to constant. It is colored by my lights (if I have lighting enabled when I'm rendering the objects), but is always white otherwise. I want to it have a constant color and not be affected by lights.
One more thing: how to I clear a std::basic_stringstream<TCHAR> so that it will have no characters in it? I've tried the clear() function and sync() but nothing works. I'm using the stream to output information like camera position and rotation, so i need to clear it every frame to fill it with new data.