[SOLVED]Trailing squares

Started by Grilled, May 18, 2015, 02:34:11

Previous topic - Next topic

Grilled

So I'm trying to remake the game break out and I already have my first problem. I have it so that the platform in which the ball bounces off of moves (horizontally) based on wherever the mouse is. But whenever I move the mouse, the platform from the previous position stays in its place as shown here:



Thank you!  :-*

Cornix

May it be that you are not clearing the color buffer bit?

Grilled

I don't think it's that.
I tried calling glClear(GL_COLOR_BUFFER_BIT); after I drew my platform and it just makes the platform disappear completely.

EDIT: I called the clear at the beginning of the draw method and it worked. Thanks! 8)