BGRA to ARGB

Started by
1 comment, last by RipTorn 18 years, 9 months ago
Hi, I've a array of color data (ARGB format) which i pass in to OpenGL through GL.glColorPointer(4, GL_UNSIGNED_BYTE,0, *MyColorData); OpenGL seems to be rendering with BGRA format so I have weird colors for my models. Is there anyway to specify what color format I'm using?? I don't want to reformat my data to BGRA. Thanks in advance.
To Live Is To Die.
Advertisement
The default thing is RGBA rendering.
And allthough it is possible to set some input formats in Ogl(BGRA and so on) i don't think ARGB is one of them.

So your only option is really to swap around the bytes to fit RGBA, either at load time or just after.
It is not that hard.
unfortunatly, the GL_BGRA and GL_ARGB extensions only work for loading data into textures, and opengl doesn't support the level of vertex buffer customization as direct 3d, so you'll just have to bite the bullet and convert them yourself. sorry.

This topic is closed to new replies.

Advertisement