Re: OpenGL and Occluded Windows

The Vsync options only work when your window isn't occluded. If
anything nonrectangular or alpha blended overlaps your window, page
flipping will be stuck on a slow path which involves sending a message
to the Window Server in order to composite the screen. As far as I
know, there's nothing you can do about this without disabling VSync
system-wide (using Quartz Debug), which is definitely not a
sustainable solution ;)
--Micah
On Fri, May 22, 2009 at 03:20:26PM -0700, jesse wrote:
> Thanks guys! Based on your emails I did some more tests, and this
> seems to be correct, that it's syncing up with the screen updates
> when occluded. Because of the framerate change I was afraid it was
> actually dropping me out of hardware accelerated graphics mode or
> chewing up cpu operations to do the composition, but though the
> framerate gets reduced, the cpu load is still low. And the
> framerate seems to like being in round numbers in these cases (30fps,
> 60fps, and 120fps) which seems consistent with that analysis. I'll
> look into vsyncing options so I can have some control over these
> various conditions.
>
> thanks!
> jesse
>
>
>
> On May 22, 2009, at 5:37 AM, Keith Bauer wrote:
>
> > My understanding is that if your window is occluded at all, you will
> > be vsync'd by the window server.
> >
> > 60Hz isn't slow; it's the fastest it makes any sense to render on a
> > 60Hz display. Turn on vsync normally and not only will you be kinder
> > to those of us with laptops by not rendering 100 redundant frames per
> > second, but you'll also notice no slowdown when you get occluded ;)
> >
> > -Keith
> >
> > On Fri, May 22, 2009 at 9:16 PM, Stephen Northcott
> > <email@hidden> wrote:
> >> It's normal, in my experience. And makes sense as an occluded view
> >> in a
> >> multitasking environment should be considered a lower priority.
> >>
> >> For apps that want to avoid this it's best to make them simply run
> >> in full
> >> screen mode IMO.
> >> For example, games and sims.
> >>
> >> If you try to be a hog then it's going to impact on other apps
> >> running at
> >> the same time in a negative way, so it's best not to put your
> >> users in that
> >> situation.
> >>
> >> On May 22, 2009, at 3:24 PM, Jesse Gray wrote:
> >>
> >>> Hello! I've been noticing a strange behavior with my opengl
> >>> rendering,
> >>> and I'm hoping someone has a bit more information. The symptom
> >>> is that
> >>> rendering gets much slower if the opengl frame gets occluded even
> >>> slightly
> >>> by another window (same effect occurs with windows in the same
> >>> program, or
> >>> windows in other programs).
> >>>
> >>> For example, rendering a particular model can run as fast as 160fps
> >>> normally, but if I occlude the window at all it goes down to
> >>> 60fps. The
> >>> decrease in speed seems to be directly related to the size of the
> >>> opengl
> >>> frame. With small opengl frames there is hardly any slowdown, and
> >>> the 160 to
> >>> 60 change I just mentioned is with a large, ~1000x1000 pixel
> >>> opengl frame.
> >>> The dependence on size seems to suggest something per-pixel is
> >>> happening -
> >>> perhaps it all needs to be copied back from the card to do the
> >>> composition
> >>> with other windows?
> >>>
> >>> I am using opengl through jogl, on 10.4.11, on a macbook pro with a
> >>> RadeonX1600 graphics card. I am more than happy to perform any
> >>> tests that
> >>> might help figure out what's going on!
> >>>
> >>> So, my questions are: is this the expected behavior? Or am I doing
> >>> something wrong (which I could possibly fix!!) to cause this kind of
> >>> slowdown? Or, if this is the expected behavior, are there any known
> >>> workarounds to keep my frame-rate up (perhaps knowing about this
> >>> condition,
> >>> and not rendering that window until its fully visible)
> >>>
> >>> Thanks!!
> >>> jesse
> >>>
> >>> _______________________________________________
> >>> Do not post admin requests to the list. They will be ignored.
> >>> Mac-opengl mailing list (email@hidden)
> >>> Help/Unsubscribe/Update your Subscription:
> >>>
> >>> This email sent to email@hidden
> >>
> >> _______________________________________________
> >> Do not post admin requests to the list. They will be ignored.
> >> Mac-opengl mailing list (email@hidden)
> >> Help/Unsubscribe/Update your Subscription:
> >> 40gmail.com
> >>
> >> This email sent to email@hidden
> >>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Mac-opengl mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

Apple Footer

This site contains user submitted content, comments and opinions and is for informational purposes only. Apple may provide or recommend responses as a possible solution based on the information provided; every potential issue may involve several factors not detailed in the conversations captured in an electronic forum and Apple can therefore provide no guarantee as to the efficacy of any proposed solutions on the community forums. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.
Apple