broken textures when draw lines

Hello!

I have a strange problem, i draw some textured boxes, they are drawn corectlly, but when i draw some lines over scene, the textures change the colors strange, what can be the problem?

Thanks in advance.

If you don’t want your lines to be affected by the texture, you have to disable texturing with glDisable(GL_TEXTURE_2D).

the problem is that not the lines are affected, textures are affected by lines but i dont know why?

i still cant find the solution, any idea pls?

I guess you change the current color when you draw lines and that you doenst mess with texture environments yet. Set the color to white before you render the textured box and i guess everything will be ok for now.

Default texture enviroment is GL_MODULATE.
If your lines are rendered in a different color than the textured objects and you didn’t set back the color before rendering the textures, you need to either issue a glColor call to initilialize the render state or you can change the texture environment mode to GL_REPLACE (full texture color).
Similar when lighting is enabled. You need to have normals and materials setup identically for every frame to get consistent results.
If you mean your texture go completely out of their mind like corrupted images, check your glTexImage calls. You don’t need to do that per frame anyway with texture objects.
Watch out for unpack alignment issues, the default is 4, for RGB tetxures you should use 1.

Show some code which breaks.
(edit: Hehe, double post.)