[Mesa-dev] [PATCH 02/12] glut_wrapper: Include freeglut.h if available.

Fabian Bieler fabianbieler at fastmail.fm
Wed Feb 19 15:17:03 PST 2014


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: Brian Paul <brianp at vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
---
 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>
-- 
1.8.3.2



More information about the mesa-dev mailing list