NVidia Gameworks
  • Main Page
  • Classes
  • Files
  • File List
  • File Members

NvLogs.h

Go to the documentation of this file.
00001 // TAGRELEASE: PUBLIC
00002 
00003 #ifndef NV_LOGS_H
00004 #define NV_LOGS_H
00005 
00006 #include <NvFoundation.h>
00007 
00013 
00014 #define  LOG_TAG    "NVSDK"
00015 
00016 #ifdef _WIN32
00017 
00018 #include <stdio.h>
00019 
00020 extern void NVWindowsLog(const char* fmt, ...);
00021 
00022 #define LOGI(...) { NVWindowsLog(__VA_ARGS__); }
00023 #define LOGE(...) { NVWindowsLog(__VA_ARGS__); }
00024 
00025 #elif ANDROID
00026 
00027 #include <stdlib.h> // for exit()
00028 #include <android/log.h>
00029 
00030 #define  LOGI(...)  __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
00031 #define  LOGE(...)  { __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__); }
00032 
00033 #elif defined(LINUX) || defined(MACOSX)
00034 
00035 #include <stdlib.h> // for exit()
00036 #include <stdio.h>
00037 
00038 #define LOGI(...) { fprintf(stderr, __VA_ARGS__); fprintf(stderr, "\n"); }
00039 #define LOGE(...) { fprintf(stderr, __VA_ARGS__); fprintf(stderr, "\n"); }
00040 
00041 #else
00042 
00043 #error "No supported platform specified for NvLogs.h"
00044 
00045 #endif
00046 
00047 void checkGLError(const char* file, int32_t line);
00048 
00049 #ifndef CHECK_GL_ERROR
00050 #define CHECK_GL_ERROR() checkGLError(__FILE__, __LINE__)
00051 #endif
00052 #endif
Generated on Sat Mar 8 14:58:35 2014 for NVIDIA GameWorks OpenGL App Framework and Libraries by Doxygen
©2014 NVIDIA Corporation.