pi3d - Fastest way to do dynamic text - Raspberry Pi Forums


i wish have 3d graphics in background number text in foreground. number text position , attitude data needs updating @ reasonable rate. changing single piece of text consumes processing power. have many numbers update , pi going suffer.

@ each screen refresh doing following:

code: select all

  pstr = "%01d" % pitch   pitch_string = pi3d.string(camera=hud_camera, font=hudfont, string=pstr)   pitch_string.translate(1.2, 0.7, 2)   pitch_string.set_shader(flatsh)   pitch_string.draw() [code] using uv_flat shader 3d on.  creation of new string appears add processing demand.  correct create new .string object or there function re-use old one?  there benefit?  understand creating font object pre-renders whole font , text object points right bits of rendered font map.  can't see obvious way of speeding new text object generation.  maybe 2d text rendering help.  not sure have found magic combination switches text rendering 2d.  whatever have done result in same processor load or worse.  of experiments result in text disappearing.  running outside of x made no noticeable difference processor load.  tk screen might have done tk screen sits @ back.

if forgot ask. there suitable example code this?

indication of processor load running on desktop. 25fps rate simple 3d stuff happening , no text changes there processor load of 6%. updating single 3 digit number @ 25fps doubles load. on pi 40% load. pi needs other things on limit.

25fps overkill single value. have @ least 6 values update regularly. gives me rate of 4fps less smooth.

not of digits change of time. split text individual digits modify ones change in last frame. there better way?


raspberrypi



Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62