Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter Beta
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Orbiter Beta Topics related to Beta releases of Orbiter and Orbiter development.

Reply
 
Thread Tools
Old 07-20-2017, 09:56 AM   #1
fred18
Addon Developer

Default Bug: oapiSetMainInfoVisibilityMode

Hi, I want to highlight a small bug I encountered:

oapiSetMainInfoVisibilityMode and oapiSetMainMenuVisibilityMode

do not work correctly if they are set to 1 and then to 0 again in a matter of few steps (3 for my case).

In the space network plugin I'm developing the user will have the chance of taking a screenshot and send it around. For taking a screenshot my routine gets the main info visibility mode and the main menu visibility mode, store them, set the visibility modes to 1 in order to hide them for the picture, and after 3 frames passed it restores them.

issue is that once restored, even if they were set on show, they are not there. If I right click on the main menu area the dialog that appears correctly put them as "show" but they are not there:



it is necesseray to toggle to hide and then show again in the dialog to make them appear.

taking another screenshot (therefore making the same process again) restores them, and then the cycle repeats.

My suspect is that, since I'm not running with V-sync and with D3D9 I have a high frame rate (around 1k FPS) the 3 frames that the routine waits before restoring the visibility modes are not enough to let the client graphically render the next frame, but I don't know if it's related or not.

Thanks
Fred
fred18 is offline   Reply With Quote
Old 07-20-2017, 01:22 PM   #2
jarmonik
Beta Tester

Default

I don't know if this is related to your problem. There is a delay of 3 frames in DX9 between making rendering calls and displaying the rendered frame. So, in other words the displayed image laggs 3 frames behind the actual simulation state. (No way to reduce that.)

You should wait at-least 4 frames between view state/camera changes and taking a screen shot. But something doesn't seem right since the most methods used for taking a screenshots should put the pipeline to stall (wait) because an access to render target data shouldn't be possible as long as rendering commands are queued. (need to wait to flush the queue empty). (that's the most common source of lagg) I don't know if there are exceptions in accessing front buffer data.

Last edited by jarmonik; 07-20-2017 at 01:29 PM.
jarmonik is offline   Reply With Quote
Old 07-20-2017, 04:09 PM   #3
fred18
Addon Developer

Default

Quote:
Originally Posted by jarmonik View Post
 I don't know if this is related to your problem. There is a delay of 3 frames in DX9 between making rendering calls and displaying the rendered frame. So, in other words the displayed image laggs 3 frames behind the actual simulation state. (No way to reduce that.)

You should wait at-least 4 frames between view state/camera changes and taking a screen shot. But something doesn't seem right since the most methods used for taking a screenshots should put the pipeline to stall (wait) because an access to render target data shouldn't be possible as long as rendering commands are queued. (need to wait to flush the queue empty). (that's the most common source of lagg) I don't know if there are exceptions in accessing front buffer data.
Thanks, I think that it's more relevant to the fact that I don't use vertical sync: if I let the process wait half a second between screenshot steps everything works ok, so I think that it's because it needs to render the frames in order to have the menus setup applied.
fred18 is offline   Reply With Quote
Reply

  Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter Beta


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 05:37 PM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.