Hi
My question is how would I get opengl to work with allegro? How would I set up the opengl libraries so that allegro could use them?
By the way I set up a program already to see if opengl functions would work but they did not.
67305216 is the output from al_get_opengl_version() so something is wrong here.
What could I do to fix this problem?
67305216 is the output from al_get_opengl_version() so something is wrong here.
Looking at it as a hex number, it's 0x402FF00, which breaks down to version 4.2.255, as explained in the documentation.
Okay so that explains that but when I use this code...
I get an undefined reference to glEnable. So how could I get this to work?
You didn't say what compiler you're using, just at a guess MSVC would want opengl32.lib (and possibly glu32.lib if you use any of those functions in the future) and Mingw would want -lopengl32 and -lglu32.
oh sorry
I'm using MinGW version 4.7.1 with Code::Blocks
I don't use Code::Blocks, but if it wants the literal names of the libraries, they'd be libopengl32.a and libglu32.a.
Okay I linked the libraries and it works
Thank you very much