author | Radek Brich <radek.brich@devl.cz> |
Sat, 08 Dec 2007 14:07:42 +0100 | |
branch | pyrit |
changeset 29 | 574c34441a1c |
parent 22 | 76b7bd51d64a |
child 30 | 33f95441790e |
permissions | -rw-r--r-- |
15
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
1 |
#ifndef COMMON_H |
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
2 |
#define COMMON_H |
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
3 |
|
20
f22952603f29
new C++ demo: realtime.cc (real-time scene viewer using SDL)
Radek Brich <radek.brich@devl.cz>
parents:
15
diff
changeset
|
4 |
#include <stdio.h> |
f22952603f29
new C++ demo: realtime.cc (real-time scene viewer using SDL)
Radek Brich <radek.brich@devl.cz>
parents:
15
diff
changeset
|
5 |
#include <stdarg.h> |
15
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
6 |
#include <float.h> |
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
7 |
|
22 | 8 |
#ifdef PYRIT_DOUBLE |
9 |
# define Float double |
|
10 |
# define Eps DBL_EPSILON |
|
11 |
# define Inf DBL_MAX |
|
12 |
#else |
|
13 |
# define Float float |
|
14 |
# define Eps 1e-6 |
|
15 |
# define Inf FLT_MAX |
|
16 |
#endif |
|
15
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
17 |
|
20
f22952603f29
new C++ demo: realtime.cc (real-time scene viewer using SDL)
Radek Brich <radek.brich@devl.cz>
parents:
15
diff
changeset
|
18 |
inline void infomsg(const char *format, ...) |
f22952603f29
new C++ demo: realtime.cc (real-time scene viewer using SDL)
Radek Brich <radek.brich@devl.cz>
parents:
15
diff
changeset
|
19 |
{ |
22 | 20 |
#ifndef PYRIT_QUIET |
20
f22952603f29
new C++ demo: realtime.cc (real-time scene viewer using SDL)
Radek Brich <radek.brich@devl.cz>
parents:
15
diff
changeset
|
21 |
va_list ap; |
f22952603f29
new C++ demo: realtime.cc (real-time scene viewer using SDL)
Radek Brich <radek.brich@devl.cz>
parents:
15
diff
changeset
|
22 |
va_start(ap, format); |
f22952603f29
new C++ demo: realtime.cc (real-time scene viewer using SDL)
Radek Brich <radek.brich@devl.cz>
parents:
15
diff
changeset
|
23 |
vprintf(format, ap); |
f22952603f29
new C++ demo: realtime.cc (real-time scene viewer using SDL)
Radek Brich <radek.brich@devl.cz>
parents:
15
diff
changeset
|
24 |
va_end(ap); |
15
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
25 |
#endif |
20
f22952603f29
new C++ demo: realtime.cc (real-time scene viewer using SDL)
Radek Brich <radek.brich@devl.cz>
parents:
15
diff
changeset
|
26 |
} |
f22952603f29
new C++ demo: realtime.cc (real-time scene viewer using SDL)
Radek Brich <radek.brich@devl.cz>
parents:
15
diff
changeset
|
27 |
|
f22952603f29
new C++ demo: realtime.cc (real-time scene viewer using SDL)
Radek Brich <radek.brich@devl.cz>
parents:
15
diff
changeset
|
28 |
#endif |