Re-drawing graphics is slow and flickering. Is there another way?

Hi!

I'm building an attitude indicator with a 320*240 pixel TFT with the UTFT library.
I'm using a simple "bar" in the middle of the screen made up by the drawLine command.
When you are turning, the "bar" tilts at different angles and also goes up and down with changes in pitch.
For every degree of pitch and roll the gyro is changing you have to re-draw the bar in a new position and black out the old one.
The problem is when I black out the old position of the bar, it is also writing black over the background where I have extensive graphics. My current solution is to clear the screen and re-draw everything from scratch. This is slow and too flickering though.
Are there any other ways of doing this? Something like a sprite hovering over a background...

Which display is that ? Which controller ? Does it have SPI interface ?
Which Arduino board ?

The U8Glib does the redraw by default. You need fast hardware SPI for moving graphics.

You could also try the Teensy 3.1 board, that is small and fast.

Thanks for your response.

I am using the SainSmart 3.2" TFT LCD Display + Touch Panel with Mega2560 and the TFT shield.
The specs for the TFT are:

240374PQ
65K color
320*240
3.2 inch
Wide viewing angle
SSD1289:240 RGB x 320 TFT Driver
Integrated Power, Gate and Source Driver With RAM
ADS7843:4-WIRE TOUCH, UP TO 125kHz CONVERSION RATE, SERIAL INTERFACE

It's an impressive difference on the video link you gave me.
I guess I will have to lok into the Teensy board but also the The U8Glib.

Mod: Actually it looks like the SSD1289 won't work with U8Glib...

This one ?
http://www.sainsmart.com/sainsmart-3-2-tft-lcd-display-touch-panel-pcb-adapter-sd-slot-for-arduino-2560.html
I don't know that library, so I don't know how to make your horizon in front of data (in the background so to speak).
The display is cheap, but you better buy from Adafruit, they have good libraries and good explanation.

I'm sorry, but I don't know how to fix this with that library.
Two graphics layers in software (like sprites) is probably not implementen by any library.

That's too bad, that the U8Glib doesn't support it : Google Code Archive - Long-term storage for Google Code Project Hosting.
With the U8Glib I tried to write a moving news ticker at the bottom of a OLED screen, and it is without any flickering.

Yes, that's the right display.
Maybe I'll try the Teensy board to speed it up if I can't get this going the right way.
Thanks for your effort though!

That video is a teensy board with a Adafruit display.
So the library was already good, and for the optimization some special tricks are used that are only possible with the Teensy 3.1 board.
The library you use might only benefit from the higher speed of the Teensy, so that will not result in the high speed of that video, perhaps that library won't even run on a Teensy.

Some videos with horizon : Marc Robitaille - YouTube
I can't find which display and which library he uses.

I've seen this guys youtube videos before. He started way ahead of me. It says he's going to put up a website with his project but nothing so far.

So what screen resolution was your oled when u had it hooked up to a Teensy?
Looking at the U8Glib, I can't seem to find a driver for the 320*240 pixel which would be a minimum for what I need for this project.

My OLED is only 128x64, single color.
And I had it running on a Uno with hardware SPI.
The U8Glib is for smaller displays I guess. It is optimized to use only little memory.