From: <ca...@pe...> - 2004-05-24 23:23:51
|
Hi, I am using Mesa6.0.1 (that I compiled myself, make linux) on Suse9.0, and for some reason, I cannot see the specular light components (ambient and diffuse light components work just fine). This worked in rather old versions, say Mesa 3.0, but not in Mesa5.0.2 and probably even Mesa 4.X I cannot say exactly when the problem appeared. This GLUT example shows the problem: http://www.gamgi.org/glut.c In the beginning, I have three arrays, defining ambient, diffuse and specular light components. They are used to define LIGHT0, which then iluminates a GLU sphere and cylinder. The problem is, changing the ambient and diffuse arrays works as expected, but defining the specular array as (1.0, 1.0, 1.0, 1.0) or (0.0, 0.0, 0.0, 1.0) gives the same result: no specular effect at all. Could someone have a look? Thanks a lot! Carlos |
From: Brian P. <bri...@tu...> - 2004-05-25 15:57:45
|
Carlos Pereira wrote: > Hi, > > I am using Mesa6.0.1 (that I compiled myself, make linux) on Suse9.0, and > for some reason, I cannot see the specular light components (ambient > and diffuse light components work just fine). This worked in rather old > versions, say Mesa 3.0, but not in Mesa5.0.2 and probably even Mesa 4.X > I cannot say exactly when the problem appeared. > > This GLUT example shows the problem: > http://www.gamgi.org/glut.c > > In the beginning, I have three arrays, defining ambient, > diffuse and specular light components. They are used to > define LIGHT0, which then iluminates a GLU sphere and cylinder. > > The problem is, changing the ambient and diffuse arrays works > as expected, but defining the specular array as (1.0, 1.0, 1.0, 1.0) > or (0.0, 0.0, 0.0, 1.0) gives the same result: no specular effect > at all. > > Could someone have a look? Thanks a lot! Mesa (4.x, 5.x and 6.x) produces the correct results. You need to specify specular material coefficients with glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, specular). The defaults are (0,0,0,1) -Brian |