public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* opengl render size too small in X11 window
@ 2018-10-10 19:16 Chris Marshall
  2018-10-11 17:41 ` Chris Marshall
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Marshall @ 2018-10-10 19:16 UTC (permalink / raw)
  To: cygwin

Dear Cygwin-

Using cygwin X11 under windows 10 with a high dpi display (3840x2160)
laptop resulted in far too small font and widgets using -multiwindow for
the XWin option.  If I set the windows setting display resolution to
1920x1080 and following the suggestion for the ~/.Xresources file from
https://stackoverflow.com/questions/42211564/cygwin-xwin-scaling-broken-when-using-windows-scaling-on-high-resolution-displa
I was able keep windows, widgets, and title/menu bars at a reasonable size
for reading.

However, when I display some OpenGL graphics content (using a FreeGLUT
window), then the visible OpenGL rendered area is about 2/3 the apparent
widget area of the X11 window.  If I try the same in a non-multiwindow Xwin
session then the rendered area is correct.  This problem is even worse if I
try with the full screen resolution.  At the moment I think I have narrowed
it down to the -multiwindow support for OpenGL contexts.

This is with a couple of versions of the freeglut libraries with no effect
and the current cygwin and cygwin X Server.

Thanks,
Chris

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: opengl render size too small in X11 window
  2018-10-10 19:16 opengl render size too small in X11 window Chris Marshall
@ 2018-10-11 17:41 ` Chris Marshall
  2018-10-14 17:13   ` Jon Turney
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Marshall @ 2018-10-11 17:41 UTC (permalink / raw)
  To: cygwin

I've verified that if I use the -nowgl option for the X11 server then the
opengl visualization is correctly rendered and sized for the containing
window.

On Wed, Oct 10, 2018 at 12:15 PM Chris Marshall <devel.chm.01@gmail.com>
wrote:

> Dear Cygwin-
>
> Using cygwin X11 under windows 10 with a high dpi display (3840x2160)
> laptop resulted in far too small font and widgets using -multiwindow for
> the XWin option.  If I set the windows setting display resolution to
> 1920x1080 and following the suggestion for the ~/.Xresources file from
> https://stackoverflow.com/questions/42211564/cygwin-xwin-scaling-broken-when-using-windows-scaling-on-high-resolution-displa
> I was able keep windows, widgets, and title/menu bars at a reasonable size
> for reading.
>
> However, when I display some OpenGL graphics content (using a FreeGLUT
> window), then the visible OpenGL rendered area is about 2/3 the apparent
> widget area of the X11 window.  If I try the same in a non-multiwindow Xwin
> session then the rendered area is correct.  This problem is even worse if I
> try with the full screen resolution.  At the moment I think I have narrowed
> it down to the -multiwindow support for OpenGL contexts.
>
> This is with a couple of versions of the freeglut libraries with no effect
> and the current cygwin and cygwin X Server.
>
> Thanks,
> Chris
>
>
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: opengl render size too small in X11 window
  2018-10-11 17:41 ` Chris Marshall
@ 2018-10-14 17:13   ` Jon Turney
  2018-10-14 18:02     ` Chris Marshall
  0 siblings, 1 reply; 6+ messages in thread
From: Jon Turney @ 2018-10-14 17:13 UTC (permalink / raw)
  To: The Cygwin Mailing List; +Cc: Chris Marshall

On 11/10/2018 18:40, Chris Marshall wrote:
> I've verified that if I use the -nowgl option for the X11 server then the
> opengl visualization is correctly rendered and sized for the containing
> window.
> 
> On Wed, Oct 10, 2018 at 12:15 PM Chris Marshall
> wrote:
> 
>> Dear Cygwin-
>>
>> Using cygwin X11 under windows 10 with a high dpi display (3840x2160)
>> laptop resulted in far too small font and widgets using -multiwindow for
>> the XWin option.  If I set the windows setting display resolution to
>> 1920x1080 and following the suggestion for the ~/.Xresources file from
>> https://stackoverflow.com/questions/42211564/cygwin-xwin-scaling-broken-when-using-windows-scaling-on-high-resolution-displa
>> I was able keep windows, widgets, and title/menu bars at a reasonable size
>> for reading.
>>
>> However, when I display some OpenGL graphics content (using a FreeGLUT
>> window), then the visible OpenGL rendered area is about 2/3 the apparent
>> widget area of the X11 window.  If I try the same in a non-multiwindow Xwin
>> session then the rendered area is correct.  This problem is even worse if I
>> try with the full screen resolution.  At the moment I think I have narrowed
>> it down to the -multiwindow support for OpenGL contexts.
>>
>> This is with a couple of versions of the freeglut libraries with no effect
>> and the current cygwin and cygwin X Server.

