summaryrefslogtreecommitdiff
path: root/cad/plugins/NanoVision-1/src/Plugins/RenderingEngines/OpenGL/GLT/glt_config.h
blob: 49fc4e60824dda5223ff758aab9ab9919f9393d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
#ifndef GLT_CONFIG_H
#define GLT_CONFIG_H

/*

  GLT OpenGL C++ Toolkit 
  Copyright (C) 2000-2002 Nigel Stewart
  Email: nigels@nigels.com   WWW: http://www.nigels.com/glt/

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*/

/*! \file 
    \brief GLT Configuration File
    \ingroup GLT
    
    $Id: config.h,v 1.23 2002/10/07 16:27:46 nigels Exp $
    
    $Log: config.h,v $
    Revision 1.23  2002/10/07 16:27:46  nigels
    Added CVS version control info

    Revision 1.22  2002/10/07 16:16:36  nigels
    Mark GLT for "gamma" (nearly 0.7) release version

    Revision 1.21  2002/10/07 16:13:35  nigels
    *** empty log message ***

*/

#if defined(__APPLE__)
#include <OpenGL/gl.h>
#else
#include <GL/gl.h>
#endif

/// GLT Version string
#define GLT_VERSION_STRING "0.7-gamma"

// 
// General config options
//

// #define GLT_FAST_FLOAT				// Optional faster math

//
// Windows Config
//

#if defined(WIN32) || defined(__BORLANDC__)

#define GLT_WIN32
#define GLT_LITTLE_ENDIAN

#pragma comment(lib, "opengl32.lib")  // Link against OpenGL library
#pragma comment(lib, "glu32.lib")     // Link against GLU library 
#pragma comment(lib, "glt.lib")		  // GLT Library     
#pragma comment(lib, "glutm.lib")     // GlutMaster Library
#pragma comment(lib, "math.lib")      // GLT Math Library
#pragma comment(lib, "node.lib")      // GLT Node Library
#pragma comment(lib, "fonts.lib")     // GLT Fonts Library
#pragma comment(lib, "mesh.lib")      // GLT Mesh Library
#pragma comment(lib, "misc.lib")      // GLT Misc Library

#endif

//
// Intel/Windows Cygwin Config
//

#if defined(__CYGWIN__) 
#define GLT_UNIX
#define GLT_LITTLE_ENDIAN
#endif

//
// Intel Linux Config
//

#if defined(linux) && defined(i386)
#define GLT_UNIX
#define GLT_LITTLE_ENDIAN
#endif

//
// iMac OSX Config
//

#if defined(__APPLE__)
#define GLT_UNIX
#define GLT_DARWIN

#if defined(__ppc__)
#define GLT_BIG_ENDIAN
#else
#define GLT_LITTLE_ENDIAN
#endif

#endif

//
// SGI Config
//

#if defined(sgi)
#define GLT_UNIX
#define GLT_SGI
#define GLT_BIG_ENDIAN
#endif

//
// Generic Unix Config
//

#if defined(__UNIX__)
#define GLT_UNIX
#endif

#if !defined(GLT_WIN32) && !defined(GLT_UNIX)
#error Target not detected, Win32 or Unix.
#endif

#if !defined(GLT_LITTLE_ENDIAN) && !defined(GLT_BIG_ENDIAN)
#error Little-endian (Intel) or Big-endian (Motorolla or Sparc) is not known.
#endif

/// 8 bit unsigned char
typedef unsigned char  byte;		

/// 16 bit unsigned integer
typedef unsigned short uint16;

/// 32 bit unsigned integer
typedef unsigned int   uint32;

/// 16 bit signed integer
typedef signed short   int16;

/// 32 bit signed integer
typedef signed int     int32;

#ifndef GLT_FAST_FLOAT
/// GLT real can be float or double
typedef GLdouble         real;
#define GLT_DOUBLE_PRECISION
#else
/// GLT real can be float or double
typedef GLfloat          real;
#define GLT_SINGLE_PRECISION
#endif

#ifndef NULL
/// NULL pointer
#define NULL (0)
#endif

#endif