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 4 of 11 Topic 4875 of 5061
Post > Topic >>

Re: Object always white.

by mi76 <mi333@[EMAIL PROTECTED] > Aug 19, 2008 at 11:48 PM

Flark wrote:
> I'm using this to set my material's colors:
> 
> glMaterialiv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE,
> 		color);

> However I am finding that my object is always white.

How does the "color" array look like? May be something is wrong
with it. Did you try "glMaterialfv"?

GLfloat color[] = {0.44f, 0.16f, 0.78f, 1.0f};
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, color);

"Integer values are mapped linearly such that the most positive
representable value maps to 1.0, and the most negative representable 
value maps to -1.0. Floating-point values are mapped directly. Neither 
integer nor floating-point values are clamped."
 




 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 14:12:42 PST 2009.