Interesting.  Thanks for reporting this issue.

I suspect this might be caused by:

- the X server is marked as high-dpi aware (via manifest)
- when using WGL, OpenGL drawing takes place in the client (to a window 
handle retrieved from the X server)
- the GL client you are using is not marked as high-dpi aware (the default)

(-wgl is only currently supported in multiwindow mode)

If that's the case, I think I see what is needed to fix this, but this 
is not possible for me to test.

I've built an updated libGL1 with this potential fix, perhaps you can 
try it, to see if it improves things. Install it with:

wget ftp://cygwin.com/pub/cygwinx/x86_64/libGL1-18.0.5-1.1.tar.xz
tar -C / -xvf libGL1-18.0.5-1.1.tar.xz

(This is built for x86_64. If you need x86 instead, please ask)

Reinstall the libGL1 using cygwin setup to get things back to their 
previous state.

-- 
Jon Turney
Volunteer Cygwin/X X Server maintainer

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: opengl render size too small in X11 window
  2018-10-14 17:13   ` Jon Turney
@ 2018-10-14 18:02     ` Chris Marshall
  2018-10-14 18:21       ` Chris Marshall
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Marshall @ 2018-10-14 18:02 UTC (permalink / raw)
  To: cygwin

Will do.

On Sun, Oct 14, 2018 at 10:13 AM Jon Turney <jon.turney@dronecode.org.uk>
wrote:

> On 11/10/2018 18:40, Chris Marshall wrote:
> > I've verified that if I use the -nowgl option for the X11 server then the
> > opengl visualization is correctly rendered and sized for the containing
> > window.
> >
> > On Wed, Oct 10, 2018 at 12:15 PM Chris Marshall
> > wrote:
> >
> >> Dear Cygwin-
> >>
> >> Using cygwin X11 under windows 10 with a high dpi display (3840x2160)
> >> laptop resulted in far too small font and widgets using -multiwindow for
> >> the XWin option.  If I set the windows setting display resolution to
> >> 1920x1080 and following the suggestion for the ~/.Xresources file from
> >>
> https://stackoverflow.com/questions/42211564/cygwin-xwin-scaling-broken-when-using-windows-scaling-on-high-resolution-displa
> >> I was able keep windows, widgets, and title/menu bars at a reasonable
> size
> >> for reading.
> >>
> >> However, when I display some OpenGL graphics content (using a FreeGLUT
> >> window), then the visible OpenGL rendered area is about 2/3 the apparent
> >> widget area of the X11 window.  If I try the same in a non-multiwindow
> Xwin
> >> session then the rendered area is correct.  This problem is even worse
> if I
> >> try with the full screen resolution.  At the moment I think I have
> narrowed
> >> it down to the -multiwindow support for OpenGL contexts.
> >>
> >> This is with a couple of versions of the freeglut libraries with no
> effect
> >> and the current cygwin and cygwin X Server.
>
> Interesting.  Thanks for reporting this issue.
>
> I suspect this might be caused by:
>
> - the X server is marked as high-dpi aware (via manifest)
> - when using WGL, OpenGL drawing takes place in the client (to a window
> handle retrieved from the X server)
> - the GL client you are using is not marked as high-dpi aware (the default)
>
> (-wgl is only currently supported in multiwindow mode)
>
> If that's the case, I think I see what is needed to fix this, but this
> is not possible for me to test.
>
> I've built an updated libGL1 with this potential fix, perhaps you can
> try it, to see if it improves things. Install it with:
>
> wget ftp://cygwin.com/pub/cygwinx/x86_64/libGL1-18.0.5-1.1.tar.xz
> tar -C / -xvf libGL1-18.0.5-1.1.tar.xz
>
> (This is built for x86_64. If you need x86 instead, please ask)
>
> Reinstall the libGL1 using cygwin setup to get things back to their
> previous state.
>
> --
> Jon Turney
> Volunteer Cygwin/X X Server maintainer
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: opengl render size too small in X11 window
  2018-10-14 18:02     ` Chris Marshall
