浏览代码

Fix build with OpenGL but without CUDA

Samuel Thibault 11 年之前
父节点
当前提交
b5d6297509
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      examples/gl_interop/gl_interop.c

+ 3 - 0
examples/gl_interop/gl_interop.c

@@ -26,6 +26,8 @@
 
 #include <starpu.h>
 #include <unistd.h>
+
+#if !(defined(STARPU_USE_CUDA) && defined(STARPU_OPENGL_RENDER))
 #include <GL/glut.h>
 
 void dummy(void *buffers[], void *cl_arg)
@@ -72,6 +74,7 @@ void callback_func(void *foo) {
 	/* Tell it was already the last submitted task */
 	starpu_drivers_request_termination();
 }
+#endif
 
 int main(int argc, char **argv)
 {