Mac Retian and OpenGL
Zhipeng Shi <[email protected]> Sun, 11 Jan 2026 21:06:00 -0800 (PST)
| Newsgroups | gmane.comp.lib.wxwindows.general |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I'm using wxGLCanvas to render OpenGL on a Retina display of a Mac.
During rendering, I have to use glViewport(0, 0, GetContentScaleFactor() *
width, GetContentScaleFactor() * height) to achieve full-screen rendering,
instead of rendering only in the bottom-left quarter of the area.
However, when I want to use pick to select a certain rendering unit,
wxGetMousePosition() returns physical coordinates. If I multiply all
physical coordinates by GetContentScaleFactor(), the coordinates are
incorrect again in some PopupMenu() scenarios. Is there a relatively simple
way in wxWidgets to handle all of this?
My Mac version is 26.2, and the wxWidgets version is 3.2.9.
Thank you very much!
Best Regards
Shi
--
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
---
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/wx-users/69877d82-138d-4f50-a6ee-b61afdba9a82n%40googlegroups.com.