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

Last change on this file since 2861 was 2841, checked in by ldelgass, 12 years ago

Misc. cleanups. Make libs look in nanovis src dir for includes, so that libs
can use Trace.h. Trace.h now includes config.h, so the WANT_TRACE define can
be placed there. The Makefile now has the flag for enabling the pointset
code, since it also switches which objects are compiled.

  • 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 <syslog.h>
7
8#include "config.h"
9
10#define MAKE_STRING(x) #x
11#define NEWSTRING(x) MAKE_STRING(x)
12#define AT __FILE__ ":" NEWSTRING(__LINE__)
13
14extern void LogMessage(int priority, const char *fileName, int lineNum,
15                         const char* format, ...);
16
17#define ERROR(...)      LogMessage(LOG_ERR, __FILE__, __LINE__, __VA_ARGS__)
18#ifdef WANT_TRACE
19#define TRACE(...)      LogMessage(LOG_DEBUG, __FILE__, __LINE__, __VA_ARGS__)
20#else
21#define TRACE(...)
22#endif
23#define WARN(...)       LogMessage(LOG_WARNING, __FILE__, __LINE__, __VA_ARGS__)
24#define INFO(...)       LogMessage(LOG_INFO, __FILE__, __LINE__, __VA_ARGS__)
25
26
27extern bool CheckFBO(GLenum *statusPtr);
28extern void PrintFBOStatus(GLenum status, const char *prefix);
29extern bool CheckGL(const char *prefix);
30#endif
Note: See TracBrowser for help on using the repository browser.