Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

CM

Color

This topic is 6911 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello,I took tutorial seven I think and enlarged it put a star field texture on it,changed winding order and normals drew and then changed back so everything is pointing in.Then I put triangle in the middle to just move around to see some things.The tri draws but I can''t figure out how to color3f it so i can see it.I know I can texture it and it works(I did that).This is probibly a stupid question but I have to know now.I have tried disabling and enabling things but can''t figure it out.Can you even do that with texturing and lighting.

Share this post


Link to post
Share on other sites
Advertisement
you have to disable testures to draw with colours
and you have to have some lighting properties set
but I can''t remember what they are off the top of my head

Check out my shadows page
and send me some feedback

Share this post


Link to post
Share on other sites
Thanks, I will try that later I think that is about the only thing I didn''t disable. About normal for me.It was late at night I should of went to bed.

Share this post


Link to post
Share on other sites
You cant have coloring, lighting and texturing at once. Lighting and coloring are mutally exclusive (unless your card supports the secondary color extension)

so if you want a colored triangle, disable texturing and lighting.

disable lighting
disable texturing

set color
render triangle (if your shademodel is smooth, you can specify a color for each vertex)
enable things you need again ( lighting, texturing)

If you want a textured triangle modulated with your color, disable lighting, enable textureing and be sure the texture environment is set to modulated.

disable lighting
enable texturing
set texture environment to modulated (default setup, or changed with glTexEnv)

set color
render triangle (if your shade model is smooth, you can specify a color for each vertex)
enable things you need again ( lighting, texturing)

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!