GLUT Window Starts out Minimized

Whenever I run my GLUT OpenGL program the window starts off minimized in the dock. How can I stop this from happening? Thanks!
Here is my code:


#include <iostream>
#include <OpenGL/OpenGL.h>
#include <GLUT/GLUT.h>

void RenderScene(void)
{
    // Clear the window with current clearing color glClear(GL_COLOR_BUFFER_BIT);
    glClear(GL_COLOR_BUFFER_BIT);
    // Flush drawing commands glFlush();
    glFlush();
}

// Set up the rendering state
void SetupRC(void)
{
    glClearColor(0.0f, 0.0f, 1.0f, 1.0f);

}

int main(int argc, char* argv[])
{
    glutInit(&argc, argv); 
    glutInitDisplayMode(GLUT_SINGLE | GLUT_RGBA); 
    glutCreateWindow("Simple");
    glutDisplayFunc(RenderScene);
    SetupRC();
    glutMainLoop();
    return 0;
}


Why is this happening?!?
Thanks

In your GLUT application, go to Preferences and uncheck “Default Iconic Windows”.

(or, delete ~/Library/Preferences/com.apple.glut.plist …these preferences are global to all GLUT applications.)

Thanks! It’s fixed.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.