Issue with Nvidia 285.62 and GL_CLAMP_TO_EDGE

Hi people,

I got an issue with last SDL 2.0 snapshot and the Nvidia 285.62 driver on Windows 7 x86-64 (my graphic card is a GeForce GT 425m).

The following code (from src/render/opengl/SDL_render_gl.c) produces an GL_INVALID_ENUM error after each glTexParameteri() call with GL_CLAMP_TO_EDGE argument.

I’m using these parameters :

-> GL_TEXTURE_2D texture type.
-> internalFormat = GL_RGBA8;
-> format = GL_BGRA;
-> type = GL_UNSIGNED_INT_8_8_8_8_REV;

I tried several power of 2 sized textures (all from PNG file) from 16x16 to 1024x1024 … No way !


    renderdata->glEnable(data->type);
    renderdata->glBindTexture(data->type, data->texture);
    renderdata->glTexParameteri(data->type, GL_TEXTURE_MIN_FILTER, scaleMode);
    renderdata->glTexParameteri(data->type, GL_TEXTURE_MAG_FILTER, scaleMode);

    /* According to the spec, CLAMP_TO_EDGE is the default for TEXTURE_RECTANGLE
       and setting it causes an INVALID_ENUM error in the latest NVidia drivers.
    */

    if (data->type != GL_TEXTURE_RECTANGLE_ARB) {
        renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_S,
                                    GL_CLAMP_TO_EDGE);
        renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_T,
                                    GL_CLAMP_TO_EDGE);
    }

I tried this code on a Ubuntu Linux computer with 3.3.0 NVIDIA 260.19.06 driver, and it’s functionnal.

Moreover, it seems to work properly with older Nvidia windows driver or AMD/ATI drivers.

I changed GL_CLAMP_TO_EDGE to GL_CLAMP, and it works ! But why not with the first one ?

Is it a known OpenGL issue with my driver version ?

If you need more information, please let me know.

Thanks for your help,

Arnaud.

PS : I have posted the same message on the official Nvidia forum here : http://forums.nvidia.com/index.php?showtopic=222949

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.