markv12
markv12

Reputation: 344

OpenGL ES How to draw on top of previous frame

I want to be able to draw on top of the previous frame to track the motion of a particle. First I tried not calling glClear() and this works on the iPad simulator, but produces a flickering affect on the actual device. There are 4000 particles to draw so drawing more each frame isn't an option for performance reasons. Is there some way to execute the current drawing commands on top of the previous frame. Something like combining the current buffer with the previous?

Thanks!

Upvotes: 1

Views: 565

Answers (1)

Christian Rau
Christian Rau

Reputation: 45948

It is generally a good idea to draw everything every frame (at least if using double buffering). What you can do is draw the scene into a texture (using FBOs) incrementally (without glClear) and then just display this texture every frame.

Upvotes: 3

Related Questions