GlutEnterGameMode();

How do you make your window full screen with this statement

I believe that you don’t have a choice, it is always fullscreen.

This code snippet may help …

std::string m_GameModeString(“1280x1024:32@72”);

// OpenGL init
glutInit(&m_Argc, m_Argv);

if (m_GameModeString.length()>0)
{
glutGameModeString(m_GameModeString.c_str());
glutEnterGameMode();
}
else
{
glutInitWindowSize(m_WinWidth,m_WinHeight);
glutInitWindowPosition(m_XPos,m_YPos);
glutCreateWindow(m_Title.c_str());
}

I need your class, or header with the m_ and the std::string stuff

I assumed you would be able to figure that out … translated (assuming you always want game mode) …

main(int argc, char** argv)
{
// do stuff …

// Initialize Glut … the sequence of the following 3 lines is imperative …

glutInit(&argc,argv);
glutGameModeString(“1280x1024:32@72”);
glutEnterGameMode();

// do more stuff…

}

This will setup GLUT in game mode, full screen at 1280x1024 resolution, 32 bit color, 72Hz refresh rate. It will fail if this combination of video options is not supported by your card.

[This message has been edited by pleopard (edited 06-03-2002).]

It will fail if this combination of video options is not supported by your card.

…which is why GLFW is so much easier to use when it comes to fullscreen management. GLFW never fails with opening a window in fullscreen mode (at least not because a video mode was not supported) - it always choses the closest match.

I have become aware that the code that was given to me doesn’t work do to a lack of declarations which I do not have the values to please give me some better, or more extensive code.