i tried the D3DRGB and D3DRGBA and with that i getting another problem , when i clear the viewport with Blue color D3DRGB(0,0,255) i get a GREEN screen...
now this is very very strange...
somebody have good idea?
Errr yeah. The D3DRGB and the D3DRGBA macros take input as float values ! i.e 0 -> 1. Try that and you should get something correct happening instead of silly colors =)
Generally if you look at the macro for D3DRGB you find the answer: D3DRGB(r, g, b) \ (0xff000000L / ( ((long)((r) * 255)) << 16) / \ (((long)((g) * 255)) << 8) / (long)((b) * 255))
The value you pass in is multiplied by 255 and you get an integer back out. It seems strange, but all your saying really is that you want a percentage saturation of the colour channel. Not sure how else to explain it really.