Significant rendering update#20
Significant rendering update#20samtherussell merged 7 commits intoTeachingTechnologistBeth:masterfrom
Conversation
Still runs with a 30Hz "ticker" thread, which I want to get rid of.
Simulation-triggered dynamic refresh is capped at 30Hz, static drawing (includes a dynamic redraw) happens as needed on user interactions.
Dynamic refresh is capped at 30Hz, changes which occur faster than that are shown using persistence-of-vision. In the new system, LEDs which were turned on at any point between the last rendered refresh and this one are displayed as being on. I also added backend support for adjustable dynamic (simulation-driven) refresh rate, although this may not be that useful. Overhauled zoom to support a wider range of zoom levels and smooth zoom in/out e.g. with trackpad. Finally fixed zoom-to-point: zooming in and out rapidly no longer causes the camera location to jump around randomly. Grid display is now disabled when extremely zoomed-out, which greatly improves performance (lots of lines = bad).
This is still useful at low simulation speeds!
|
Your'e a super star! :-p Had a quick look and it all seems fine. Hopefully I won't get students complaining all the time how it kills there laptops. The for the sleep function we could probably just get away with sleeping in ms and scrap the busy wait because no actually cares about the actually speed of it, but I guess its not doing to much harm to the performance. |
|
Just found a little bug. When opening files like |
|
Oh sure, so basically if you need to redraw at any point just call
`Main.ui.view.flagStaticRedraw()`. Looks like I didn't catch every case :s
might want to check other menu options that cause a state or view change?
…On 29 Nov 2016 12:28 a.m., "Samuel Russell" ***@***.***> wrote:
Just found a little bug. When opening files like
test.modsim.txt
<https://github.com/uobteachingtechnologist/ModuleSim/files/617826/test.modsim.txt>
the wire don't render properly until a mouse press forces the screen the
screen to be redrawn. Had a little look... might be something to do with
xml readin. It didn't show up before because the screen updates meant it
was updates anyway in a fraction of a second. Any ideas??
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACclb7kpSASdUOU9qJN05-R0K7clAOX_ks5rC3GYgaJpZM4K8-sF>
.
|
|
Yeah, that's what I thought, but I couldn't find it. I did a little more digging and I think it might be some thing to do with setting the start and end of besier paths. Ie. The XML reader never does it And I'm pretty sure it should. Having said that I couldn't seem to get working. |
In terms of UX:
On the backend, this encompasses ditching the old 30Hz-locked view refresh, and creating a split between "static" and "dynamic" rendering, where the background grid and module shapes make up the static portion. Static content is rendered relatively infrequently, chiefly when the camera is moved or zoomed. Dynamic content - stuff that depends on the simulation state - is rendered passively at 30Hz (with persistence-of-vision) and is also updated whenever the static content is.
Should solve #16 and fixes long-standing problems with camera zoom.