Talk About Network

Google





Graphics > OpenGL 3D API > Re: Object alwa...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 11 Topic 4875 of 5061
Post > Topic >>

Re: Object always white.

by "jbwest" <jbwest@[EMAIL PROTECTED] > Aug 19, 2008 at 11:23 AM

"Flark" <flarkino@[EMAIL PROTECTED]
> wrote in message 
news:4467335d-5bbe-4e7d-ad96-dce0d490412e@[EMAIL PROTECTED]
> Hi,
>
> I'm using this to set my material's colors:
>
> glMaterialiv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE,
> color);
> glMaterialiv (GL_FRONT, GL_SPECULAR, spec);
> glMaterialiv (GL_FRONT, GL_EMISSION, emiss);
> glMaterialf (GL_FRONT, GL_****NINESS, ****ny);
>
> However I am finding that my object is always white.
> And glColor3iv always set the object to black.
>
> I am also doing this:
> glEnable(GL_COLOR_MATERIAL);
>
> Anybody know what could be causing the
> white/black object problem?
>
> Thanks.

Do you have light(s) and normals specified? They all need to be there for 
materials to work. You also need to invoke glColorMaterial() to make 
glColor3iv  work.


-jbw
 




 11 Posts in Topic:
Object always white.
Flark <flarkino@[EMAIL  2008-08-19 10:26:53 
Re: Object always white.
"jbwest" <jb  2008-08-19 11:23:37 
Re: Object always white.
Flark <flarkino@[EMAIL  2008-08-19 11:50:44 
Re: Object always white.
mi76 <mi333@[EMAIL PRO  2008-08-19 23:48:29 
Re: Object always white.
"jbwest" <jb  2008-08-19 17:06:12 
Re: Object always white.
fungus <openglMYSOCKS@  2008-08-19 15:07:10 
Re: Object always white.
Flark <flarkino@[EMAIL  2008-08-20 04:39:57 
Re: Object always white.
"jbwest" <jb  2008-08-20 08:04:03 
Re: Object always white.
Flark <flarkino@[EMAIL  2008-08-20 04:46:38 
Re: Object always white.
crjjrc <crjjrc@[EMAIL   2008-08-20 07:25:59 
Re: Object always white.
Flark <flarkino@[EMAIL  2008-08-20 08:21:37 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Fri Jan 9 15:11:15 PST 2009.