how to set appropriate color
- From: smarto59@xxxxxxxxxxx
- Date: Wed, 2 Apr 2008 11:40:21 -0700 (PDT)
hi everybody
Im just newbie in opengl and I face difficulties to set the
appropriate color for my drawen objects using this code:
////////////////////////////////////////////////////
glPushMatrix();
dif[0]=0.5; dif[1]=0.4; dif[2]=0.1; dif[3]=0;
spc[0]=0.0; spc[1]=0; spc[2]=0.0; spc[3]=0.0;
glMaterialfv(GL_FRONT,GL_SHININESS,dif);
glMaterialfv(GL_FRONT,GL_SPECULAR,spc);
glTranslatef(0,0.49,-2.8);
glScalef(3,1.82,0.01);
glutSolidCube(2.2);
glPopMatrix();
//////////////////////////////////////////////////////////
I only get small range of colors by changing dif parameter. However i
change dif i get yellow, blue, green or red only. But if i change the
color of sphere i get wider range of colors. For example i want brown
or light blue colors how can i set them.
.
- Follow-Ups:
- Re: how to set appropriate color
- From: GAD Zombie
- Re: how to set appropriate color
- From: fungus
- Re: how to set appropriate color
- From: Wolfgang Draxinger
- Re: how to set appropriate color
- Prev by Date: Re: C64 style shader?
- Next by Date: Book on 3D engines?
- Previous by thread: Re: C64 style shader?
- Next by thread: Re: how to set appropriate color
- Index(es):