thanks for your feedback!
On 19.05.2013 17:49, Diederick C. Niehorster wrote:
> Also, reading the docs on this function, it might not be the best thing to do:
I know that the docs suggest to set a flag in the manifest, but I was
assuming that GLUT might be able to handle this transparently. OTOH, if
DPI awareness is to be done correctly, it would probably require some
help from the developer, too.
> Maybe we should check with IsProcessDPIAware and issue a warning if
> the developer did not set it?
That might be an alternative. AFAICT, if the DPI awareness is set
outside of FreeGLUT, then this has to happen before glutInit() is called.
> Reading this: http://kevinragsdale.net/is-your-app-dpi-aware/, it
> seems there are a host of potential side-effects to marking the
> program as DPI aware too..
Hmm, OK, I didn't think of other application parts which might use
regular GUI elements (which would then presumably be messed up).
>> Thanks for the patch, I am not sure if this fix by itself is good, but
>> i am happy it seems to work for you. Looking at the patch you
>> attached, would actually only calling SetProcessDPIAware() be enough?
>> No need for the other lines as they are not used?
AFAICT you need to set the flag _and_ query the values, doing only one
of both doesn't have any effect.
> Not sure what would be best here...
You're perhaps right about using IsProcessDPIAware. I'm thinking it
might be an option to still put the query functions into FreeGLUT and
just remove the SetProcessDPIAware call.
>> On Thu, May 16, 2013 at 11:52 PM, Florian Echtler <floe@...> wrote:
>>> Hello everybody,
>>> here's a small patch to make freeglut DPI-aware. When the screen is set
>>> to more DPI than the default (96), ScreenToClient (which is used at
>>> various points within freeglut) will return junk in some situations.
>>> When the application is DPI-aware as indicated by the API call + the DPI
>>> query, ScreenToClient works properly again.
>>> Note: I am not 100% sure if this has any potential side effects. The
>>> patch fixed several issues I was having on a high-DPI touchscreen (e.g.
>>> wrong touch coordinates, massive flickering when switching to
>>> fullscreen), but some additional testing would probably be a good idea.
>>> Best regards, Florian
>>> SENT FROM MY DEC VT50 TERMINAL
SENT FROM MY DEC VT50 TERMINAL