View Full Version : OpenGL(ES)...texture and vertex colors?
01-23-2009, 11:56 AM
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.
01-23-2009, 10:56 PM
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.
01-24-2009, 01:22 AM
Is there anything like the modulate texture blend mode in ES ?
01-24-2009, 01:35 AM
If you mean:
Then yes...I have it there.
As for the blend function, I am using alpha blending so that is:
For some reason it doesn't multiply in my vertex colors....puzzling.
01-24-2009, 03:01 AM
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 :o\
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.