I don't know the complete answer to your predicament off the top of my
head, but it sounds like you are leaving out some steps for deciding
the final color: a review of the famous "Red Book", chapter 4 & 5, the
latter of which makes the highly relevant observation, "Part of this
computation [final pixel color] depends on what lighting is used in
the scene and on how objects in the scene reflect or absorb that
light"

Note the word 'part'; it takes more than just the combination of
Lightfy and Materialfy to set the final color.

The Red Book is at http://www.glprogramming.com/red/. I know the
edition is quite old, but it turns out to be quite up to date for the
version of Open GL (1.3) assumed by OpenGL ES 1.x.

On Jul 22, 1:16 am, dsl <[email protected]> wrote:
> Thanks for the link.
>
> I've used glColorf and that seems to work, but it was my understanding
> that a combination of glLightfv and glMaterialfv would also set the
> color.
>
> Cheers,
> David
>
> On Jul 21, 5:53 pm, jojoma <[email protected]> wrote:
>
> > I don't know much of OpenGL too, but I think your triangle is getting
> > the color gray because it has no color itself, and your lights are
> > gray.
>
> > check this tutorial, might help you get some 
> > pointers:http://blog.jayway.com/2010/01/14/opengl-es-tutorial-for-android-%E2%...
>
> > On Jul 21, 12:55 am, dsl <[email protected]> wrote:
>
> > > Hello all,
>
> > > I'm fairly new to OpenGL ES and am having a heck of a time trying to
> > > get my material to show up.  Right now all I'm looking at is a shaded
> > > gray rotating triangle.  At least it looks shaded (light and dark
> > > parts), but now color other than gray.
>
> > > I've posted my code here:
>
> > > The triangle coordinates, normals, and 
> > > material:http://code.google.com/p/davidslamb/downloads/detail?name=Manual.java
>
> > > The 
> > > renderer:http://code.google.com/p/davidslamb/downloads/detail?name=regularRend...
>
> > > I'm using ambient, diffuse, and emission to create the material.  And
> > > ambient and diffuse for the light.
>
> > > I'm testing on a G1 running Android 1.6.
>
> > > Any insight will be helpful.
>
> > > Cheers,
> > > David

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to