Hi, basically what I want to do is draw my scene, copy it to a texture, and then draw the texture before I draw the scene the next time. Basically what I want to do is create motion trails behind my objects. Here’s my code:
glColor4f(1.f, 1.f, 1.f, 0.97f);
glTexCoord2f(0.0, 1.0); glVertex2f(0.f, windowH-textureSize);
glTexCoord2f(0.0, 0.0); glVertex2f(0.f, windowH);
glTexCoord2f(1.0, 0.0); glVertex2f(textureSize, windowH);
glTexCoord2f(1.0, 1.0); glVertex2f(textureSize, windowH-textureSize);
// draw some spheres or whatever
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, windowW, windowH);
This mostly works, but if I set the alpha value high (you’ll notice it’s at .97 above), the trails don’t fade out all the way to black. They sort of fade to a dark grey. Obviously I want them to disappear completely after a second or so.
I can’t for the life of me figure out why this happens. Here’s a magnified screenshot:
I’ve got a GeForce 7800GT on WinXP.