Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: glDebugMessageCallback on nVidia using Ubuntu

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2012
    Posts
    13

    glDebugMessageCallback on nVidia using Ubuntu

    Hi,

    I have successfully used glDebugMessageCallback on Windows 7 with the same GTX 465.

    When I try to do this on Ubuntu 12.04, glDebugMessageCallback/ARB are null using GLEW.
    Does nVidia support the ARB_debug_output for linux yet?
    I was using GL 4.3 beta driver version 304.15, but also tried the later 304.43 version.

    Thank you.
    Last edited by Johnny Tremain; 09-20-2012 at 10:31 PM.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,128
    Only with a debug context.

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2012
    Posts
    13
    Hi thokra,

    What do you mean by "debug context"? The executable has to be in debug mode?

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,128
    No, a GL context that has been created with GLX_CONTEXT_DEBUG_BIT_ARB as part of the context flags. How do you create your context?

  5. #5
    Junior Member Newbie
    Join Date
    Apr 2012
    Posts
    13
    Ah. I did some searching and I think the equivalent of that using freeglut is GLUT_DEBUG via glutInitContextFlags(GLUT_FORWARD_COMPATIBLE | GLUT_DEBUG). Is that the right way? I followed this: http://www.seas.upenn.edu/~pcozzi/Op...bug_output.pdf

    Code :
        glutInit(&argc, argv);
     
     
        glutInitContextVersion(4, 2);
        glutInitContextFlags(GLUT_FORWARD_COMPATIBLE | GLUT_DEBUG);
        glutInitContextProfile(GLUT_CORE_PROFILE);
     
     
        glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE,
            GLUT_ACTION_GLUTMAINLOOP_RETURNS);
     
     
        glutInitWindowSize(mPixelWidth, mPixelHeight);
     
     
        glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH);
     
     
        mHandle = glutCreateWindow(k_Window_Name);
        if(mHandle < 1) {
            error(AT, "s", k_Error_System_Window);
            getchar();
            exit(0);
        }
     
     
        glutSetWindowData(this);
        glutDisplayFunc(proxyDisplay);
        glutIdleFunc(proxyIdle);
        glutKeyboardFunc(proxyKeyboard);
        glutMotionFunc(proxyMotion);
        glutMouseFunc(proxyMouse);
        glutMouseWheelFunc(proxyMouseWheel);
        glutReshapeFunc(proxyResize);
     
     
        GLenum glew_init_result = glewInit();
        if(GLEW_OK != glew_init_result) {
            error(AT, "s", glewGetErrorString(glew_init_result));
            getchar();
            exit(0);
        }
     
     
        char window_title_info[BUFSIZ];
        sprintf(window_title_info, k_Window_Title_Format, k_Window_Name,
            glGetString(GL_VERSION));
        glutSetWindowTitle(window_title_info);
     
     
        mCamera = new Camera(90.0f, 0.1f, 10000.0f);
     
     
        glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
        if(glDebugMessageCallback)
        glDebugMessageCallback(debugLog, nullptr);

    If I change it to 4.3, the following happens:
    X Error of failed request: BadMatch (invalid parameter attributes)
    Major opcode of failed request: 135 (GLX)
    Minor opcode of failed request: 34 ()
    Serial number of failed request: 30
    Current serial number in output stream: 31

    Thank you again.

  6. #6
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,128
    Should work. It's not surprising that GLX misbehaves, since the current NVIDIA binary blob in the Ubuntu repos does only 4.2. Did you try that on the GL beta driver or on 304.43?

  7. #7
    Junior Member Newbie
    Join Date
    Apr 2012
    Posts
    13
    I see. I will migrate back to beta driver to test. I thought 304.43 would include beta 301.15 though.

  8. #8
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,213
    Current NVidia Linux GL 4.3 driver version is 304.15.00.02 which is a beta (see the link).

    And no, from the version numbers and the driver changelogs, it appears that they pretty consistently put the drivers for the new GL version on a branch and release in beta for a while, until it's stable and then merge it back into the mainline in an official driver release.

  9. #9
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    When I try to do this on Ubuntu 12.04, glDebugMessageCallback/ARB are null using GLEW.
    Does nVidia support the ARB_debug_output for linux yet?
    `glDebugMessageCallbackARB` is from ARB_debug_output. That's a different extension and different extension function from `glDebugMessageCallback`, which is from KHR_debug. They are two different extensions, two different functions, and you shouldn't try to pretend that one comes from the other.

    ARB_debug_output is generally only implemented in debug contexts. However, KHR_debug is a core OpenGL extension and a part of GL 4.3; it's always there (assuming the implementation has KHR_debug or GL 4.3 support). However, if the context isn't a debug context, the functions won't necessarily do anything.

  10. #10
    Junior Member Newbie
    Join Date
    Apr 2012
    Posts
    13
    Thank you for all of your inputs. Unfortunately, I just tested with the beta drivers and it's still core dumping on me. Using the code I posted, those functions are linked to libGLEW.so.1.9 properly, but at run-time it's nullptr.

    I am sure my code is correct because this works on Windows 7 x64 same system. I am definitely using 4.3 beta drivers because the errors I posted below my code talking about using 4.3 context no longer appears.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •