Browse Source

Fix crash with pandagl on freebsd - Panda now fully works on FreeBSD. yay!

rdb 16 years ago
parent
commit
af7f3f7e28
1 changed files with 6 additions and 2 deletions
  1. 6 2
      panda/metalibs/pandagl/pandagl.cxx

+ 6 - 2
panda/metalibs/pandagl/pandagl.cxx

@@ -17,11 +17,15 @@
 #include "osxGraphicsPipe.h"
 #endif
 
-#ifdef IS_LINUX
+#ifdef HAVE_GLX
 #include "config_glxdisplay.h"
 #include "glxGraphicsPipe.h"
 #endif
 
+#if !defined(HAVE_WGL) && !defined(IS_OSX) && !defined(HAVE_GLX)
+#error One of HAVE_WGL, IS_OSX or HAVE_GLX must be defined when compiling pandagl!
+#endif
+
 // By including checkPandaVersion.h, we guarantee that runtime
 // attempts to load libpandagl.so/.dll will fail if they inadvertently
 // link with the wrong version of libdtool.so/.dll.
@@ -68,7 +72,7 @@ get_pipe_type_pandagl() {
   return osxGraphicsPipe::get_class_type().get_index();
 #endif
 
-#ifdef IS_LINUX
+#ifdef HAVE_GLX
   return glxGraphicsPipe::get_class_type().get_index();
 #endif