White looks blue and other colors look wrong in DirectX 8.1 using VB
Posted on 2003-03-10
I am using VB 6.0 and DirectX 8.1a to render scenes of 3D primitives. In order to save the resulting images to file, I am using GetFrontBuffer and SaveSurfaceToFile with a device mode of D3DFMT_A8R8G8B8 (32-bit color). The problem is that all of my color assignments are off. My white's are cyan (128,255,255) and my other colors are off. I imagine this has to do with using 32-bit color and not accounting for the alpha channel. However, I get red when I give it either &HFFFF0000 or &HFF00FF00 or &HFF0000FF! I'm obviously a beginner at this and must be missing something basic. How can I get the colors I expect when assigning long values? I have tried assigning materials and ambient lights without any effect.