sldayo
Topic Author
Posts: 4
Joined: 09 Jun 2015, 20:14

Render only when needed?

15 Jun 2015, 20:22

Hello,

I'm evaluating your framework (v1.2.3), and I hope you don't mind me asking for assistance. I don't have much experience with XAML or even WPF.

First of all, I'm using the native library and the C++ API on Windows (compiling my code with VC++ 2013).

I wish to primarily use your framework for desktop applications, so I naturally wish to reduce the amount of wasteful processing and keep rendering of duplicate frames to a minimum. I would like to be notified whenever there's a need to render again, e.g. when a button's visual state changes, when a menu is fading in (which is a default behavior) an animation is running, etc. I have only experimented a little bit with XAML and storyboards so far.

I did see a few events that looked somewhat useful, such as Storyboard/Timeline::Complete; however, I suspect that it wouldn't be enough to only handle these events, and I'm not even sure how that would work if I don't create these objects manually in code or somehow override this in multiple places using XAML.

A simple limiter in my event handler would hopefully eliminate some more wasteful processing.

Finally, is there an easy way to globally disable animations, fading effects, easing functions, etc., so that I can basically just respect the user's visual settings in the operating system? Instant transition would be fine.

Thank you for any assistance you can provide!
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Render only when needed?

16 Jun 2015, 09:37

Sure! Please use these forums to ask for help.

Unfortunately, the noesisGUI architecture is oriented towards realtime applications that need to pump the screen at a high rate. Being asked for this several times, we are working to improve the architecture a bit including support for knowing when the next Render() call is not needed. That way, you can cache the last frame in a texture and use it instead of wasting resources.
Finally, is there an easy way to globally disable animations, fading effects, easing functions, etc., so that I can basically just respect the user's visual settings in the operating system? Instant transition would be fine.
What exactly do you want to achieve? We provide a powerful templating system that you can use to change the aspect of noesisGUI is many ways. Have you read that tutorial?
 
sldayo
Topic Author
Posts: 4
Joined: 09 Jun 2015, 20:14

Re: Render only when needed?

16 Jun 2015, 16:13

Thank you for your reply!
What exactly do you want to achieve? We provide a powerful templating system that you can use to change the aspect of noesisGUI is many ways. Have you read that tutorial?
Please let me try to explain once more. On Windows (OS), the user can change their performance settings, and enable/disable things like the fade effect for menus, sliding animations, smooth scrolling, etc. These settings are not dependent on whether a particular theme supports this or not. Please note that I'm talking about native GUIs and behaviors on Windows.

My idea was that storyboards/timelines (for example) could finish playing in a single frame, menus would transition from fully transparent to fully opaque in a single frame, etc. I would like your framework to somehow these things into account globally – and hopefully without having to repeat code everywhere in (possibly multiple) custom themes/templates.

Thank you!
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Render only when needed?

16 Jun 2015, 21:11

Please let me try to explain once more. On Windows (OS), the user can change their performance settings, and enable/disable things like the fade effect for menus, sliding animations, smooth scrolling, etc. These settings are not dependent on whether a particular theme supports this or not. Please note that I'm talking about native GUIs and behaviors on Windows.

My idea was that storyboards/timelines (for example) could finish playing in a single frame, menus would transition from fully transparent to fully opaque in a single frame, etc. I would like your framework to somehow these things into account globally – and hopefully without having to repeat code everywhere in (possibly multiple) custom themes/templates.
The correct way to achieve this in noesisGUI is by using different themes. You could have a theme with all the transitions and a second theme for slow machines where all the animations are disabled.

But I am not sure if there would be any benefit from doing it. NoesisGUI bottleneck is the render in the GPU. So, before designing an architecture with that in mind I recommend you to profile carefully.
 
sldayo
Topic Author
Posts: 4
Joined: 09 Jun 2015, 20:14

Re: Render only when needed?

16 Jun 2015, 23:29

I see. Then I should look more into that. Thank you!
But I am not sure if there would be any benefit from doing it. NoesisGUI bottleneck is the render in the GPU. So, before designing an architecture with that in mind I recommend you to profile carefully.
A lot of people really just don't like the extra time it takes for animations to complete, and would prefer instant results, while others would prefer eye-candy. In general, some people are unable to work quickly because animations can reduce predictability, and sometimes even blocks user input. :)
 
sldayo
Topic Author
Posts: 4
Joined: 09 Jun 2015, 20:14

Re: Render only when needed?

11 Jun 2018, 22:42

Hello again,

Is this supported in NoesisGUI v2.1.0f1 (render only when needed)?
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Render only when needed?

18 Jun 2018, 21:15

Yes, although not for partial updates. Have a look at the UpdateRenderTree method in IRenderer.
/// Applies last changes happened in the view. This function does not interacts with the
/// render device. Returns whether the render tree really changed
virtual bool UpdateRenderTree() = 0;

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot], Semrush [Bot] and 70 guests