Go Down

Topic: Graphics Background Refresh (Read 442 times) previous topic - next topic

jwestmoreland

Hello All,

I'm using the HDMI output and the vdgfx lib - if I don't completely redraw everything - the background/text I'm updating is persistent - meaning the text just overwrites and doesn't clean up the background -

I have to do:

vdgfx.fillRect(0,0,640,480,vdgfx.Red());

and redraw the entire screen - resulting in a sort of 'flicker'.

I tried doing this:

 vdgfx.fillRect(0,170,640,480,vdgfx.Red());

but it didn't work.

Is there a complete doc for the graphics primitives - I looked at the Adafruit docs - but not all of that is evidently implemented.

I'm mostly just displaying sensor data on the HDMI screen - no graphics call per se other than the print and println commands using vdgfx (other than the fillRect).

Thanks In Advance,
John


Limba

I don't know / haven't check how this library is implemented.

Recommend to use dual framebuffer. Where one is in edit mode and other is drawn to display.
This will prevent flickering and screen tearing. Maybe need to create your own library

That fill command sould be fast. flickering can happen if next command take time or fill command is done by NIOS II softcore.

Is program stucture this kind?

//************
for(i=0; i<SensorCount; i++)
  val = ReadSensor(i);

vdgfx.fillRect(0,0,640,480,vdgfx.White());

for(i=0; i<SensorCount; i++)
{
  vdgfx.text.setCursor(150,350 + i*32);
  vdgfx.println("Sensor %i value is %i", i, val);
}
//************

So print call come right after dispaly clear. Sensor read can take time and can cause flickering.

jwestmoreland

Well, back to the question regarding docs - in order to double-buffer the display; there either needs to be a primitive and/or the address map of the buffer(s) need to be supplied.

Does the Vidor Graphics buffer have a memory map?


jwestmoreland

I will try to see if I can do anything with Vidor_GFXbuffer();
That might only currently work with the NeoPixel stuff - not sure right now.

tksm372

#4
Mar 16, 2019, 10:49 pm Last Edit: Mar 16, 2019, 10:51 pm by tksm372
Hi John,

VidorGFX doc and its implementation are here:
https://github.com/vidor-libraries/VidorBitstream/tree/release/ip/GFX
Minatsu Tukisima

jwestmoreland

Thanks Minatsu - that's helpful.

Go Up