LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Jakibah on February 03, 2016, 15:01:41

Title: Trail problem
Post by: Jakibah on February 03, 2016, 15:01:41
I have A test project and I am trying to make a test texture move.
But when It moves it leaves a trail how can I solve this???"this is my code :http://pastebin.com/Q9S9vMPh (http://pastebin.com/Q9S9vMPh).
And this is the trail that I want to remove:http://imgur.com/ZedrEis
Title: Re: Trail problem
Post by: kappa on February 03, 2016, 15:05:40
You've got to clear your screen after each frame has been drawn by calling glClear, otherwise the previous contents will remain there and you will just draw over it (causing the trail effect). Example here (http://wiki.lwjgl.org/wiki/LWJGL_Basics_3_(The_Quad)).
Title: Re: Trail problem
Post by: Jakibah on February 03, 2016, 15:33:30
Thanks it worked!!!