Demos (master): glut_wrapper: Include freeglut.h if available.

Kenneth Graunke kwg at kemper.freedesktop.org
Sat Mar 8 10:11:16 UTC 2014


Module: Demos
Branch: master
Commit: 1dff474b825da4d462a9396dfec55b95c03da9e8
URL:    http://cgit.freedesktop.org/mesa/demos/commit/?id=1dff474b825da4d462a9396dfec55b95c03da9e8

Author: Fabian Bieler <fabianbieler at fastmail.fm>
Date:   Wed Feb  5 22:07:42 2014 +0100

glut_wrapper: Include freeglut.h if available.

The freeglut header only defines the extensions to request an OpenGL core
profile context if freeglut.h (rather than glut.h) is included.

Note that the header is installed to include/GL/freeglut.h on OS X, too.

Signed-off-by: Fabian Bieler <fabianbieler at fastmail.fm>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/util/glut_wrap.h |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/util/glut_wrap.h b/src/util/glut_wrap.h
index a48a9e8..fa1b8f9 100644
--- a/src/util/glut_wrap.h
+++ b/src/util/glut_wrap.h
@@ -1,7 +1,9 @@
 #ifndef GLUT_WRAP_H
 #define GLUT_WRAP_H
 
-#ifdef __APPLE__
+#ifdef HAVE_FREEGLUT
+#  include <GL/freeglut.h>
+#elif defined __APPLE__
 #  include <GLUT/glut.h>
 #else
 #  include <GL/glut.h>




More information about the mesa-commit mailing list