I’m currently working on a viewer for OpenFlight files, as part of a rather larger project. However,the OpenFlight API’s image loading function seems to work in a rather strange manner (which took a hell of a long time to work out, especially as there was no documentation that I could find as to its behaviour)
Instead of returning pixel data in the usual RGBRGBRGB… format, it returns all the red pixel data, then the green, then the blue. (Anyone with experience with the OpenFlight API who knows otherwise please say so, but all the problems I’ve been having seem to suggest this is how it’s working).
My question is therefore this:
Is there any way that I can use this data directly in a call to glTexImage2D, by using various glPixelStore and/or other OpenGL calls, to avoid having to reprocess the texture data to get it into a more normal format. (This is especially important since the textures are rather large, 1024x1024 images, and the load time is already quite long, and I’d prefer not to have to make it any longer)