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

Yellow Label size in case of high screen resolution #63

Closed
TwinFan opened this issue Dec 15, 2018 · 5 comments
Closed

Yellow Label size in case of high screen resolution #63

TwinFan opened this issue Dec 15, 2018 · 5 comments
Assignees
Labels
bug Something isn't working confirmed Bug confirmed, reproducible. external dependency

Comments

@TwinFan
Copy link
Owner

TwinFan commented Dec 15, 2018

Current Situation / Problem
Follow-up to #60:
The yellow a/c labels are unreadable in VR view, probably due to high resoltuion.

Suggested Solution
Adapt label size to screen resolution.
This would be a change in the multiplayer library.

Benefits
Readable labels also in high screen resolution situations like VR.

@TwinFan TwinFan added the enhancement New feature or request label Dec 15, 2018
@TwinFan TwinFan added this to the Public Beta v0.9 milestone Dec 15, 2018
@TwinFan TwinFan self-assigned this Dec 15, 2018
@TwinFan
Copy link
Owner Author

TwinFan commented Dec 25, 2018

While playing with a Parsec server with a lot higher rendering capabilities than my little MacBook I started to understand why the labels are unreadable...so I actually have a test bed.

Drawing labels is in xplanemp, XPMPPlaneRenderer.cpp, function XPMPDefaultPlaneRenderer, PASS 4 - Labels using a more or less simple call to XPLMDrawString. That call uses a font id, but has no way of passing a font size! (BTW...the two lines above deal with the color as in #53)

While searching for changing the font size found this article on a general setting in XP11. Maybe that helps, to be tested...because the API provides no way to the developer. But then there is this forum thread specifically also mentioning xsquawkbox (which uses the same library) having no chance of changing the font....

@TwinFan
Copy link
Owner Author

TwinFan commented Dec 26, 2018

I‘ve commented here in the forums how this problem has to do with SSAA antialiasing. Should file a bug with Laminar, though.

@TwinFan TwinFan added bug Something isn't working confirmed Bug confirmed, reproducible. external dependency and removed enhancement New feature or request labels Dec 31, 2018
@TwinFan TwinFan removed their assignment Dec 31, 2018
@TwinFan
Copy link
Owner Author

TwinFan commented Dec 31, 2018

Filed a bug with Laminar, accepted as XPD-9785. That will be listed in release notes if fixed.
Also means: I can't fix it myself but depend on Laminar.

@TwinFan TwinFan modified the milestone: Public Beta v0.9 Dec 31, 2018
@TwinFan
Copy link
Owner Author

TwinFan commented Dec 31, 2018

Ben Supnik himself replied:

„This behavior will not be fixed in future updates; it is a design limitation of the plugin system. The work-around a plugin can/should do is to save the 3-d location of text drawing and then issue the text during a 2-d drawing callback, where the screen is operating in boxels and thus has known scaling properties.

cheers
Ben“

So it‘s back to me then.

Sent with GitHawk

@TwinFan
Copy link
Owner Author

TwinFan commented Jan 1, 2019

The changes solve the issue half-way: Label size is now OK with all antialiasing settings, but the label position is off when SSAA comes into play by the same factors as the label size before, just inverted. I don't find any dataref, which helps me identifying the situation...so far the only guess regarding the antialiasing setting is to read X-Plane.prf, which has a setting renopt_HDR_antial. If we read that during startup and apply coordinate fixes we are mostly correct...only if the user changes antialiasing settings mid-way we would need a way to reinit that config.

TwinFan added a commit to TwinFan/libxplanemp that referenced this issue Jan 2, 2019
@TwinFan TwinFan closed this as completed in 410e029 Jan 2, 2019
swift-project-old pushed a commit to swift-project-old/libxplanemp that referenced this issue Jun 4, 2019
This fixes too small labels on very high resolution screens.
This is based on a fix from LiveTraffic's fork of libxplanemp.
See also TwinFan/LiveTraffic#63
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 confirmed, reproducible. external dependency
Projects
None yet
Development

No branches or pull requests

1 participant