program stopped working after installed new nvidia 64-bit linux driver v310.19

I just installed a new video card (GTX 680) in my computer (64-bit ubuntu linux v12.04) and installed the latest nvidia driver (v310.19) and updated my GLEW files to v190. I updated my GL and GLX include files from the nvidia driver, and updated my GLEW include and source files from the new GLEW files.

Now my 3D engine does not start up. BTW, it did run on the new graphics card before I updated the drivers and GLEW (I am about 99% sure of that).

The problem is, the OpenGL function glGenVertexArrays(1, &vaoid) always returns a value of zero no matter how many times I call the function, and no matter how many VAO identifiers I ask the function to generate.

Does anyone know what this problem is… or might be?

I cut and paste the section of code where the problem occurs. Note that I just added all those glGetError() calls to debug what’s happening. Note that ALL of the glGetError() calls return zero, indicating no errors. However, it seems to me that glGetVertexArrays() returning a value of zero IS an error (at least on its part).

Note that it returns valid values/names for the IBO and VBO (values == 1 and 2).

Note that this error is happening the first time glGetVertexArrays() is being called after my program starts up. Also note that the same problem happens whether I compile the program into a 32-bit executable or a 64-bit executable (both of which ran before).

My current code is OpenGL v3.20 level. I upgraded my GPU to update my engine to OpenGL and GLSL v4.30 level.

Hmmmm. During startup I print out a whole pile of xwindows, GLX and GL values, and I notice the following string prints out for glGetString(GL_VERSION):

2.1.2 NVIDIA 313.09

What is the 2.1.2 supposed to be? The version of OpenGL? If so, that appears to be a version before the VAO was supported. If so, is there some new call that’s now required to specify what version of OpenGL my program intends to access… and maybe it defaults to v2.12 if nothing is specified? (Of course, I don’t think there ever was a version 2.12 of OpenGL).

Also, what is the 313.09 supposed to be? The driver was supposed to be 310.19 on the nvidia website (and that is still the version on their website today, so I don’t think v313.09 even exists yet).

u32 vaoie = 0;
u32 vaoif[4];
vaoif[0] = 0;
vaoif[1] = 0;
vaoif[2] = 0;
vaoif[3] = 0;
error = glGetError();
error = glGetError();
glGenBuffers (1, (GLuint*)&iboid);                 // OpenGL - create IBO identifier
error = glGetError();
glGenBuffers (1, (GLuint*)&vboid);                 // OpenGL - create VBO identifier
error = glGetError();
glGenVertexArrays (1, (GLuint*)&vaoid);            // OpenGL - create VAO identifier
error = glGetError();
glGenVertexArrays (1, (GLuint*)&vaoie);
error = glGetError();
glGenVertexArrays (4, (GLuint*)&vaoif[0]);
error = glGetError();
if (iboid <= 0) { return (CORE_ERROR_INTERNAL); }  // error - invalid IBO identifier
if (vboid <= 0) { return (CORE_ERROR_INTERNAL); }  // error - invalid VBO identifier
if (vaoid <= 0) { return (CORE_ERROR_INTERNAL); }  // error - invalid VAO identifier

It appears the problem happens because my code does not receive an appropriate OpenGL context. Previously it was requesting an OpenGL v3.20 context and receiving it. Now when the code requests an OpenGL v3.20 context, it receives an OpenGL v2.12 context (which I guess is the same as an OpenGL v2.10 context).

Why would the new driver not give me anything higher than the default OpenGL v2.10 context? Perhaps something in the order of the function calls in my code is not compatible with some change in the new nvidia v310.19 drivers?

Make any sense, anyone?

I’ll post a separate question asking about this OpenGL context issue. The current message title just doesn’t make sense for that.