Mindaugas Vinkelis | 2 May 2007 09:25
Picon

Re: lighting problem

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
Roland Krause | 30 May 2007 04:15
Picon
Favicon

Is there an extension to set glClearColor to clear to a gradient

Does anyone know of such a beast? 

Of course, I could just draw a rectangle in viewport coordinates but
that would be boring, wouldn't it?

Regards,
Roland

----- 
FAQ and OpenGL Resources at:
  http://www.geocities.com/SiliconValley/Hills/9956/OpenGL

--

-- 
Author: Roland Krause
  INET: rokrau <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).

Kent Quirk | 30 May 2007 05:20

Re: Is there an extension to set glClearColor to clear to a gradient

Roland Krause wrote:
> Does anyone know of such a beast? 
>
> Of course, I could just draw a rectangle in viewport coordinates but
> that would be boring, wouldn't it?
>
>   
Well....consider what the extension would require -- you would specify 
the color at the corners of the screen. How is that different from 
simply specifying colors for the 4 vertices of a rectangle?

Oh....and just because I've been there, if you try to do this with a 
quad and you specify different vertex colors for all four verts, 
different drivers can give you different results because they may 
triangulate the quad differently.

    Kent

-- 
------------------------------------------------------------
Kent Quirk           I'm making a game about global warming.
Game Architect                        Track the progress at:
CogniToy                http://www.cognitoy.com/meltingpoint

----- 
FAQ and OpenGL Resources at:
  http://www.geocities.com/SiliconValley/Hills/9956/OpenGL

--

-- 
Author: Kent Quirk
  INET: kent_quirk <at> cognitoy.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).

Uday Verma | 30 May 2007 19:15
Picon

Re: Is there an extension to set glClearColor to clear to a gradient



Oh....and just because I've been there, if you try to do this with a
quad and you specify different vertex colors for all four verts,
different drivers can give you different results because they may
triangulate the quad differently.


I am not sure if I understand this.  Did you actually see this?  If this happens its a serious problem with OpenGL conformance.

-Uday


Michael I Gold | 30 May 2007 19:50

Re: Is there an extension to set glClearColor to clear to a gradient

No, its not.  The spec does not guarantee the tesselation of a quad, and interpolation depends on the tesselation.  In fact the spec doesn't mention tesselation at all, although most/all implementations will break quads and polys into triangles.

Uday Verma wrote:


Oh....and just because I've been there, if you try to do this with a
quad and you specify different vertex colors for all four verts,
different drivers can give you different results because they may
triangulate the quad differently.


I am not sure if I understand this.  Did you actually see this?  If this happens its a serious problem with OpenGL conformance.

-Uday


----- FAQ and OpenGL Resources at: http://www.geocities.com/SiliconValley/Hills/9956/OpenGL -- -- Author: Michael I Gold INET: gold <at> berkelium.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).


Gmane