Results 1 to 5 of 5

Thread: OpenGL(ES)...texture and vertex colors?

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2007
    Posts
    6

    OpenGL(ES)...texture and vertex colors?

    Hi,
    This one has me a bit puzzled. I set up the arrays to get textured quad with vertex colors blended in but I can't get it to work.

    Colored vertices without texture - works.
    Textured - works.

    Both - no go.

    I tried glEndable(GL_COLOR_MATERIAL) hoping that would do it, but no luck.
    I do bind the color array.

    Is there something I need to do to get it to work?

    Any hints appreciated.

    Kaj

  2. #2
    Junior Member Newbie
    Join Date
    Feb 2007
    Posts
    6

    Re: OpenGL(ES)...texture and vertex colors?

    Hmmm...maybe I should rephrase - the first message was a tad chaotic.

    Basically I am just trying to render a triangle, textured, however with vertex colors blended in.
    I have done it with shaders, I have done it on the PSP but can't seem to get it working in openGL ES.

    Surely it can be done without combiners? I mean...any lighting code does it implicitly.

    I searched but no tutorial mentions it....they go straight into lighting when they're done discussing a textured primitive.

    Kaj \

  3. #3
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: OpenGL(ES)...texture and vertex colors?

    Is there anything like the modulate texture blend mode in ES ?

  4. #4
    Junior Member Newbie
    Join Date
    Feb 2007
    Posts
    6

    Re: OpenGL(ES)...texture and vertex colors?

    If you mean:
    glTexEnvi(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MO DULATE);

    Then yes...I have it there.

    As for the blend function, I am using alpha blending so that is:
    glEnable(GL_BLEND);
    glBlendFunc(GL_ONE,GL_ONE_MINUS_SRC_ALPHA);

    For some reason it doesn't multiply in my vertex colors....puzzling.

    Kaj

  5. #5
    Junior Member Newbie
    Join Date
    Feb 2007
    Posts
    6

    Re: OpenGL(ES)...texture and vertex colors?

    Ugh....it did work, but due to some stupidity it didn't show. I had a texture with only greens in it (no R or B) and the vertex colors had R and B, and since it's multiplicative....ah well, you get the idea \

Similar Threads

  1. Replies: 3
    Last Post: 06-19-2016, 08:11 AM
  2. ? Colors per vertex or per face ?
    By Z-Knight in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 09-14-2011, 10:31 AM
  3. Dot3 vertex colors
    By halo in forum OpenGL: Advanced Coding
    Replies: 8
    Last Post: 05-25-2006, 03:14 PM
  4. Vertex Colors
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 05-30-2003, 10:49 AM
  5. Vertex colors and lights.
    By dxantos in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 10-03-2000, 05:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean