Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 10 of 78

Thread: Ugly Core Profile Creation

Hybrid View

  1. #1
    Intern Contributor
    Join Date
    May 2012
    Posts
    98

    Ugly Core Profile Creation

    I'm trying to create a core profile context as described in the OpenGL Superbible text, creating a temporary context to get the extension functions and then use them to create another context. However using the gDebugger, it's reporting this error:

    Detected error: The debugged process asked for an extension function pointer (glXXXXXXXXXX) from one render context, but called this function pointer in another render context...

    Something gDebugger does not like? or is it forbidden to do so?

    Thanks.

  2. #2
    Advanced Member Frequent Contributor Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    954
    What gDEBugger reported is quite correct. You should grab pointers using temporary context only for needed functions to create a new context. All other pointers should be grabbed from the new context.
    Generally it is not a problem, but if you want to avoid gDEBugger's message follow the previous advice.

  3. #3
    Intern Contributor
    Join Date
    May 2012
    Posts
    98
    Thanks Aleksandar. But you see the problem is more related to the way OpenGL contexts are created. It's hacked into an ancient wgl functions that will never change.

  4. #4
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,793
    You have three choices:

    1: Use many of the various toolkits to abstract this stuff away.

    2: Deal with it as Aleksandar suggested.

    3: Use Direct3D.

    Complaining about it isn't going to solve the problem.

  5. #5
    Intern Contributor
    Join Date
    May 2012
    Posts
    98
    1: Use many of the various toolkits to abstract this stuff away.
    These libraries and toolkits use the same ancient wgl calls, so the problem is there.

    2: Deal with it as Aleksandar suggested.
    It's just a workaround/hack, but for how long are we going to deal with it.

    3: Use Direct3D.
    Maybe for games; not suitable for CAD applications.

    Complaining about it isn't going to solve the problem.
    The whole idea of complaining is to show that we are not happy with the current way of handling context creation. The OpenGL API has improved and developed a lot, but the platform-specific part of it still dead. I know it's up to the platform creators to change this but, if they don't have any specification to follow, why should they bother?
    It's absolutely the ARB responsibility to make a specification for every aspect of OpenGL.

  6. #6
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,793
    These libraries and toolkits use the same ancient wgl calls, so the problem is there.
    No it isn't. The problem, as you stated it, was "using the gDebugger, it's reporting this error:". Those toolkits should already have implemented what Aleksandar suggested; if they didn't, file a bug report with them and/or fix it in the code yourself.

    The actual problem this thread was created to solve, the gDebugger issue, is solved by doing what Aleksandar said.

Posting Permissions

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