I want to know the opengl extensions, using glGetStringi, but the code doesn’t compile. What the include for glGetStringi?
I’m using Code::Blocks with mingw on windows 7.
Ah yes, glGetStringi is a GL 3.0 or higher function IIRC. The standard GL header shipped with Windows, however, exposes only GL 1.1 functionality. Checkout glLoadGen or GLEW.
Correction: Your header is shipped with MinGW. Still, MinGW’s gl.h doesn’t expose GL 3.0 or higher functions. The advice stays the same.
I got GLEW_OK on glewInit, but glGetStringi don’t compile, I got undefined reference. What shall be wrong?
glewExperimental is a undefined reference too.
You’re getting linker errors because you’re probably linking with the wrong libraries (or not linking with them at all). Honestly, if you want this to be much simpler, just use glLoadGen and include the source/headers into your project directly.