Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


direct3d coloring?


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   -  Reputation:

Likes

Posted 07 December 1999 - 05:32 AM

how do make triangles a certain color?

Sponsor:

#2 mhkrause   Members   -  Reputation: 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.



PARTNERS