Skip to main content
gamedev.net
🔒 Locked

colour problem

Started by ogl 0 replies 450+ views
Original Post
ogl
ogl
Hi I''m using glMaterialfv and some colours aren''t displayed correctly i.e. red is grey - how can I sort this out? cheers
Fox Mc Cloud
Fox Mc Cloud
It all depends on wether lighting is activated or not...
If lighting is enabled ( glEnable(GL_LIGHTING); ), then the colors on your object will be a combination of the light and the material you assigned to the object.
If lighting is disabled ( glDisable(GL_LIGHTING); ), then the color on your object will just be the one you gave to glColor3f();
My guess is you haven''t enabled light, or your light is not configured properly.

--
New feature - Windows users, press ALT-F4 to launch the IQ test.
--New feature - Windows users, press ALT-F4 to launch the IQ test.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.