@ 2018-10-14 18:21       ` Chris Marshall
  2018-10-14 18:26         ` Chris Marshall
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Marshall @ 2018-10-14 18:21 UTC (permalink / raw)
  To: cygwin

The initial render of the OpenGL content now fills the xwindow area but if
you resize the window making it larger then the opengl content is scaled up
by more than needed and the result is the xwindow area ends up with the
bottom left corner of the expected viewing area.

If, on the other hand, you resize smaller than the opengl rendered area
shrinks faster than the amount appropriate for the change in size with the
result that the content is completely visible in the bottom left corner off
the xwindow area with blank regions to above and on the right to fill our
the xwindow area.

I can take screen shots that illustrate the problem but I don't have a way
to get them to you.

--Chris


On Sun, Oct 14, 2018 at 11:01 AM Chris Marshall <devel.chm.01@gmail.com>
wrote:

> Will do.
>
> On Sun, Oct 14, 2018 at 10:13 AM Jon Turney <jon.turney@dronecode.org.uk>
> wrote:
>
>> On 11/10/2018 18:40, Chris Marshall wrote:
>> > I've verified that if I use the -nowgl option for the X11 server then
>> the
>> > opengl visualization is correctly rendered and sized for the containing
>> > window.
>> >
>> > On Wed, Oct 10, 2018 at 12:15 PM Chris Marshall
>> > wrote:
>> >
>> >> Dear Cygwin-
>> >>
>> >> Using cygwin X11 under windows 10 with a high dpi display (3840x2160)
>> >> laptop resulted in far too small font and widgets using -multiwindow
>> for
>> >> the XWin option.  If I set the windows setting display resolution to
>> >> 1920x1080 and following the suggestion for the ~/.Xresources file from
>> >>
>> https://stackoverflow.com/questions/42211564/cygwin-xwin-scaling-broken-when-using-windows-scaling-on-high-resolution-displa
>> >> I was able keep windows, widgets, and title/menu bars at a reasonable
>> size
>> >> for reading.
>> >>
>> >> However, when I display some OpenGL graphics content (using a FreeGLUT
>> >> window), then the visible OpenGL rendered area is about 2/3 the
>> apparent
>> >> widget area of the X11 window.  If I try the same in a non-multiwindow
>> Xwin
>> >> session then the rendered area is correct.  This problem is even worse
>> if I
>> >> try with the full screen resolution.  At the moment I think I have
>> narrowed
>> >> it down to the -multiwindow support for OpenGL contexts.
>> >>
>> >> This is with a couple of versions of the freeglut libraries with no
>> effect
>> >> and the current cygwin and cygwin X Server.
>>
>> Interesting.  Thanks for reporting this issue.
>>
>> I suspect this might be caused by:
>>
>> - the X server is marked as high-dpi aware (via manifest)
>> - when using WGL, OpenGL drawing takes place in the client (to a window
>> handle retrieved from the X server)
>> - the GL client you are using is not marked as high-dpi aware (the
>> default)
>>
>> (-wgl is only currently supported in multiwindow mode)
>>
>> If that's the case, I think I see what is needed to fix this, but this
>> is not possible for me to test.
>>
>> I've built an updated libGL1 with this potential fix, perhaps you can
>> try it, to see if it improves things. Install it with:
>>
>> wget ftp://cygwin.com/pub/cygwinx/x86_64/libGL1-18.0.5-1.1.tar.xz
>> tar -C / -xvf libGL1-18.0.5-1.1.tar.xz
>>
>> (This is built for x86_64. If you need x86 instead, please ask)
>>
>> Reinstall the libGL1 using cygwin setup to get things back to their
>> previous state.
>>
>> --
>> Jon Turney
>> Volunteer Cygwin/X X Server maintainer
>>
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: opengl render size too small in X11 window
  2018-10-14 18:21       ` Chris Marshall
@ 2018-10-14 18:26         ` Chris Marshall
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Marshall @ 2018-10-14 18:26 UTC (permalink / raw)
  To: cygwin

One other issue: with the -nowgl version the window activation transfers to
the visualization window while with the -wgl version running then the
activation doesn't change to the new graphics window.  In fact, clicking on
the window doesn't help.  If you click on the desktop background or another
window, then clicking on the graphics window will select and activate
correctly.

