I am trying to compile a very basic OpenGL program that draws a cube using Vertex Array Buffers passed to vertex & fragment shaders
My code is tested & runs perfectly on OSX, however it does not compile on Windows 7 machine. I have the nVidia GeForce 540M chipset and have updated my drivers to the latest
I import the necessary headers using:
Code :#ifdef _WIN32 #include <Windows.h> #endif #include <stdlib.h> #include <stdio.h> #ifdef __APPLE__ #include <OpenGL/gl.h> #include <Glut/glut.h> #else #include <GL/gl.h> #include <GL/glut.h> #endif
however, I get compilation errors in Visual C++ 2010 express saying: ERROR: identifer 'xyz' is undefined, where xyz is one of:
and others. stuff likeCode :glCreateProgram(), GL_VERTEX_SHADER, GL_FRAGMENT_SHADER, glAttachShader, glLinkProgramhowever is fine and has no compilation errors.Code :glClearColor, glEnable, glBlendFunc
So, why are these symbols undefined? what imports am I missing / doing wrong?
HERE is a complete paste of my code if it would help at all. The includes are in the "shaderUtilities.h" file
Thanks for your help in advance
Disclaimer: complete newbie here, so please forgive my ignorance if this is the wrong place to post. Also, I have searched for a similar issue, but could not find one, so if this is indeed a repeated question, please forgive me and kindly redirect me to what I should read / search for




