Results 1 to 4 of 4

Thread: a question about ColorMaterial

  1. #1

    a question about ColorMaterial

    hi all:
    for OpenGL ES
    1) if i enable Color material and enable Color array(i also feed color data into color array).
    does the material come from color array??

    2)if i enable Color material and enable Color array but i also call glColor*
    where is the material come from? color array? or the color form glColor*?

  2. #2
    Senior Member
    Join Date
    May 2006
    Posts
    353
    1) Yes, the ambient and diffuse colors of the material will be replaced by the color from the color array.

    2) Vertex arrays override current vertex attributes, so the color value is taken from the array. That is why they need to be enabled.
    Georg Kolling, Imagination Technologies
    Please ask questions specific to PowerVR hardware or SDKs on the PowerVR Insider Forum
    DevTech@imgtec.com | http://www.powervrinsider.com

  3. #3
    hi Xmas:
    thanks for your reply,

    for (1)
    if colormaterial enable, and the color array enable too,
    each vertex has it's own material parameter?
    or
    3 vertices share one material parameter( and which one? )

  4. #4
    Senior Member
    Join Date
    May 2006
    Posts
    353
    Each vertex has its own ambient and diffuse colors. However, flat shading - which you're likely referring to - can still be independently enabled using glShadeModel.
    Georg Kolling, Imagination Technologies
    Please ask questions specific to PowerVR hardware or SDKs on the PowerVR Insider Forum
    DevTech@imgtec.com | http://www.powervrinsider.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •