<tfoot id='m6DTM'></tfoot>
    1. <i id='m6DTM'><tr id='m6DTM'><dt id='m6DTM'><q id='m6DTM'><span id='m6DTM'><b id='m6DTM'><form id='m6DTM'><ins id='m6DTM'></ins><ul id='m6DTM'></ul><sub id='m6DTM'></sub></form><legend id='m6DTM'></legend><bdo id='m6DTM'><pre id='m6DTM'><center id='m6DTM'></center></pre></bdo></b><th id='m6DTM'></th></span></q></dt></tr></i><div id='m6DTM'><tfoot id='m6DTM'></tfoot><dl id='m6DTM'><fieldset id='m6DTM'></fieldset></dl></div>
      • <bdo id='m6DTM'></bdo><ul id='m6DTM'></ul>
    2. <legend id='m6DTM'><style id='m6DTM'><dir id='m6DTM'><q id='m6DTM'></q></dir></style></legend>

      <small id='m6DTM'></small><noframes id='m6DTM'>

      1. Mac OSX 10.9 中的 Glut 弃用,IDE:QT Creator

        时间:2023-09-18
          1. <small id='AVhA0'></small><noframes id='AVhA0'>

              <tbody id='AVhA0'></tbody>
            <i id='AVhA0'><tr id='AVhA0'><dt id='AVhA0'><q id='AVhA0'><span id='AVhA0'><b id='AVhA0'><form id='AVhA0'><ins id='AVhA0'></ins><ul id='AVhA0'></ul><sub id='AVhA0'></sub></form><legend id='AVhA0'></legend><bdo id='AVhA0'><pre id='AVhA0'><center id='AVhA0'></center></pre></bdo></b><th id='AVhA0'></th></span></q></dt></tr></i><div id='AVhA0'><tfoot id='AVhA0'></tfoot><dl id='AVhA0'><fieldset id='AVhA0'></fieldset></dl></div>

            • <legend id='AVhA0'><style id='AVhA0'><dir id='AVhA0'><q id='AVhA0'></q></dir></style></legend>
              • <bdo id='AVhA0'></bdo><ul id='AVhA0'></ul>
                <tfoot id='AVhA0'></tfoot>
                  本文介绍了Mac OSX 10.9 中的 Glut 弃用,IDE:QT Creator的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我试图在 qt creator 上构建一个 opengl 程序,安装在我的 mac 上,使用 osx 10.9.我收到了几个关于它在 osx10.9 中弃用的 glut 函数的警告,示例错误消息如下:

                  I was trying to build an opengl program on qt creator, installed on my mac, with osx 10.9. I got several warnings on glut functions about its deprecation in osx10.9, a sample error message is like:

                  'glutInit' 已弃用:首先在 OS X 10.9 中弃用 [-Wdeprecated-declarations]glutInit(&argc, &argv);^

                  'glutInit' is deprecated: first deprecated in OS X 10.9 [-Wdeprecated-declarations] glutInit(&argc, &argv); ^

                  我想知道 GLUT.h 在 osx10.9 中是否不再可用?根据其他一些帖子,据说只要我们将OS X 部署目标"更改回 OSX10.8,它就可以工作.如何在 qtcreator 中这样做?谢谢!

                  I wonder if GLUT.h is not usable anymore in osx10.9? According to some other posts, it is said that as long as we change "OS X Deployment Target" back to OSX10.8, then it works. How to do so in qtcreator? Thank you!

                  推荐答案

                  您仍然可以在 10.9 中使用它.他们向你发出了一个非常强烈的信号,他们希望你停下来……

                  You can still use it in 10.9. They're sending you a pretty strong signal that they want you to stop, though...

                  您可以使用 -Wno-deprecated-declarations 编译器选项禁用这些警告.

                  You can disable those warnings with the -Wno-deprecated-declarations compiler option.

                  如果您尝试使用 GL3 级别的功能,包括正确的标题也有一些困难,因为您需要为此包含 gl3.h,而 glut.h> 包括 gl.h,这会导致关于构建时可能发生冲突的额外投诉.我为此找到的有点hacky的解决方法是通过定义标题保护来防止glut.h包含gl.h:

                  There's also some difficulties including the right headers if you're trying to use GL3 level features, because you need to include gl3.h for that, while glut.h includes gl.h, which causes additional complaints about possible conflicts while building. The somewhat hacky workaround I found for this is to prevent glut.h from including gl.h by defining the header guard:

                  #include <OpenGL/gl3.h>
                  #define __gl_h_
                  #include <GLUT/glut.h>
                  

                  然后,为了使用 GL3+ 级别的功能,您需要在 glutInitDisplayMode() 中指定一个附加标志:

                  Then, for using GL3+ level features, you need to specify that with an additional flag to glutInitDisplayMode():

                  glutInitDisplayMode(... | GLUT_3_2_CORE_PROFILE);
                  

                  看来是时候开始使用 GLFW 了.我从来没有将 GLUT 用于任何严肃的事情,但它对于小型演示/测试总是非常方便.

                  It looks like it's probably time to start using GLFW. I never used GLUT for anything serious, but it was always very convenient for small demos/tests.

                  这篇关于Mac OSX 10.9 中的 Glut 弃用,IDE:QT Creator的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:多边形轮廓上的边缘并不总是正确的 下一篇:OpenGL 和 WebGL 之间的 Alpha 渲染差异

                  相关文章

                  最新文章

                    <i id='tDDbs'><tr id='tDDbs'><dt id='tDDbs'><q id='tDDbs'><span id='tDDbs'><b id='tDDbs'><form id='tDDbs'><ins id='tDDbs'></ins><ul id='tDDbs'></ul><sub id='tDDbs'></sub></form><legend id='tDDbs'></legend><bdo id='tDDbs'><pre id='tDDbs'><center id='tDDbs'></center></pre></bdo></b><th id='tDDbs'></th></span></q></dt></tr></i><div id='tDDbs'><tfoot id='tDDbs'></tfoot><dl id='tDDbs'><fieldset id='tDDbs'></fieldset></dl></div>
                  1. <small id='tDDbs'></small><noframes id='tDDbs'>

                    <tfoot id='tDDbs'></tfoot>

                        <bdo id='tDDbs'></bdo><ul id='tDDbs'></ul>

                    1. <legend id='tDDbs'><style id='tDDbs'><dir id='tDDbs'><q id='tDDbs'></q></dir></style></legend>