But there is one last question I have for you. I have my color buffers working… But it seems to flip my R and B, or reads my colors in a not intended format… but that is not my actual question just thought I’d throw it out there cause this site hase been very helpful.
My question is per-vertex specular colors. I see a vertex color buffer. But I am uncertain how or if specular colors are supported through this method. And if so how do i acheive it?
Regarding the color-channel swap problem, it could also be caused by improper byte-alignment of the data.
Try setting the PACK_ALIGNMENT and UNPACK_ALIGNMENT to 1 for debugging.
Actually… the R and B ar swapped… I have a wrapper basically that does vertex buffers depending on the renderer of choice. (example… DX or GL)
In DirectX my unlit verticies appear to be using the format BGRA. However in OpenGL its using RGBA… so when i set the color buffer it is exactly swapped. I looked into that exstension and from what I could tell it its used with Texture operations. But I dont see any correlation between vertex buffer objets and the color swapping.
Really what I’m trying to avoid is swapping each vertex color during initalization of the color buffer. However when using materials and light it’s a completely different story. And I will cross that bridge as well when i come to it.