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

Qt GUI scale issue #491

Open
rgovindjee opened this issue Nov 29, 2023 · 9 comments
Open

Qt GUI scale issue #491

rgovindjee opened this issue Nov 29, 2023 · 9 comments

Comments

@rgovindjee
Copy link

In both WSL (Ubuntu 22.04) and Windows 10 natively I'm seeing a graphics bug when running with Qt graphics where all waypoints appear as giant triangles (see image). Aircraft also appear at a drastically incorrect scale, and this does not change with zoom level. This does not appear in when using pygame, but we're having issues with FF mode in pygame (possibly unrelated?), and would therefore like to use Qt.

qt_bug

@jooste
Copy link
Member

jooste commented Nov 29, 2023

This has been reported once before, and seems to be related to an incompatibility between a shader setting and your video card driver. I can't reproduce this, so it's difficult to fix. I'll have a look again though, who knows :)

jooste added a commit that referenced this issue Nov 29, 2023
@jooste
Copy link
Member

jooste commented Nov 29, 2023

Hi @rgovindjee, the only difference with other (working) GL functions that I can see is the use of QOpenGLShaderProgram.setAttributeValue to set a fixed scale for screen-coordinates shapes. I've just committed a potential fix which directly uses glVertexAttrib1f instead. Could you try and see if this fixes your issue?

@rgovindjee
Copy link
Author

Thanks for looking into this. Unfortunately this doesn't seem to have resolved the problem.

We seem to have fixed our error with pygame, so can just use that instead. My understanding is there should be no functionality difference?

@jooste
Copy link
Member

jooste commented Nov 30, 2023

Yes, although it is not actively maintained, so it could be that incompatibilities exist.

Could you let me know a bit more about the system you are having these issues on? You were saying both windows and linux, so drivers shouldn't be the problem. What video card do you have? It would be useful if we could reproduce this problem ourselves.

@jooste
Copy link
Member

jooste commented Dec 4, 2023

Hi @rgovindjee, can you check if the size of the symbols scales with the zoom factor? Does the symbol size change when you zoom in/out?

@rgovindjee
Copy link
Author

The symbols increase in size (more pixels) when zooming in, aka stay the same "size" relative to the map terrain texture.

I can get system/hardware info in a bit.

@jooste
Copy link
Member

jooste commented Dec 6, 2023

Ok, in that case it looks like the switch statement in the shader is not honoured. Let's see if we can come up with an alternative approach.

@TejEddineLakhal
Copy link

I came across this graphics bug on Windows 10. In my case setting python.exe to use "high-performance NVIDIA processor" instead of "integrated graphics" as preferred graphics processor in the NVIDIA control panel fixes the issue. My system configuration is:

  • Operating System: Windows 10
  • CPU: Intel Core i5-5200U
  • GPU: Nvidia GeForce 820M

@jooste
Copy link
Member

jooste commented Apr 10, 2024

Hey @TejEddineLakhal, thanks a lot, that's a useful suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants