0
votes

I am trying to render a cube in opengl using vertex array objects. The same code works on a linux box but doesnt work on a windows machine. I get unresolved external error while using glGenVertexArrays and glBindVertexArray.

glewInfo.exe reports glGenVertexArrays and glBindVertexArray are usable:

GL_ARB_vertex_array_object:                                    OK 
---------------------------
  glBindVertexArray:                                           OK
  glDeleteVertexArrays:                                        OK
  glGenVertexArrays:                                           OK
  glIsVertexArray:                                             OK
1
How do you query those extensions in your code? Do you use a loader library? If so, which one? If not, how are you doing it?derhass
Like I said, the above result is the output of glewinfo.exe. I did not need to verify these extensions as the code directly worked on my linux box. I also checked that the graphics drivers on the windows machine are outdated(nvidia gt350m). Maybe that could be the problem? TBH, I do not have much time to test this since the windows machine is not mine. But I will try and check the extensions from within my application(it's a qt application)Richard Macwan
Btw, can it be as simple as glEnable(GL_ARB_vertex_array_object); ? I will try that as soon as I get my hands on the windows machine.Richard Macwan
Obviously not! But it was worth a shot!Richard Macwan
Well. The fact that you use the glewinfo binary does not imply that you use glew also in your code base. I just wanted to make sure. If you use glew and get those unresolved linker errors, there is something wrong with with lniking, and no runtime code can fix that. Note then when you use glew as a static library (or directly add the glew sources to your code) on windows, you have to #define GLEW_STATIC before including glew.h.derhass

1 Answers

1
votes

Likely you're not using the correct opengl.dll lib. Windows comes with a software renderer by default, you might be using that one.

Check out the websites of your graphics card vendor for the proper library.