Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Labels don't draw on secondary monitors #17

Open
TwinFan opened this issue Jul 28, 2020 · 3 comments
Open

Labels don't draw on secondary monitors #17

TwinFan opened this issue Jul 28, 2020 · 3 comments
Labels
bug Something isn't working confirmed Bug is reproducible

Comments

@TwinFan
Copy link
Owner

TwinFan commented Jul 28, 2020

Describe the bug
the labels only appear for the planes showing on my central monitor (main monitor). Those on the 2 side monitors have no labels, but acquire them as they cross into the middle one.

Also, users consistently report (for ages already) that in VR labels are seen in one eye only. Assuming that the second eye is technically provided as a second screen, this issue is actually the same.

To Reproduce / Source Code Example
Need 2 or monitor setup. Enable Labels.
Watch labels for planes on secondary monitor.

Expected behavior
All planes have labels on all monitors.

Version

  • OS: any
  • X-Plane: any

Additional context
Reported in Discord's beta channel.

@TwinFan TwinFan added the bug Something isn't working label Jul 28, 2020
@TwinFan
Copy link
Owner Author

TwinFan commented Jul 29, 2020

"no difference in setting up 2 monitors properly (with lateral offsets etc.) or just mirroring the 1st display: both show no labels on the 2nd display."

@TwinFan TwinFan added the confirmed Bug is reproducible label Aug 13, 2020
@TwinFan
Copy link
Owner Author

TwinFan commented Aug 13, 2020

Investigated: The technique used is currently available on the main screen only:
There is a 2D drawing callback (for phase xplm_Phase_Window, other phases would only be called for 2D cockpits), which uses OpenGL projection matrices to convert 3D coordinates in 2D screen coordinates and then XPLMDrawString for the actual label.
But the actuall call to the callback happens only for the main screen context. From there,

  • no drawing to the secondary screen is possible,
  • the projection matrices for coordinate conversion for the second screen aren't available.
    I would assume that XP would need to call out callback once per screen to make the above happen, but I can't find a way of doing that.

I comment accordingly to the sample code, in the hope that maybe someone replies there.

@TwinFan
Copy link
Owner Author

TwinFan commented Aug 26, 2020

Ben replied (13d ago already) as follows:

hmmm – if you set the drawing callback to the before windows phase (the example shows after) do you get multi-monitor working? The second eye is not a second screen, it’s a second pass. But the ‘after’ phase isn’t in the HMD at all, the before is.

But changing the callback to "before" doesn't change the situation: It is still called once only, for the main screen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed Bug is reproducible
Projects
None yet
Development

No branches or pull requests

1 participant