Skip to content
Snippets Groups Projects
Commit b6722b83 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix crash on mac

parent 375a0cad
No related branches found
No related tags found
No related merge requests found
......@@ -427,6 +427,9 @@ int main(int argc, char **argv)
}
for(int i = 1; i < argc; i++) GmshMergeFile(argv[i]);
camera.lookAtCg();
ctx = new drawContext();
drawContext::setGlobal(new drawContextGlut);
......@@ -438,14 +441,11 @@ int main(int argc, char **argv)
else {
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH );
}
glutDisplayFunc(display);
glutInitWindowSize(ctx->viewport[2], ctx->viewport[3]);
glutInitWindowPosition(400,10);
glutInitWindowSize(800,800);
glutCreateWindow("GLUT Gmsh Viewer");
camera.lookAtCg();
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutKeyboardFunc(keyboard);
glutMotionFunc(motion);
......@@ -453,7 +453,6 @@ int main(int argc, char **argv)
glutKeyboardFunc(processNormalKeys);
glutSpecialFunc(processSpecialKeys);
cout<<"-------------------------------------"<<endl;
cout<<" SHORTCUTS "<<endl;
cout<<"-------------------------------------"<<endl;
......@@ -480,6 +479,3 @@ int main(int argc, char **argv)
GmshFinalize();
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment