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 12

Thread: NVIDIA Driver Bug?

  1. #1
    Intern Contributor
    Join Date
    May 2008
    Posts
    86

    NVIDIA Driver Bug?

    I downloaded the ogl2brick example from here.

    If I use the GLEW library I get the red brick wall as expected, but if I remove the GLEW linkage and the call to glewInit, the wall is black. Removing GLEW should make the program use the calls supplied in the NVIDIA headers, right? Am I missing something?

    I'm using 64 bit OpenSUSE and the 3.0.0 NVIDIA 180.51 driver.

  2. #2
    Senior Member OpenGL Pro dletozeun's Avatar
    Join Date
    Jan 2006
    Location
    FRANCE
    Posts
    1,370

    Re: NVIDIA Driver Bug?

    If it is a driver bug, mesa3D one is also concerned since I got almost the same issue without using glew as I said in your last thread. IMO, there are better chances that it comes from the ogl2brick application itself.

    Does that happens with other simple applications that uses glsl shaders?

  3. #3
    Intern Contributor
    Join Date
    May 2008
    Posts
    86

    Re: NVIDIA Driver Bug?

    I guess it could be some sort of glut issue. I tried writing a simple application using glut that accessed a texture in a shader, but once again everything was black.

    It's hard to debug something that doesn't give errors and renders completely black objects.

    Thanks for your help, dletozeun.

  4. #4
    Intern Contributor
    Join Date
    May 2008
    Posts
    86

    Re: NVIDIA Driver Bug?

    I figured out the problem with my program. GL_TEXTURE_MIN_FILTER was set to GL_NEAREST_MIPMAP_NEAREST, but I wasn't generating mipmaps. Once I changed it to LINEAR or NEAREST, it worked.

    I still have no clue what's up with the brick example though.

    Thanks.

  5. #5
    Senior Member OpenGL Guru
    Join Date
    Dec 2000
    Location
    Reutlingen, Germany
    Posts
    2,052

    Re: NVIDIA Driver Bug?

    "Removing GLEW should make the program use the calls supplied in the NVIDIA headers, right? "

    Definitely not, it just breaks the program.
    GLIM - Immediate Mode Emulation for GL3

  6. #6
    Intern Contributor
    Join Date
    May 2008
    Posts
    86

    Re: NVIDIA Driver Bug?

    Thanks Jan. Can you elaborate?

  7. #7
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,421

    Re: NVIDIA Driver Bug?

    So when you remove GLEW, what do you do? Do you get the function pointers with glXGetAddress?
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  8. #8
    Senior Member OpenGL Guru
    Join Date
    Dec 2000
    Location
    Reutlingen, Germany
    Posts
    2,052

    Re: NVIDIA Driver Bug?

    If i understand you correctly, you simply remove the call to glewInit and the linker-setting to link to glew.

    If you don't do anything else, that simply means, that your extension-pointers won't be initialized AT ALL. There is no default fallback that kicks in. You would need to do everything yourself (or through another library such as glee).

    If you include glext.h you get at least some enums defined, which you might be able to use, but you don't get any function pointers initialized. So basically, if your app still tries to access any of those functions, you should get a null-pointer exception.

    So, how much your app gets "broken" by removing glew depends on how much it tries to use extensions, but in most cases you will get into trouble fast. What i really meant is, that by that move you really remove functionality, you don't get it replaced automatically, so if you were not aware of that, you basically introduced a "bug" that might bite you later on (but now you know ;-) ).


    On Linux this might be less bad than on Windows, afaik on Linux you get much higher OpenGL versions by default, on Windows the default OpenGL version is 1.2 or 1.4, so using glew is essential there. On Linux i am not up to date what you get by default.

    Jan.
    GLIM - Immediate Mode Emulation for GL3

  9. #9
    Intern Contributor
    Join Date
    May 2008
    Posts
    86

    Re: NVIDIA Driver Bug?

    Quote Originally Posted by Jan

    On Linux this might be less bad than on Windows, afaik on Linux you get much higher OpenGL versions by default, on Windows the default OpenGL version is 1.2 or 1.4, so using glew is essential there. On Linux i am not up to date what you get by default.

    Jan.
    Yes, on Linux this is much less bad than Windows. From what I understand, Microsoft hasn't updated the OpenGL dll in forever. On Linux, when you install an NVIDIA driver, you get the latest headers and everything is updated so all you do is use the GL calls. So, you don't need to use a library like glew.

  10. #10
    Senior Member OpenGL Pro dletozeun's Avatar
    Join Date
    Jan 2006
    Location
    FRANCE
    Posts
    1,370

    Re: NVIDIA Driver Bug?

    I figured out the problem with my program. GL_TEXTURE_MIN_FILTER was set to GL_NEAREST_MIPMAP_NEAREST, but I wasn't generating mipmaps. Once I changed it to LINEAR or NEAREST, it worked.
    Yes the default minification filter requires to generate mipmaps, though I have never understood why, it is a source of many problems especially when rendering to texture with fbo...

    Anyway, since your hardware/driver supports OpenGL 3.0, your program does not require any extension to use GLSL shaders since it has been promoted to core feature in opengl 2.0.

    About the ogl2brick example, I don't have more ideas since I did not look into its code.

Posting Permissions

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