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 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: OpenGL 3.0 in Catalyst 9.1

  1. #11
    Advanced Member Frequent Contributor Mars_999's Avatar
    Join Date
    Mar 2001
    Location
    Sioux Falls, SD, USA
    Posts
    519

    Re: OpenGL 3.0 in Catalyst 9.1

    //vs
    void main(void)
    {
    gl_Position = ftransform();
    }

    //fs
    void main(void)
    {
    gl_FragColor = vec4( 0.4, 0.0, 0.9, 1.0 );
    }

  2. #12
    Advanced Member Frequent Contributor
    Join Date
    Apr 2003
    Posts
    666

    Re: OpenGL 3.0 in Catalyst 9.1

    An empty fragment shader is perfectly legal. It just writes undefined values to the color output then.

  3. #13
    Junior Member Regular Contributor
    Join Date
    Mar 2007
    Location
    Latvia
    Posts
    225

    Re: OpenGL 3.0 in Catalyst 9.1

    Mars_999: what do you want to tell with that? There is no such thing as ftransform() and gl_FragColor ir forward compatible context.

  4. #14
    Senior Member OpenGL Pro k_szczech's Avatar
    Join Date
    Feb 2006
    Location
    Poland
    Posts
    1,108

    Re: OpenGL 3.0 in Catalyst 9.1

    So you all went back to writting "hello world" shaders?
    "OpenGL 3.0 - A Big Step in the Right Direction"

    Of course it's not OpenGL's fault, that drivers don't work, but perhaps clean API would address this problem better...

  5. #15
    Junior Member Newbie
    Join Date
    Feb 2009
    Posts
    1

    Re: OpenGL 3.0 in Catalyst 9.1

    For the shader problem, try defining GLSL version 1.30 in the shader. That seems to of fixed the compile errors I was getting. Kind of strange though, hopefully they fix these problems with their next release.

  6. #16
    Junior Member Regular Contributor
    Join Date
    Mar 2007
    Location
    Latvia
    Posts
    225

    Re: OpenGL 3.0 in Catalyst 9.1

    Hmm, adding #version 130 helps.
    With following fragment shader:
    Code :
    #version 130
    in vec3 fragment_color;
    out vec3 screen_color;
    void main()
    {
      screen_color = fragment_color;
    }
    I am getting following error:
    Code :
    Fragment shader compile error:
    Fragment shader failed to compile with the following errors:
    ERROR: 0:2: '' : Declaration must include a precision qualifier or the default precision must have been previously declared.
    ERROR: 0:3: '' : Declaration must include a precision qualifier or the default precision must have been previously declared.
    ERROR:  compilation errors.  No code generated.

    I changed shader to:
    Code :
    #version 130
    precision mediump float;
    in vec3 fragment_color;
    out vec3 screen_color;
    void main()
    {
      screen_color = fragment_color;
    }
    Then everything compiles and links fine (after adding same precision to vertex shader) Thanks rpggamer! I assumed that GL3 forward compatible context by default expects GLSL version 1.30, but I guess you can expect many strange things from ATI

    Now when shader program compiles and links fine, I'm getting next error - glBindBuffer(GL_ARRAY_BUFFER, id) generates GL_INVALID_OPERATION error in forward compatbile context. It doesn't matter if VAO is bound or not. id is generated correctly with glGenBuffers. Any suggestions here?
    Even glBindBuffer(GL_ARRAY_BUFFER, 0) generates same GL_INVALID_OPERATION.

  7. #17
    Junior Member Regular Contributor
    Join Date
    Mar 2007
    Location
    Latvia
    Posts
    225

    Re: OpenGL 3.0 in Catalyst 9.1

    9.2 driver fixed some things.

    glGetString(GL_VERSION) now doesn't crash - it returns "3.0.8494 Release".

    glGetStringi(GL_EXTENSIONS, x) now also works - returns correct extension strings.

    glGetString(GL_SHADING_LANGUAGE_VERSION) also returns correct value - "1.30".

    But still - I can not glBindBuffer(GL_ARRAY_BUFFER, id) with correct id in forward compatible context.

Posting Permissions

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