]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/commitdiff
Use OpenGL enabling macro
authorJiri Hubacek <hubacji1@fel.cvut.cz>
Mon, 1 Oct 2018 08:50:34 +0000 (10:50 +0200)
committerJiri Hubacek <hubacji1@fel.cvut.cz>
Mon, 1 Oct 2018 08:50:34 +0000 (10:50 +0200)
base/main.cc

index 5f44cc77142168728402161992867d6fe5e6cbdf..1bcd55839b972c1b186f02dc450aaf002aa86c4f 100644 (file)
@@ -26,6 +26,7 @@ along with I am car. If not, see <http://www.gnu.org/licenses/>.
 #include <GL/glu.h>
 #include <SDL2/SDL.h>
 
+#define USE_GL
 #define USE_INTERRUPT
 
 bool run_planner = true;
@@ -43,7 +44,9 @@ void hint(int)
 
 int main()
 {
+#ifdef USE_GL
         init();
+#endif
 
         Json::Value jvi; // JSON input
         Json::Value jvo; // JSON output
@@ -96,7 +99,9 @@ int main()
         while (run_planner) {
                 p.next();
                 p.tend();
+#ifdef USE_GL
                 p.glplot();
+#endif
         }
         if (!p.goal_found()) {
 #if NNVERSION > 1
@@ -205,8 +210,10 @@ int main()
         // print output
         std::cout << jvo << std::endl;
 
+#ifdef USE_GL
         SDL_DestroyWindow(gw);
         SDL_Quit();
+#endif
 
         // free mem
         for (auto o: so) {