PDA

View Full Version : GLUT Window Starts out Minimized



Blakeasd
09-10-2011, 09:48 PM
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(&amp;argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGBA);
glutCreateWindow("Simple");
glutDisplayFunc(RenderScene);
SetupRC();
glutMainLoop();
return 0;
}


Why is this happening?!?
Thanks

arekkusu
09-11-2011, 10:43 AM
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.)

Blakeasd
09-11-2011, 05:00 PM
Thanks! It's fixed.