craig.biggs_ Posted December 3, 2012 Posted December 3, 2012 Hi, I just had a few questions (possibly dumb) to clear up some confusion on my part with regards to the use of the -video_refresh option upon start up and the WidgetSpriteViewport::setIFPS call. 1) If you are purely using WidgetSpriteViewport for drawing to screen, is there any significance in the value passed for the -video_refresh option? ie can you completely control your frame rate via WidgetSpriteViewport::setIFPS? 2) If so, what happens if you set your IFPS to higher frame rate than the value passed for -video_refresh? 3) The FPS counter in the right top corner of the screen - does this have any significance for WidgetSpriteViewport? And say you are displaying more than 1 WidgetSpriteViewport at any point in time what does the FPS counter overlay mean? 4) I found setting call setEnabled(0) on a WidgetSpriteViewport and the FPS value was still being impacted by the disabled WidgetSpriteViewport (as if it was still drawing to screen). Is there any flag/function that you can call on a WidgetSpriteViewport to stop this from happening or should you just destroy the object altogether? thanks Craig
ulf.schroeter Posted December 3, 2012 Posted December 3, 2012 Quite a lot of questions :) I would guess that at least all FPS setup and indication is related to the total render loop cycle (main + viewports) and physical buffer swap. So if you configure some fixed video refresh limit, viewport fps can never exceed this limit. it its possible to setup a lower viewport rendering frame rate than the main screen but in your use-case this does not seem to be required/wanted. Also there are still some issues with fixed time delta rendering in viewports https://developer.unigine.com/forum/topic/444-widgetspriteviewport-fixed-fps-rendering/page__p__2172__hl__viewport#entry2172
manguste Posted December 17, 2012 Posted December 17, 2012 Hi Craig, 1) If you are purely using WidgetSpriteViewport for drawing to screen, is there any significance in the value passed for the -video_refresh option? ie can you completely control your frame rate via WidgetSpriteViewport::setIFPS? 2) If so, what happens if you set your IFPS to higher frame rate than the value passed for -video_refresh? video_refresh option sets the maximum refresh rate for the window in which Unigine is rendered. (BTW, it's available only in Windows.) Hence, IFPS of WidgetSpriteViewport cannot be higher than that - if set higher, it would simply be clamped. 3) The FPS counter in the right top corner of the screen - does this have any significance for WidgetSpriteViewport? And say you are displaying more than 1 WidgetSpriteViewport at any point in time what does the FPS counter overlay mean? Again, this is a framerate at which Unigine window is rendered. If you use 3 WidgetSpriteViewport widgets to render the world, that would basically mean a framerate used to rendrer all of them together. 4) I found setting call setEnabled(0) on a WidgetSpriteViewport and the FPS value was still being impacted by the disabled WidgetSpriteViewport (as if it was still drawing to screen). Is there any flag/function that you can call on a WidgetSpriteViewport to stop this from happening or should you just destroy the object altogether? Disabling a widget is not like disabling node. It means, that its options are unavailable, but you can still see them, so they do affect FPS. For example, here are disabled comboboxes: What you need is hiding a widget via Widget::setHidden().
Recommended Posts