From: Eero P. <epa...@ko...> - 2004-01-11 21:02:16
|
Does anybody remember breaking gamemode on Windows during fall/winter? ;-) In my development side I run my program in a window, and I have been slow at updating freeglut for my "production side", so I unfortunately cannot really say what has happened and when, but now I am having problems with gamemode. My code does something like: glutInitWindowPosition(0,0); glutInitWindowSize(SCREEN_WIDTH(),SCREEN_HEIGHT()); glutInitDisplayString("double rgb depth>=24"); if (!in_window){ glutGameModeString(screen_mode); if(0 == (win=glutEnterGameMode())) { So it might be that my InitWindowSize call etc are part of the problem, but I suspect that. (glutInitWindowSize gives my preferred window size, the screen size in glutGameMode is something quite different, and I think there anyways is a default window size which is NOT the 2048x768 size I want...) This is my current analysis of the problem: When I call glutEnterGameMode it ends up calling the (Win32) CreateWindow with correct size, but that activates fgWindowProc with the WM_CREATE message. In fgWindowProc there is code: (about line 1208) window->State.NeedToResize = GL_TRUE; window->State.Width = fgState.Size.X; window->State.Height = fgState.Size.Y; This stuffs my gamemode window with an the size specified in glutInitWindowSize, and sets it up for resize. On the next window redraw the the window gets sour. I assume I will hack my self around this, but unless there is something wrong with my setup, a proper fix is needed. Eero |