PDA

View Full Version : GLUT windowposition



DeathZan
07-04-2005, 06:29 AM
Hi,

Is it possible to change the window position with glut after the init ? I mean the distance from left side and top of screen.
Its because I start fullscreen but when I resize to windowed mode my window is part out of screen.
I coudln't change windowposition than with glutInitWindowPos, I tried with windows api call like this:


switch (key) {
case GLUT_KEY_F1:
if(fullscreen)
{
//glutReshapeWindow(640,480);
window = GetForegroundWindow();
MoveWindow(window, 100, 100, 640, 480, true);
fullscreen = false;
}But then my window has no frame... no titlebar and stuff, just black retangle.

07-04-2005, 09:32 AM
glutPositionWindow(int x, int y)?

When in doubt, look in the header (glut.h).

Hlz

dvm
07-04-2005, 01:45 PM
...and get a copy of the glut reference manual. It's free and it's a pdf. (glut-3.spec.pdf)

DeathZan
07-05-2005, 12:01 AM
Oh sorry, I tried glutWindowPosition instead of glutPosition window :) . I had a reference once but I lost it, i'm downloading it right now :)

Thx