source: trunk/packages/vizservers/nanovis/Trace.h @ 1991

Last change on this file since 1991 was 1991, checked in by gah, 9 years ago

Clean up debugging/printing traces

File size: 813 bytes
Line 
1#ifndef __TRACE_H__
2#define __TRACE_H__
3
4#include <GL/glew.h>
5#include <GL/glut.h>
6#include <syslog.h>
7
8#define MAKE_STRING(x) #x
9#define NEWSTRING(x) MAKE_STRING(x)
10#define AT __FILE__ ":" NEWSTRING(__LINE__)
11
12extern void LogMessage(int priority, const char *fileName, int lineNum,
13                         const char* format, ...);
14
15#define ERROR(...)      LogMessage(LOG_ERR, __FILE__, __LINE__, __VA_ARGS__)
16#ifdef WANT_TRACE
17#define TRACE(...)      LogMessage(LOG_DEBUG, __FILE__, __LINE__, __VA_ARGS__)
18#else
19#define TRACE(...)
20#endif
21#define WARN(...)       LogMessage(LOG_WARNING, __FILE__, __LINE__, __VA_ARGS__)
22#define INFO(...)       LogMessage(LOG_INFO, __FILE__, __LINE__, __VA_ARGS__)
23
24
25extern bool CheckFBO(GLenum *statusPtr);
26extern void PrintFBOStatus(GLenum status, const char *prefix);
27extern bool CheckGL(const char *prefix);
28#endif
Note: See TracBrowser for help on using the repository browser.