Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
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

GL Lighting && Vertex Colors?

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

#1 MrTors   Members   

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

#2 gmcbay   Members   

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   

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.