--Chris


On Sun, Oct 14, 2018 at 11:21 AM Chris Marshall <devel.chm.01@gmail.com>
wrote:

> The initial render of the OpenGL content now fills the xwindow area but if
> you resize the window making it larger then the opengl content is scaled up
> by more than needed and the result is the xwindow area ends up with the
> bottom left corner of the expected viewing area.
>
> If, on the other hand, you resize smaller than the opengl rendered area
> shrinks faster than the amount appropriate for the change in size with the
> result that the content is completely visible in the bottom left corner off
> the xwindow area with blank regions to above and on the right to fill our
> the xwindow area.
>
> I can take screen shots that illustrate the problem but I don't have a way
> to get them to you.
>
> --Chris
>
>
> On Sun, Oct 14, 2018 at 11:01 AM Chris Marshall <devel.chm.01@gmail.com>
> wrote:
>
>> Will do.
>>
>> On Sun, Oct 14, 2018 at 10:13 AM Jon Turney <jon.turney@dronecode.org.uk>
>> wrote:
>>
>>> On 11/10/2018 18:40, Chris Marshall wrote:
>>> > I've verified that if I use the -nowgl option for the X11 server then
>>> the
>>> > opengl visualization is correctly rendered and sized for the containing
>>> > window.
>>> >
>>> > On Wed, Oct 10, 2018 at 12:15 PM Chris Marshall
>>> > wrote:
>>> >
>>> >> Dear Cygwin-
>>> >>
>>> >> Using cygwin X11 under windows 10 with a high dpi display (3840x2160)
>>> >> laptop resulted in far too small font and widgets using -multiwindow
>>> for
>>> >> the XWin option.  If I set the windows setting display resolution to
>>> >> 1920x1080 and following the suggestion for the ~/.Xresources file from
>>> >>
>>> https://stackoverflow.com/questions/42211564/cygwin-xwin-scaling-broken-when-using-windows-scaling-on-high-resolution-displa
>>> >> I was able keep windows, widgets, and title/menu bars at a reasonable
>>> size
>>> >> for reading.
>>> >>
>>> >> However, when I display some OpenGL graphics content (using a FreeGLUT
>>> >> window), then the visible OpenGL rendered area is about 2/3 the
>>> apparent
>>> >> widget area of the X11 window.  If I try the same in a
>>> non-multiwindow Xwin
>>> >> session then the rendered area is correct.  This problem is even
>>> worse if I
>>> >> try with the full screen resolution.  At the moment I think I have
>>> narrowed
>>> >> it down to the -multiwindow support for OpenGL contexts.
>>> >>
>>> >> This is with a couple of versions of the freeglut libraries with no
>>> effect
>>> >> and the current cygwin and cygwin X Server.
>>>
>>> Interesting.  Thanks for reporting this issue.
>>>
>>> I suspect this might be caused by:
>>>
>>> - the X server is marked as high-dpi aware (via manifest)
>>> - when using WGL, OpenGL drawing takes place in the client (to a window
>>> handle retrieved from the X server)
>>> - the GL client you are using is not marked as high-dpi aware (the
>>> default)
>>>
>>> (-wgl is only currently supported in multiwindow mode)
>>>
>>> If that's the case, I think I see what is needed to fix this, but this
>>> is not possible for me to test.
>>>
>>> I've built an updated libGL1 with this potential fix, perhaps you can
>>> try it, to see if it improves things. Install it with:
>>>
>>> wget ftp://cygwin.com/pub/cygwinx/x86_64/libGL1-18.0.5-1.1.tar.xz
>>> tar -C / -xvf libGL1-18.0.5-1.1.tar.xz
>>>
>>> (This is built for x86_64. If you need x86 instead, please ask)
>>>
>>> Reinstall the libGL1 using cygwin setup to get things back to their
>>> previous state.
>>>
>>> --
>>> Jon Turney
>>> Volunteer Cygwin/X X Server maintainer
>>>
>>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-10-14 18:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-10 19:16 opengl render size too small in X11 window Chris Marshall
2018-10-11 17:41 ` Chris Marshall
2018-10-14 17:13   ` Jon Turney
2018-10-14 18:02     ` Chris Marshall
2018-10-14 18:21       ` Chris Marshall
2018-10-14 18:26         ` Chris Marshall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).