I have made a simple application that creates a window with an OpenGL 4.2 context and takes user input.

I have implemented making the window go fullscreen with XRandR and can change the display resolution.

I would like to change this so that I don't have to set the displays resolution and only the window/contexts so that it renders at a lower resolution but the display stays at its default.

How could I implement this? Which extensions provide this or can I do this with XRandR and just manipulating the window rather than the root window(dektop)?


  • \$\begingroup\$ You're probably going to have to poll X11 for the monitor resolution and make a borderless window at that resolution. To scale without changing the internal resolution you're going to have to draw the application itself to an offscreen FBO. Then display what you rendered to a texture on a fullscreen quad. Just make sure that you normalize your window coordinates on your input or use a scaling factor. \$\endgroup\$
    – PeterT
    Jul 26, 2013 at 18:57
  • \$\begingroup\$ Consider just using SDL. X11 is not long for the world anyway if the Wayland/Mir guys get their way. \$\endgroup\$ Jul 26, 2013 at 20:54
  • \$\begingroup\$ I'm using my own toolkit, I'll update it to mir when it becomes a viable option. There will always be backward compatibility anyway; what do you think SDL uses for its back-end? Using SDL doesn't fix my issue anyway. \$\endgroup\$ Jul 26, 2013 at 21:01
  • \$\begingroup\$ @PeterT I'm using atoms to send a fullscreen event to the window manager. A borderless window set to screen size is not a nice hack. \$\endgroup\$ Jul 26, 2013 at 21:07
  • \$\begingroup\$ @CoffeeandCode well you can use regular full screen as well, doesn't change the full screen quad FBO technique whatsoever. I just find borderless full screen the most pleasant to the user if the app is not too demanding. As regular full screen applications have differing behavior from regular windows for no reason discernable to the user. \$\endgroup\$
    – PeterT
    Jul 26, 2013 at 21:20


You must log in to answer this question.

Browse other questions tagged .