Hello Florent,
Florent Berthaut wrote:
> Hi everyone,
>
> i'm trying to have a fullscreen application with opensg under gnu/linux
> and since the fullscreen mode doesn't work, i want to use the glutgamemode.
> This works but only if i start the glut window in game mode directly
> this way :
>
> glutGameModeString("1280x800");
> winid1 = glutEnterGameMode();
> window = GLUTWindow::create();
> window->setId(winid1);
> window->init();
>
> If i start in a windowed mode
> winid1 = glutCreateWindow("glut window");
> window = GLUTWindow::create();
> window->setId(winid1);
> window->init();
> and then try to enter the gamemode
> glutGameModeString("1280x800");
> int winid2 = glutEnterGameMode();
> window->setId(winid2);
>
> all i get is a black screen. I read that you need to re-init glut, so i
> tried to put the commands for the callbacks after entering gamemode but
> it doesn't work.
the documentation here
(<http://www-etud.iro.umontreal.ca/~clavetsi/api/glut/glutEnterGameMode.html>)
says game mode has its own callbacks, so registering them after
entering it seems to be necessary.
> Does OpenSG need to be re-initialized too ?
from what I've read entering game mode creates a new OpenGL rendering
context; have you tried calling window->init() after window->setId(winid2) ?
If that does not work, you could try creating a new GLUTWindow. That
would avoid having a change of the OpenGL context managed by the OpenSG
Window in the middle of the program, as I'm not sure if it can deal with
that.
Hope it helps,
Carsten
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users