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 8 of 8

Thread: solution for deprecated glPushAttrib/glPopAttrib ...

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2017
    Posts
    9

    solution for deprecated glPushAttrib/glPopAttrib ...

    With NVidia's driver, it deals well with the legacy opengl code like:
    glPushAttrib/glPopAttrib,
    glPushClientAttrib/glPopClientAttrib,
    glBegin(GL_TRIANGLES);
    ...
    glEnd();

    But with ATI's driver, all these kind of functions do not work in default mode.
    I wonder if there is a way to enable them or I have to rewrite all these code in modern gl if I want it run on an ATI graphics card.

    Thank you so much!

  2. #2
    Member Regular Contributor
    Join Date
    Jul 2012
    Posts
    420
    What kind of context do you create ? What OpenGL version do you request ?

  3. #3
    Junior Member Newbie
    Join Date
    Jun 2017
    Posts
    9
    glGetString(GL_VERSION) gives me,
    OpenGL version: 4.3.13085 Core Profile Forward-Compatible Context FireGL 10.143.2.1

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,687
    How do you create your context? What OS is the ATI card on?

    The issue here is that the default context type should be compatibility, unless you explicitly request a core context at creation time, which means that the deprecated functions (and any legacy programs that may use other deprecated functions) will continue to work.

    However, drivers on some operating systems don't give you this behaviour; IIRC under MacOS if you create a 3.x or better context you get core and core only; there is no compatibility option. So the solution if you wish to use deprecated features is to create a 2.1 or 2.0 context.

  5. #5
    Junior Member Newbie
    Join Date
    Jun 2017
    Posts
    9
    Quote Originally Posted by mhagain View Post
    How do you create your context? What OS is the ATI card on?

    The issue here is that the default context type should be compatibility, unless you explicitly request a core context at creation time, which means that the deprecated functions (and any legacy programs that may use other deprecated functions) will continue to work.

    However, drivers on some operating systems don't give you this behaviour; IIRC under MacOS if you create a 3.x or better context you get core and core only; there is no compatibility option. So the solution if you wish to use deprecated features is to create a 2.1 or 2.0 context.
    I figure out that I need to set 2.1 context to make ATI driver work in 4.4 Compatibility Profile.
    I set the context in Qt
    QSurfaceFormat fmt;
    fmt.setVersion(2, 1);
    fmt.setProfile(QSurfaceFormat::CompatibilityProfil e);
    fmt.setSamples(4);
    ......

    Used GLView to check the GL version of this driver. (http://realtech-vr.com/admin/glview)
    It starts from 3.0. Latest one is OpenGL 4.4.
    But when I set it to be 4.4 or 4.3, the OpenGL version I get during rendering is always "4.4.13085 Core Profile Forward-Compatible Context FireGL 10.143.2.1"
    Only when I set it to be 2.1, the version becomes "4.4 Compatibility Profile FireGL ..."
    Will it really support 2.1 ? Or it's an invalid version and only with this version number, ATI driver knows it needs turn back to compatibility profile?

    Thank you for all the help!

  6. #6
    Junior Member Newbie
    Join Date
    Jun 2017
    Posts
    9
    How can I mark this topic as solved?

  7. #7
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Posts
    2,407
    Quote Originally Posted by lzheng View Post
    How can I mark this topic as solved?
    You just have ;)

  8. #8
    Junior Member Newbie
    Join Date
    Jun 2017
    Posts
    9
    Thank you!

Tags for this Thread

Posting Permissions

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