shurcool
05-14-2002, 05:39 PM
hi,
we are making a game, which uses glut for window creation. i followed a tutorials on glut gamemode over at http://www.lighthouse3d.com/opengl/glut/index.php3?gameglut and from what it looks like (the VC example on that page) you first need to create a window, no matter what, and then if u want to go to fullscreen, enable game mode. and if u want to go back to windowed mode from fullscreen, u just leave game mode. that's exactly what the example does. however, there is one small difference: in the example in never goes to fullscreen right away, instead it only does that when you press an appropriate button (F1, for example). that means that it completes at least one main loop. but it our project, if you last quit while you were in fullscreen mode, it should automatically go to fullscreen mode when you start it up again (screen mode is saved in a file, and read at prog start up), therefore not yet completing a main loop even once. i don't know if that makes a difference, but i want to note each small detail. the problem is, that everytime i do that, it gives a fatal error (referenced to wrong part of memory), and if i try to debug, it ends up in assembly code (i think that the code is from glut32.dll).
has anyone ever used glut with resolution change support? if yes, have you incountered a similar problem? if so, could you please give me a pointer at where to look at? because from what it looks like, beside the above mentioned difference, our code (my project (note: it's 2d), and the glut example - which works) has no other (noted by me) differences. and i want to do something like that... (unless you have a better solution)
any help is greately appreciated!
p.s. i need help specifically with glut gamemode, especially with entering and leaving it.
we are making a game, which uses glut for window creation. i followed a tutorials on glut gamemode over at http://www.lighthouse3d.com/opengl/glut/index.php3?gameglut and from what it looks like (the VC example on that page) you first need to create a window, no matter what, and then if u want to go to fullscreen, enable game mode. and if u want to go back to windowed mode from fullscreen, u just leave game mode. that's exactly what the example does. however, there is one small difference: in the example in never goes to fullscreen right away, instead it only does that when you press an appropriate button (F1, for example). that means that it completes at least one main loop. but it our project, if you last quit while you were in fullscreen mode, it should automatically go to fullscreen mode when you start it up again (screen mode is saved in a file, and read at prog start up), therefore not yet completing a main loop even once. i don't know if that makes a difference, but i want to note each small detail. the problem is, that everytime i do that, it gives a fatal error (referenced to wrong part of memory), and if i try to debug, it ends up in assembly code (i think that the code is from glut32.dll).
has anyone ever used glut with resolution change support? if yes, have you incountered a similar problem? if so, could you please give me a pointer at where to look at? because from what it looks like, beside the above mentioned difference, our code (my project (note: it's 2d), and the glut example - which works) has no other (noted by me) differences. and i want to do something like that... (unless you have a better solution)
any help is greately appreciated!
p.s. i need help specifically with glut gamemode, especially with entering and leaving it.