Non power of two jpg texture problem

Started by
2 comments, last by JackLaCrack 13 years, 6 months ago
Hi, I started messing with opengl for my internship and I'm stuck with a texture problem. I use assimp to load models in multiple formats and they usually look good. The problem is with this model of a spider, the textures are jpgs of non power of two sizes and I get this rainbow pattern. I use GL_TEXTURE_RECTANGLE_ARB so I don't think the size should be a problem.

If you have seen this or have ideas as to were the problem is that would be great!

The model is suppose to look like this :

Normal model

But those is what I get :

My render 1
My render 2
My render 3
My render 4

I won't post any code since it is heavily object oriented so I've got stuff every where...
Advertisement
The power of two requirement has been removed several years ago. Unless you are dealing with a very old graphic card there is no need to use GL_TEXTURE_RECTANGLE_ARB. If I remember correctly that extension needs UV coordinates in a pixel basis (not in 0,1 range). Try creating the texture the usual way without GL_TEXTURE_RECTANGLE_ARB.
Divide and conquer the problem. There is a remote possibility that the jpeg decoder is screwing things up. Try loading the texture from a different file format and see if the problem persists. The reason why I mention this is because stripes are typical of chroma conversion issues. Are you converting from YUV to RGB properly? Maybe the jpeg contains non JFIF standard CMYK colour encoding?
Latest project: Sideways Racing on the iPad
Thank you for the fast replies!

I'll investigate your suggestions and report back.

This topic is closed to new replies.

Advertisement