Sign in to follow this  

BGRA to ARGB

This topic is 4528 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 4528 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this