Glu.h VS glut.h (cross platform question)


#1

Hi everybody,
in the JUCE demo, this is the header that is suggested for an standard OpenGLComponent:

[code]#if JUCE_OPENGL

#ifdef _WIN32
#include <gl/gl.h>
#include <gl/glu.h>
#ifdef _MSC_VER
#pragma comment(lib, “OpenGL32.Lib”)
#pragma comment(lib, “GlU32.Lib”)
#endif
#elif defined (LINUX)
#include <GL/gl.h>
#include <GL/glut.h>
#undef KeyPress
#else
#include <AGL/agl.h>
#include <GLUT/glut.h>
#endif[/code]

I’m still a newbie in OpenGL related stuff but I’m afraid that glu.h and glut.h contain different functions and therefore it’s easy to come up with non cross platform code.

I’d like to know what people normally do to overcome this problem or if I’m wrong with this assumption.

For example, should I download and use glut for all operating systems?

Thanks in advance,
MarC


#2