]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/commitdiff
Fix missing USE_GL macro usage
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Mon, 1 Apr 2019 05:14:29 +0000 (07:14 +0200)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Mon, 1 Apr 2019 05:14:29 +0000 (07:14 +0200)
base/main.cc
base/rrtbase.cc

index 3ae89299acd438532b954001260e05f1184be462..64532824b0d0fa134e5243001103b878433dca37 100644 (file)
@@ -26,10 +26,13 @@ along with I am car. If not, see <http://www.gnu.org/licenses/>.
 #include "obstacle.h"
 #include "rrtplanner.h"
 #include "slotplanner.h"
+
+#if USE_GL > 0
 // OpenGL
 #include <GL/gl.h>
 #include <GL/glu.h>
 #include <SDL2/SDL.h>
+#endif
 
 // debug
 //#define JSONLOGEDGES
@@ -75,11 +78,13 @@ void TPRINT(const char *what) {
 
 bool run_planner = true;
 
+#if USE_GL > 0
 SDL_Window* gw = NULL;
 SDL_GLContext gc;
 
 bool init();
 bool initGL();
+#endif
 
 void hint(int)
 {
index ad60cc550d52c73c109f44099f85b2fd6e582ef2..1513b2bccf19a67e5bb3113f8d932cb2843882c2 100644 (file)
@@ -21,10 +21,14 @@ along with I am car. If not, see <http://www.gnu.org/licenses/>.
 #include <queue>
 #include "bcar.h"
 #include "rrtbase.h"
+
+#if USE_GL > 0
 // OpenGL
 #include <GL/gl.h>
 #include <GL/glu.h>
 #include <SDL2/SDL.h>
+#endif
+
 // RRT
 #include "sample.h"
 #include "cost.h"
@@ -32,8 +36,10 @@ along with I am car. If not, see <http://www.gnu.org/licenses/>.
 #include "nn.h"
 #include "nv.h"
 
+#if USE_GL > 0
 extern SDL_Window* gw;
 extern SDL_GLContext gc;
+#endif
 
 Cell::Cell()
 {