Skip to main content
GameDev.net gamedev.net
๐Ÿ”’ Locked

Diffuse Color

Started by Moltopulp Aug 6, 2002 at 5:21 AM 0 replies 400+ views
Original Post
Moltopulp
Moltopulp
Hi, my vertices structure is defined as seguent: struct CUSTOMVERTEX { FLOAT x, y, z; DWORD color; FLOAT u,v; FLOAT u1,v1; }; I fill this structure with the right data and all work fine. For some texture i don''t need to use the color that can be found in the structure, but i need to use the default color (0xFFFFFFFF). Can i set something in the texture stage or i must fill the structure with the default color? Thanks, Alex
McRam
McRam
Hi,

of course you can use a default color without describing it in the Vertex-Struct. Simply set a Material with the wanted color with SetMaterial() and set the Renderstate D3DRS_DIFFUSEMATERIALSOURCE to D3DMCS_MATERIAL (instead of D3DMCS_COLOR1). That''s all

McRam

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.