summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ecf2f7a)
raw | patch | inline | side by side (parent: ecf2f7a)
author | Alibek Omarov <a1ba.omarov@gmail.com> | |
Sun, 22 Mar 2015 15:46:24 +0000 (21:46 +0600) | ||
committer | Alibek Omarov <a1ba.omarov@gmail.com> | |
Sun, 22 Mar 2015 15:46:24 +0000 (21:46 +0600) |
nanogl.cpp | patch | blob | history |
diff --git a/nanogl.cpp b/nanogl.cpp
index 823851fcae9117a6fcd0c8b94b2c605400565a10..c16a7a0f1f103acee3b39442752cfce2636f3999 100644 (file)
--- a/nanogl.cpp
+++ b/nanogl.cpp
#include <dlfcn.h>
//#include <cutils/log.h>
-#include <android/log.h>
#include "nanogl.h"
#include "glesinterface.h"
#include "gl.h"
-#define LOG __android_log_print
+
#define DEBUG_NANO 0
+#ifdef __ANDROID__
+#include <android/log.h>
+#define LOG __android_log_print
+
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
#define LOGD(...) if (DEBUG_NANO) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__)
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG,__VA_ARGS__)
#define LOGW(...) __android_log_print(ANDROID_LOG_WARN, LOG_TAG,__VA_ARGS__)
+#else
+
+#define LOGI(...) printf("I: "__VA_ARGS__)
+#define LOGD(...) if(DEBUG_NANO) printf("D: "__VA_ARGS__)
+#define LOGE(...) printf("E: "__VA_ARGS__)
+#define LOGW(...) printf("W: "__VA_ARGS__)
+
+#endif
+
#define GL_ENTRY(_r, _api, ...) #_api,