Advertisement

annoying blue lines

Started by March 26, 2003 07:55 AM
0 comments, last by paulbird 21 years, 11 months ago
Hello - can anyone help? In some of my programs, if I use I change textures quickly something like this: glTexture(....); //load texture A glBegin(GL_QUADS)......glEnd((); //draw quad 1 glTexture(....); //load texture B glBegin(GL_QUADS).....glEnd(); //draw quad 2 The second texture does not load or lines appear on the second texture especially if the GL window is nearly full-screen. Sometimes I can avoid this by using very small textures such as 32x32 or putting all my textures on a single bitmap and using texture co-ordinates to select part of the bitmap to use but I don't necessarily always want to do this. Has anyone found similar problems? P.S. Is there a standard way to use textures all from one bitmap? Because if I change the size of the bitmap to put more textures onto it I don't want to have to change all my code ALSO: In openGL you have to swith from RGB to BGR which either means changing your bitmap before hand or using a for/next loop in the program such as: for(z=0;z<256*256*3;z+=3){ c=data[z]; data[z]=data[z+2]; data[z+2]=c; } Usually, if I have to change it in the program this for/next loop is fast enough - but surely there must be a simpler way? How could openGL not support RGB format? Strange... [edited by - paulbird on March 26, 2003 9:06:45 AM]
um... use glBindTexture instead of glTexture?

openGL does support RGB, infact it''s hard to use BGR mode.

I suggest you folow the tuturials a little bit more.

This topic is closed to new replies.

Advertisement