Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

direct3d coloring?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 Anonymous Poster_Anonymous Poster_*   Guests   

Likes

Posted 07 December 1999 - 05:32 AM

how do make triangles a certain color?

#2 mhkrause   Members   

122
Like
Likes
Like

Posted 07 December 1999 - 05:32 AM

There are a couple of different ways. I'm not going to get into using lighting to do this, it's covered in the SDK under Direct3D\Direct3D Immediate Mode\Direct3D Immediate Mode Essentials\Materials and Lighting.

Probably the easiest way to do it, is to disable Direct3D's lighting module, by calling
pd3dDevice->SetRenderState(D3DRENDERSTATE_LIGHTING, FALSE);
Then, create a lit vertex, with the FVF format D3DFVF_LVERTEX. Set the vertex color (don't worry about the specular somponent) to whatever color you want. These colors are RGB triples, so for bright red, the color would be 0xFF0000.






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.