LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Grilled on May 18, 2015, 02:34:11

Title: [SOLVED]Trailing squares
Post by: Grilled on May 18, 2015, 02:34:11
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:

(http://puu.sh/hRjRV/d540ff318d.png)

Thank you!  :-*
Title: Re: Trailing squares
Post by: Cornix on May 18, 2015, 06:39:16
May it be that you are not clearing the color buffer bit?
Title: Re: Trailing squares
Post by: Grilled on May 19, 2015, 01:48:53
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)