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

Last change on this file since 2798 was 2798, checked in by ldelgass, 8 years ago

Add emacs mode magic line in preparation for indentation cleanup

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