Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: sprite and paint

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2013
    Posts
    3

    sprite and paint

    Hello,

    I am writing a little program to try OpenGL SE on android. I have a sprite moving on the screen as in old arcade games.
    What I would like to do, is that the sprite leaves a trail of paint behind him. I do not know what it's the best way to implement that.
    I can divide the backgroud in many many small cells and colored them. Or I can change pixels colors in a texture and apply it onto the background.
    What is the most efficient way of doing that ?

    Thanks for your help !

    Olivier

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Apr 2010
    Posts
    742
    You could keep track of the N last sprite positions and draw GL_POINTS at those (possible with decreasing size) or to avoid gaps in the trail use GL_LINE_STRIP.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •