1. <tfoot id='OMzWY'></tfoot>

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

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

      <legend id='OMzWY'><style id='OMzWY'><dir id='OMzWY'><q id='OMzWY'></q></dir></style></legend>

    1. GLFW 第一响应者错误

      时间:2023-09-17
      <i id='XmxaO'><tr id='XmxaO'><dt id='XmxaO'><q id='XmxaO'><span id='XmxaO'><b id='XmxaO'><form id='XmxaO'><ins id='XmxaO'></ins><ul id='XmxaO'></ul><sub id='XmxaO'></sub></form><legend id='XmxaO'></legend><bdo id='XmxaO'><pre id='XmxaO'><center id='XmxaO'></center></pre></bdo></b><th id='XmxaO'></th></span></q></dt></tr></i><div id='XmxaO'><tfoot id='XmxaO'></tfoot><dl id='XmxaO'><fieldset id='XmxaO'></fieldset></dl></div>
      <legend id='XmxaO'><style id='XmxaO'><dir id='XmxaO'><q id='XmxaO'></q></dir></style></legend>

        <tbody id='XmxaO'></tbody>

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

        • <tfoot id='XmxaO'></tfoot>
          • <bdo id='XmxaO'></bdo><ul id='XmxaO'></ul>

              1. 本文介绍了GLFW 第一响应者错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我正在尝试创建一个简单的 GLFW 窗口并成功但 xcode 给了我一个错误:

                I am trying to create a simple GLFW window and a succeed but xcode gives me an error:

                2016-12-14 10:16:40.412191 CREngine[830:21929] [General] ERROR: Setting <GLFWContentView: 0x100369850> as the first responder for window <GLFWWindow: 0x10033ea00>, but it is in a different window ((null))! This would eventually crash when the view is freed. The first responder will be set to nil.
                (
                    0   AppKit                              0x00007fff9710b9a4 -[NSWindow _validateFirstResponder:] + 566
                    1   AppKit                              0x00007fff968fc9eb -[NSWindow _setFirstResponder:] + 31
                    2   AppKit                              0x00007fff969a466a -[NSWindow _realMakeFirstResponder:] + 406
                    3   AppKit                              0x00007fff969a4480 -[NSWindow makeFirstResponder:] + 123
                    4   libglfw.3.dylib                     0x00000001000a9895 _glfwPlatformCreateWindow + 631
                    5   libglfw.3.dylib                     0x00000001000a5430 glfwCreateWindow + 487
                    6   CREngine                            0x0000000100000e87 main + 135
                    7   libdyld.dylib                       0x00007fffadd2d255 start + 1
                )
                Program ended with exit code: 0
                

                我使用的代码是:

                #include <GLFW/glfw3.h>
                
                int main(void)
                {
                    GLFWwindow* window;
                
                    /* Initialize the library */
                    if (!glfwInit())
                        return -1;
                
                    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
                    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
                    glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
                    glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
                
                    /* Create a windowed mode window and its OpenGL context */
                    window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL);
                    if (!window)
                    {
                        glfwTerminate();
                        return -1;
                    }
                
                    /* Make the window's context current */
                    glfwMakeContextCurrent(window);
                
                    /* Loop until the user closes the window */
                    while (!glfwWindowShouldClose(window))
                    {
                        /* Render here */
                        glClear(GL_COLOR_BUFFER_BIT);
                
                        /* Swap front and back buffers */
                        glfwSwapBuffers(window);
                
                        /* Poll for and process events */
                        glfwPollEvents();
                    }
                
                    glfwTerminate();
                    return 0;
                }
                

                让我感到困惑的部分来自我所查找的内容,包括我将允许它在 mac 上运行的提示,但由于某种原因,我仍然遇到错误,所以我希望有人可以帮助我解决这个错误.

                The part that is confusing me is from what I have looked up is that including the hints that I have will allow it to work on mac but for some reason I am stilling getting the errors so I was hoping that someone could help me solve this error.

                推荐答案

                这个似乎表明这是 macOS Sierra 中的一个已知错误,并且查看 git-repo 似乎等待修复.但是,看起来(当前)他们网页上的最新版本 并未更新.

                This seems to indicate that this is a known bug in macOS Sierra, and looking at the git-repo it seems to be fixed. However, it does not look like the (currently) latest version on their webpage has been updated.

                如果你从他们的网站安装了 GLFW,我建议你从 git 中提取代码并在本地编译.

                If you have installed GLFW from their website, I recommend pulling the code from git and compiling it locally.

                (有关从来源.)

                这篇关于GLFW 第一响应者错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:SOIL 连接不正确 下一篇:OpenGL 变换不同轴多次旋转的对象

                相关文章

                最新文章

                  <bdo id='oQ678'></bdo><ul id='oQ678'></ul>
                1. <small id='oQ678'></small><noframes id='oQ678'>

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