2 May 2007 09:25
Re: lighting problem
Mindaugas Vinkelis <fraillt <at> gmail.com>
2007-05-02 07:25:35 GMT
2007-05-02 07:25:35 GMT
Definetly need to set diffuse color.
On 4/28/07, Uday Verma <uday.karan <at> gmail.com> wrote:
May be you should try setting the diffuse material too.On 4/27/07, Tamas Nagy <ngy_tms <at> yahoo.com> wrote:Hi!
Yes, the same code had been copypasted.
Tamas
> Did you copy and paste this code as well?
>
> GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 };
> GLfloat mat_shininess[] = { 50.0 };
> GLfloat light_position[] = { 1.0, 1.0, 1.0, 0.0
> };
>
> glMaterialfv(GL_FRONT, GL_SPECULAR,
> mat_specular);
> glMaterialfv(GL_FRONT, GL_SHININESS,
> mat_shininess);
> glLightfv(GL_LIGHT0, GL_POSITION,
> light_position);
>
>
> -----Original Message-----
> Tamas Nagy
> Sent: Friday, April 27, 2007 2:11 PM
> To: Multiple recipients of list OPENGL-GAMEDEV-L
>
> Hi!
>
> I have a problem. I applied the lights described in
>
>
http://fly.cc.fer.hr/~unreal/theredbook/chapter06.html
>
> to my scene. I copy-pasted the light code.
> I have a box and a sphere both colored red.
>
> When i apply lights glEnable(GL_LIGHTING),
> glEnable(GL_LIGHT0), everything
> becomes gray.
> Lighting works but everything is gray instead of
> red.
>
> Tamas
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
> -----
> FAQ and OpenGL Resources at:
>
>
http://www.geocities.com/SiliconValley/Hills/9956/OpenGL
>
> --
> Author: Tamas Nagy
> INET: ngy_tms <at> yahoo.com
>
> Fat City Hosting, San Diego, California --
> http://www.fatcity.com
>
---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: ListGuru <at> fatcity.com (note EXACT spelling of
> 'ListGuru') and in the
> message BODY, include a line containing: UNSUB
> OPENGL-GAMEDEV-L (or the name
> of mailing list you want to be removed from). You
> may also send the HELP
> command for other information (like subscribing).
>
> -----
> FAQ and OpenGL Resources at:
>
>
http://www.geocities.com/SiliconValley/Hills/9956/OpenGL
>
> --
> Author: Pete Brubaker
> INET: pbrubaker <at> gmail.com
>
> Fat City Hosting, San Diego, California --
> http://www.fatcity.com
>
---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: ListGuru <at> fatcity.com (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> OPENGL-GAMEDEV-L
> (or the name of mailing list you want to be removed
> from). You may
> also send the HELP command for other information
> (like subscribing).
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-----
FAQ and OpenGL Resources at:
http://www.geocities.com/SiliconValley/Hills/9956/OpenGL
--
Author: Tamas Nagy
INET: ngy_tms <at> yahoo.com
Fat City Hosting, San Diego, California -- http://www.fatcity.com
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru <at> fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
--
best regards,
Mindaugas Vinkelis a.k.a. Frail
mailto: fraillt <at> gmail.com
RSS Feed