Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


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

Re: Object always white.

by "jbwest" <jbwest@[EMAIL PROTECTED] > Aug 19, 2008 at 05:06 PM

"mi76" <mi333@[EMAIL PROTECTED]
> wrote in message 
news:g8ff3c$gbh$1@[EMAIL PROTECTED]
> 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."


Yeah, I bet he's passing 1 rather than INT_MAX

-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
tan12V112 Fri Nov 21 6:01:42 CST 2008.