(and setting the viewport to (0,0) with
XF86VidModeSetViewPort(OGL_dpy, scrnum, 0, 0)
how can I set the viewport to the upper left position of the content of a
window ? I only can set the viewport to the upper left position of the
windowmanager border of the window…
(and setting the viewport to (0,0) with
XF86VidModeSetViewPort(OGL_dpy, scrnum, 0, 0)
how can I set the viewport to the upper left position of the content of a
window ? I only can set the viewport to the upper left position of the
windowmanager border of the window…
If you use SDL, it’s all taken care of for you.
If you are not using SDL, it’s very tricky. - Actually it’s a bit tricky
inside SDL too, you just don’t need to worry about it. SDL removes the
titlebar, puts the window at (0,0), and throws the mouse into the corner
to move the viewport (working around a bug in XF86VidModeSetViewPort())
Setting a fullscreen OpenGL mode does have the desired effect:
SDL_SetVideoMode(WIDTH, HEIGHT, 0, SDL_OPENGL|SDL_FULLSCREEN);