Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


GL Lighting && Vertex Colors?


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
2 replies to this topic

#1 MrTors   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 August 2001 - 08:25 AM

Hello, I''m somewhat new to openGL, but not too new to 3D concepts. I want to do specify vertex colors along with vertex/face normals for lighting. Is it possible to have both color values from the lighting and the vertex color interpolated over the poly having openGL do it or will have I have to do my own lighting... I''m sure somewhere something says how to do it, but I''m a little lazy in researching for certain things, since I''m really not too interested in the actual graphics processing. If anyone has a quick answer for me please feel free to respond!! Thanks in advance! Robert

Sponsor:

#2 gmcbay   Members   -  Reputation: 130

Like
Likes
Like

Posted 23 August 2001 - 08:38 AM

Its been a while since I''ve messed with this stuff directly, so don''t bet your life on my being correct, but I believe that if you specify the vertex color materials as being emissive, they will be combined with the lighting equation in the the way that you want, eg:

glEnable(GL_COLOR_MATERIAL);
glColorMaterial(GL_FRONT_AND_BACK,GL_EMISSION);

Do your normal polygon setup, using colormats, and put some lights in the scene as usual...



#3 MrTors   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 August 2001 - 01:45 PM

Hmm.. I''ve tried messing with the materials already, but it seems the materials are changed per face not per vertex.. maybe I''m just doing it wrong.




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