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?

-NiCo-

02-14-2005, 11:31 AM

Well, I'm not sure what you're looking for, but maybe you could specify a seperate specular color.

Also, I'm not sure how you read in your color values, but it looks like you're mixing rgba and bgra data types.

http://oss.sgi.com/projects/ogl-sample/registry/EXT/bgra.txt

Nico

MatsyV9

02-14-2005, 11:50 AM

Great.. I will look at both links to see what I can find. Thanks for your prompt response.

And you are probably right about the color mixing. I am again very new to GL. I'm just stoked it's drawing as exspected aside from the color swap.

Is there a 6+ rating... thanks

-NiCo-

02-14-2005, 12:54 PM

No problem. I'm glad I can help.

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.

Nico

MatsyV9

02-14-2005, 01:47 PM

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.