#173 No glViewport call under X and no window manager

moderate (59)

Under Xorg, glViewport is never called when creating a window if there is no window manager.

A good illustration of this is the "singlebuffer" demo in Mesa which then renders incorrectly on some drivers. This happens because the background rectangle is incorrectly culled. So the backgound is never cleared. Seen on the PowerVR and Nvidia stacks.

This happens because the window manager usually sends a ConfigureNotify XEvent. With no window manager, this never happens.

Here is a proposed patch. It basically sends the client a fake ConfigureNotify event, which then triggers the Reshape mechanism and does the glViewport setup with the default size of the glutCreateWindow call. This fixes the issue with the Mesa demo and doesn't hurt when running under a window manager since the window manager event (the "real" one) is received last. So if the window size differs from the requested size, the new size is taken into account.


  • John F. Fay

    John F. Fay - 2012-07-25
    • status: open --> closed-fixed
  • John F. Fay

    John F. Fay - 2012-07-25

    Fixed in SVN revision 1313. Thanks to John Tsiombikas for pointing this out (e-mail dated 7/24/12, 8:09 PM)


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks