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 11

Thread: Mesa 10.3.0 driver with ATI graphics card and opengl 3.3 (Driver bug ?)

Hybrid View

  1. #1
    Intern Newbie
    Join Date
    Jul 2014
    Posts
    46

    Mesa 10.3.0 driver with ATI graphics card and opengl 3.3 (Driver bug ?)

    Hi!

    I'm trying to use moddern opengl with opensource drivers on linux.

    But I have a crash when I'm trying to generate a vao : (After creating the opengl context and the window, the opengl context is creating well because glGetString gives me the version 3.3 for opengl and for the shading language)

    Code :
    GLuint vertexArrayID;
    glCheck(glGenVertexArrays(1, &vertexArrayID));

    My graphic card is an ATI mobility radeon HD 5470 (512 MB) and my operating system is ubuntu 14.04. (64 bits)

    Unfortunately I can't use the proprietary drivers because it didn't work with the graphical interface of ubuntu. (I get a black screen instead of the logon screen)

    PS : I've set GlewExperimental to GL_TRUE before initializing Glew but it doesn't solved the problem.
    Last edited by Lolilolight; 07-14-2014 at 01:32 AM.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,321
    Can you double-check that you've initialized GLEW after you've created the context? Apologies if this seems obvious to you, but it is a common error. Also - are you checking the return value from your glewInit call?

  3. #3
    Intern Newbie
    Join Date
    Jul 2014
    Posts
    46
    It was glew which was not initialized, c++ simply doesn't want to enter into my function which initialize glew so I typed all the code of the function into the constructor of my window and now it works.

    Very strange I have no compilation errors, and the function was not called...

  4. #4
    Intern Newbie
    Join Date
    Jul 2014
    Posts
    46
    Mmm .......... I think that driver doesn't support opengl 3.3 very, well.

    Opengl return me an invalid error while generating the vao.

    And the compilation of the shaders fails :
    Code :
    const std::string vertexShader =
                "#version 330 \n"
                "layout(location = 0) in vec3 vertex_position;"
                "layout(location = 1) in vec4 vertex_color;"
                "layout(location = 2) in vec2 vertex_texCoords0;"
                "layout(location = 3) in vec3 vertex_normal;"
                "layout(location = 10) in mat4 mvp;"
                "out vec2 texCoords;"
                "out vec4 color;"
                "void main () {"
                    "gl_Position = mvp * vec4(vertex_position, 1.0);"
                    "texCoords = vertex_texCoords0;"
                    "color = vertex_color;"
                "}";

    It tells me that there is an unexpected ; at line 2. (...)

    And I have a lot of invalid enum errors with other opengl functions. (With some glDisable and glEnable functions, glLoadMatrix, etc...)

    But until opengl 3.0 it works well...

  5. #5
    Advanced Member Frequent Contributor
    Join Date
    Apr 2009
    Posts
    607
    Quote Originally Posted by Lolilolight View Post
    Mmm .......... I think that driver doesn't support opengl 3.3 very, well.

    Opengl return me an invalid error while generating the vao.

    And the compilation of the shaders fails :
    Code :
    const std::string vertexShader =
                "#version 330 \n"
                "layout(location = 0) in vec3 vertex_position;"
                "layout(location = 1) in vec4 vertex_color;"
                "layout(location = 2) in vec2 vertex_texCoords0;"
                "layout(location = 3) in vec3 vertex_normal;"
                "layout(location = 10) in mat4 mvp;"
                "out vec2 texCoords;"
                "out vec4 color;"
                "void main () {"
                    "gl_Position = mvp * vec4(vertex_position, 1.0);"
                    "texCoords = vertex_texCoords0;"
                    "color = vertex_color;"
                "}";

    It tells me that there is an unexpected ; at line 2. (...)
    If you add a \n at the end of each C-src line you would be able to tell where it complains.

    And I have a lot of invalid enum errors with other opengl functions. (With some glDisable and glEnable functions, glLoadMatrix, etc...)

    But until opengl 3.0 it works well...

    For OpenGL v3.1, 3.2, and 3.3, Mesa only supports -CORE- profile. So, enumerations and functions not found in core profile, for example glLoadMatrix, do NOT work and that is NOT a bug.

  6. #6
    Intern Newbie
    Join Date
    Jul 2014
    Posts
    46
    Mmm..., I have a core profile, if I try to create a compatibility profile it fails to create the opengl context.

    And I load my shader from the memory so I need the \n otherwise, the text is collapsed like this (#version xxxlayout(location=0) etc...) so it fails to compile, and with GLSL 1.3 this code is compiling perfectly :

    Code :
    const std::string  vertexShader =
               "#version 130 \n"
               "void main () {"
                    "gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;"
                    "gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;"
                    "gl_FrontColor = gl_Color;"
               "}";

    So I think this is a bug.

    The glLoadMatrix function generate an error so I think it's creating a compatibility profile but why...

Posting Permissions

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