Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I've just installed visual studio 2010 on my PC and I'm running a program that worked well on my laptop. The code uses glut and it exits at the last line below:
C++
    glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGBA| GLUT_DOUBLE);
glutInitWindowSize( 512, 512 );
glutInitContextVersion( 3, 2 );
glutInitContextProfile( GLUT_CORE_PROFILE );
glutCreateWindow( "CG" );
    "............."


any ideas why?
Posted
Updated 31-Dec-11 3:44am
v2
Comments
Richard MacCutchan 31-Dec-11 9:48am    
Well there does not seem to be anything after that statement so what do you expect?
Addy Tas 1-Jan-12 16:43pm    
I wonder if a guy from the US is going to get monty python-type of humor..
On topic: Any useful exit code in the output window?
Have you tried running it while catching all exceptions when thrown?
stigersh 2-Jan-12 13:53pm    
This code worked well on my laptop.. after glutCreateWindow instead of proceeding the code gets to glutCreateWindow_ATEXIT_HACK and exits.:(

1 solution

Got it.. the version was the problem. I've changed to
glutInitContextVersion( 2,0 );
and now it works
 
Share this answer
 
Comments
Member 10761407 20-Apr-14 3:19am    
Thank you @stigersh! This was what was holding me up for three hours!

Thanks a ton once again for posting the resolution once it solved your problem! :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900