GPWiki.org
GPWiki.org
It is currently Thu May 23, 2013 5:29 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sun Jul 29, 2012 4:06 pm 
Bit Baby

Joined: Tue May 29, 2012 5:19 pm
Posts: 9
Location: Germany
Hello,

I have the problem with Opengl, that I cant use a glColor... Command,
when GL_LIGHTING is enabled. Do you know why, or is it just my Hardware?

avrrobot

_________________
Hope you dont mind spelling mistakes.
Greetings from Germany.


Top
 Profile  
 
PostPosted: Sun Jul 29, 2012 5:58 pm 
Corpse Bride
User avatar

Joined: Tue Jul 01, 2008 11:44 pm
Posts: 2217
Location: England
gl_lighting normally overrides gl_color, as gl_lighting does in fact set the vertex colours.

To use gl_lighting properly you have to specify the material of the polygon, because the material is what governs how light is to be reflected.

A material has emissive, diffuse and ambient components. What you want to achieve, is to set the colour of these reflective material components, which is done using glEnable (GL_COLOR_MATERIAL) ;.

_________________
I ain't pushing no moon buttons.


Top
 Profile  
 
PostPosted: Mon Jul 30, 2012 5:49 am 
Bit Baby

Joined: Tue May 29, 2012 5:19 pm
Posts: 9
Location: Germany
Thanks, worked totally fine! :thumbs

_________________
Hope you dont mind spelling mistakes.
Greetings from Germany.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group