Hello Guest

[SOLVED]Trailing squares

  • 2 Replies
  • 1400 Views
[SOLVED]Trailing squares
« 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:



Thank you!  :-*
« Last Edit: May 19, 2015, 01:50:51 by Grilled »

*

Offline Cornix

  • *****
  • 488
Re: Trailing squares
« Reply #1 on: May 18, 2015, 06:39:16 »
May it be that you are not clearing the color buffer bit?

Re: Trailing squares
« Reply #2 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)
« Last Edit: May 19, 2015, 01:50:30 by Grilled »