PDA

View Full Version : Odd colours



02-02-2004, 07:25 AM
I've been making a simple game, and although I've managed to iron out all the seg faults and most of the bugs, some never the less still remain. Most notably is the following graphics bug which I can't quite isolate.

Basically, I'll be playing along, and the whole screen will change colour. It seems to be linked to my particles, as the colour changes in time and intensity with which particles are on the screen. Each particle is a textured quad. Either the texture is plain, and the colour is added by changing the colours of the vertices, or the vertices are all set to white, and the texture has the colour (when I wanted a more involved effect...). When I look through my code, I can't find a reason why the colour of the particles should bleed across the whole screen. Any suggestions? See images at http://www.personal.rdg.ac.uk/~sir03me/

shinpaughp
02-02-2004, 07:01 PM
Probably you aren't disabling the texture after finishing with it and the tex coord is being used for everything else. Try verifying that you disable your texture each frame when you don't need it.

02-03-2004, 04:01 AM
doesn't seem that simple... I'm fairly confident that I'm calling glDisable(GL_TEXTURE_2D) between rendering things that have needed it enabled and those that don't. Besides which, the yellow, blue or white colour bleeds come in time with the particles that have their colour set through the vertices rather than the texture - but I know I reset the colour afterwards.
Further more, having now run it on two systems, my ATI based one runs it perfectly, but the nVidia one (from which the screenshots were snapped) gives the problems. Considering that I'm not using anything more interesting than the basics of the red book I'm not sure why this occurs. Any more suggestions?

I'll endevour to post the rendering functions at the link above.