代码在glutCreateWindow处退出 [英] code exits at glutCreateWindow

查看:118
本文介绍了代码在glutCreateWindow处退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在PC上安装了Visual Studio 2010,并且正在运行一个在笔记本电脑上运行良好的程序.该代码使用glut,并在下面的最后一行退出:

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:

    glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGBA| GLUT_DOUBLE);
glutInitWindowSize( 512, 512 );
glutInitContextVersion( 3, 2 );
glutInitContextProfile( GLUT_CORE_PROFILE );
glutCreateWindow( "CG" );
    "............."



有什么想法吗?



any ideas why?

推荐答案

知道了.版本是问题所在.我已更改为
glutInitContextVersion(2,0);
现在可以了
Got it.. the version was the problem. I''ve changed to
glutInitContextVersion( 2,0 );
and now it works


这篇关于代码在glutCreateWindow处退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