blob: 65a315a8f67731a1b74f53519fba82d015d1bc6b [file] [log] [blame]
Guido van Rossumc6360141990-10-13 19:23:40 +00001# Constants defined in <gl.h>
2
3#**************************************************************************
4#* *
5#* Copyright (C) 1984, Silicon Graphics, Inc. *
6#* *
7#* These coded instructions, statements, and computer programs contain *
8#* unpublished proprietary information of Silicon Graphics, Inc., and *
9#* are protected by Federal copyright law. They may not be disclosed *
10#* to third parties or copied or duplicated in any form, in whole or *
11#* in part, without the prior written consent of Silicon Graphics, Inc. *
12#* *
13#**************************************************************************
14
15# Graphics Libary constants
16
17# Booleans
18TRUE = 1
19FALSE = 0
20
21# maximum X and Y screen coordinates
22XMAXSCREEN = 1279
23YMAXSCREEN = 1023
24XMAXMEDIUM = 1023 # max for medium res monitor
25YMAXMEDIUM = 767
26XMAX170 = 645 # max for RS-170
27YMAX170 = 484
28XMAXPAL = 779 # max for PAL
29YMAXPAL = 574
30
31# various hardware/software limits
32ATTRIBSTACKDEPTH = 10
33VPSTACKDEPTH = 8
34MATRIXSTACKDEPTH = 32
35NAMESTACKDEPTH = 1025
36STARTTAG = -2
37ENDTAG = -3
38CPOSX_INVALID = -(2*XMAXSCREEN)
39
40# names for colors in color map loaded by greset
41BLACK = 0
42RED = 1
43GREEN = 2
44YELLOW = 3
45BLUE = 4
46MAGENTA = 5
47CYAN = 6
48WHITE = 7
49
50# popup colors
51PUP_CLEAR = 0
52PUP_COLOR = 1
53PUP_BLACK = 2
54PUP_WHITE = 3
55
56# defines for drawmode
57NORMALDRAW = 0
58PUPDRAW = 1
59OVERDRAW = 2
60UNDERDRAW = 3
61CURSORDRAW = 4
62
63# defines for defpattern
64PATTERN_16 = 16
65PATTERN_32 = 32
66PATTERN_64 = 64
67
68PATTERN_16_SIZE = 16
69PATTERN_32_SIZE = 64
70PATTERN_64_SIZE = 256
71
72# defines for readsource
73SRC_AUTO = 0
74SRC_FRONT = 1
75SRC_BACK = 2
76SRC_ZBUFFER = 3
77SRC_PUP = 4
78SRC_OVER = 5
79SRC_UNDER = 6
80SRC_FRAMEGRABBER = 7
81
82# defines for blendfunction
83BF_ZERO = 0
84BF_ONE = 1
85BF_DC = 2
86BF_SC = 2
87BF_MDC = 3
88BF_MSC = 3
89BF_SA = 4
90BF_MSA = 5
91BF_DA = 6
92BF_MDA = 7
93
94# defines for zfunction
95ZF_NEVER = 0
96ZF_LESS = 1
97ZF_EQUAL = 2
98ZF_LEQUAL = 3
99ZF_GREATER = 4
100ZF_NOTEQUAL = 5
101ZF_GEQUAL = 6
102ZF_ALWAYS = 7
103
104# defines for zsource
105ZSRC_DEPTH = 0
106ZSRC_COLOR = 1
107
108# defines for pntsmooth
109SMP_OFF = 0
110SMP_ON = 1
111
112# defines for linesmooth
113SML_OFF = 0
114SML_ON = 1
115
116# defines for setpup
117PUP_NONE = 0
118PUP_GREY = 1
119
120# defines for glcompat
121GLC_OLDPOLYGON = 0
122GLC_ZRANGEMAP = 1
123
124# defines for curstype
125C16X1 = 0
126C16X2 = 1
127C32X1 = 2
128C32X2 = 3
129CCROSS = 4
130
131# defines for shademodel
132FLAT = 0
133GOURAUD = 1
134
135# defines for logicop
Guido van Rossum9ddba3e1991-04-07 13:33:03 +0000136LO_ZERO = 0x0
137LO_AND = 0x1
138LO_ANDR = 0x2
139LO_SRC = 0x3
140LO_ANDI = 0x4
141LO_DST = 0x5
142LO_XOR = 0x6
143LO_OR = 0x7
144LO_NOR = 0x8
145LO_XNOR = 0x9
146LO_NDST = 0xa
147LO_ORR = 0xb
148LO_NSRC = 0xc
149LO_ORI = 0xd
150LO_NAND = 0xe
151LO_ONE = 0xf
Guido van Rossumc6360141990-10-13 19:23:40 +0000152
Guido van Rossumf109f861991-11-12 15:34:54 +0000153# defines for pixmode
154PM_SHIFT = 0
155PM_EXPAND = 1
156PM_C0 = 2
157PM_C1 = 3
158PM_ADD24 = 4
159PM_SIZE = 5
160PM_OFFSET = 6
161PM_STRIDE = 7
162PM_TTOB = 8
163PM_RTOL = 9
164PM_ZDATA = 10
165PM_WARP = 11
166PM_RDX = 12
167PM_RDY = 13
168PM_CDX = 14
169PM_CDY = 15
170PM_XSTART = 16
171PM_YSTART = 17
172PM_VO1 = 1000 # internal use only
173
Guido van Rossumc6360141990-10-13 19:23:40 +0000174
175#
176# START defines for getgdesc
177#
178
179GD_XPMAX = 0
180GD_YPMAX = 1
181GD_XMMAX = 2
182GD_YMMAX = 3
183GD_ZMIN = 4
184GD_ZMAX = 5
185GD_BITS_NORM_SNG_RED = 6
186GD_BITS_NORM_SNG_GREEN = 7
187GD_BITS_NORM_SNG_BLUE = 8
188GD_BITS_NORM_DBL_RED = 9
189GD_BITS_NORM_DBL_GREEN = 10
190GD_BITS_NORM_DBL_BLUE = 11
191GD_BITS_NORM_SNG_CMODE = 12
192GD_BITS_NORM_DBL_CMODE = 13
193GD_BITS_NORM_SNG_MMAP = 14
194GD_BITS_NORM_DBL_MMAP = 15
195GD_BITS_NORM_ZBUFFER = 16
196GD_BITS_OVER_SNG_CMODE = 17
197GD_BITS_UNDR_SNG_CMODE = 18
198GD_BITS_PUP_SNG_CMODE = 19
199GD_BITS_NORM_SNG_ALPHA = 21
200GD_BITS_NORM_DBL_ALPHA = 22
201GD_BITS_CURSOR = 23
202GD_OVERUNDER_SHARED = 24
203GD_BLEND = 25
204GD_CIFRACT = 26
205GD_CROSSHAIR_CINDEX = 27
206GD_DITHER = 28
207GD_LINESMOOTH_CMODE = 30
208GD_LINESMOOTH_RGB = 31
209GD_LOGICOP = 33
210GD_NSCRNS = 35
211GD_NURBS_ORDER = 36
212GD_NBLINKS = 37
213GD_NVERTEX_POLY = 39
214GD_PATSIZE_64 = 40
215GD_PNTSMOOTH_CMODE = 41
216GD_PNTSMOOTH_RGB = 42
217GD_PUP_TO_OVERUNDER = 43
218GD_READSOURCE = 44
219GD_READSOURCE_ZBUFFER = 48
220GD_STEREO = 50
221GD_SUBPIXEL_LINE = 51
222GD_SUBPIXEL_PNT = 52
223GD_SUBPIXEL_POLY = 53
224GD_TRIMCURVE_ORDER = 54
225GD_WSYS = 55
226GD_ZDRAW_GEOM = 57
227GD_ZDRAW_PIXELS = 58
228GD_SCRNTYPE = 61
229GD_TEXTPORT = 62
230GD_NMMAPS = 63
231GD_FRAMEGRABBER = 64
232GD_TIMERHZ = 66
233GD_DBBOX = 67
234GD_AFUNCTION = 68
235GD_ALPHA_OVERUNDER = 69
236GD_BITS_ACBUF = 70
237GD_BITS_ACBUF_HW = 71
238GD_BITS_STENCIL = 72
239GD_CLIPPLANES = 73
240GD_FOGVERTEX = 74
241GD_LIGHTING_TWOSIDE = 76
242GD_POLYMODE = 77
243GD_POLYSMOOTH = 78
244GD_SCRBOX = 79
245GD_TEXTURE = 80
246
247# return value for inquiries when there is no limit
248GD_NOLIMIT = 2
249
250# return values for GD_WSYS
251GD_WSYS_NONE = 0
252GD_WSYS_4S = 1
253
254# return values for GD_SCRNTYPE
255GD_SCRNTYPE_WM = 0
256GD_SCRNTYPE_NOWM = 1
257
258#
259# END defines for getgdesc
260#
261
262
263#
264# START NURBS interface definitions
265#
266
267# NURBS Rendering Properties
268N_PIXEL_TOLERANCE = 1
269N_CULLING = 2
270N_DISPLAY = 3
271N_ERRORCHECKING = 4
272N_SUBDIVISIONS = 5
273N_S_STEPS = 6
274N_T_STEPS = 7
275N_TILES = 8
276
277N_SHADED = 1.0
278
279# ---------------------------------------------------------------------------
280# FLAGS FOR NURBS SURFACES AND CURVES
281#
282# Bit: 9876 5432 1 0
283# |tttt|nnnn|f|r| : r - 1 bit = 1 if rational coordinate exists
284# : f - 1 bit = 1 if rational coordinate is before rest
285# : = 0 if rational coordinate is after rest
286# : nnnn - 4 bits for number of coordinates
287# : tttt - 4 bits for type of data (color, position, etc.)
288#
289# NURBS data type
290# N_T_ST 0 parametric space data
291# N_T_XYZ 1 model space data
292#
293# rational or non-rational data and position in memory
294# N_NONRATIONAL 0 non-rational data
295# N_RATAFTER 1 rational data with rat coord after rest
296# N_RATBEFORE 3 rational data with rat coord before rest
297#
298# N_MKFLAG(a,b,c) ((a<<6) | (b<<2) | c)
299#
300# ---------------------------------------------------------------------------
301#
302N_ST = 0x8 # N_MKFLAG( N_T_ST, 2, N_NONRATIONAL )
303N_STW = 0xd # N_MKFLAG( N_T_ST, 3, N_RATAFTER )
304N_WST = 0xf # N_MKFLAG( N_T_ST, 3, N_RATBEFORE )
305N_XYZ = 0x4c # N_MKFLAG( N_T_XYZ, 3, N_NONRATIONAL )
306N_XYZW = 0x51 # N_MKFLAG( N_T_XYZ, 4, N_RATAFTER )
307N_WXYZ = 0x53 # N_MKFLAG( N_T_XYZ, 4, N_RATBEFORE )
308
309#
310# END NURBS interface definitions
311#
312
313
314#
315# START lighting model defines
316#
317
318LMNULL = 0.0
319
320# MATRIX modes
321MSINGLE = 0
322MPROJECTION = 1
323MVIEWING = 2
324
325# LIGHT constants
326MAXLIGHTS = 8
327MAXRESTRICTIONS = 4
328
329# MATERIAL properties
330DEFMATERIAL = 0
331EMISSION = 1
332AMBIENT = 2
333DIFFUSE = 3
334SPECULAR = 4
335SHININESS = 5
336COLORINDEXES = 6
337ALPHA = 7
338
339# LIGHT properties
340DEFLIGHT = 100
341LCOLOR = 101
342POSITION = 102
343
344# LIGHTINGMODEL properties
345DEFLMODEL = 200
346LOCALVIEWER = 201
347ATTENUATION = 202
348
349# TARGET constants
350MATERIAL = 1000
351LIGHT0 = 1100
352LIGHT1 = 1101
353LIGHT2 = 1102
354LIGHT3 = 1103
355LIGHT4 = 1104
356LIGHT5 = 1105
357LIGHT6 = 1106
358LIGHT7 = 1107
359LMODEL = 1200
360
361# lmcolor modes
362LMC_COLOR = 0
363LMC_EMISSION = 1
364LMC_AMBIENT = 2
365LMC_DIFFUSE = 3
366LMC_SPECULAR = 4
367LMC_AD = 5
368LMC_NULL = 6
369
370#
371# END lighting model defines
372#
373
374
375#
376# START distributed graphics library defines
377#
378
379DGLSINK = 0 # sink connection
380DGLLOCAL = 1 # local connection
381DGLTSOCKET = 2 # tcp socket connection
382DGL4DDN = 3 # 4DDN (DECnet)
383
384#
385# END distributed graphics library defines
386#