author | Claus Gittinger <cg@exept.de> |
Sat, 11 Nov 1995 16:54:10 +0100 | |
changeset 219 | 9ff0660f447f |
parent 218 | 10072d9beba5 |
child 268 | 070f61898aab |
permissions | -rw-r--r-- |
0 | 1 |
" |
2 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
77 | 3 |
All Rights Reserved |
0 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
XWorkstation subclass:#GLXWorkstation |
|
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
14 |
instanceVariableNames:'activeWindow hasStereoExtension glOK' |
0 | 15 |
classVariableNames: '' |
16 |
poolDictionaries:'' |
|
17 |
category:'Interface-Graphics' |
|
18 |
! |
|
19 |
||
77 | 20 |
!GLXWorkstation class methodsFor:'documentation'! |
21 |
||
22 |
copyright |
|
23 |
" |
|
24 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
25 |
All Rights Reserved |
|
26 |
||
27 |
This software is furnished under a license and may be used |
|
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
34 |
! |
|
35 |
||
36 |
version |
|
219
9ff0660f447f
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
37 |
^ '$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.37 1995-11-11 15:50:46 cg Exp $' |
77 | 38 |
! |
39 |
||
40 |
documentation |
|
41 |
" |
|
42 |
this class was originally written as a demo on how an interface to |
|
43 |
a c graphics library could be implemented. In the mean time, it has become |
|
44 |
quite complete ... |
|
45 |
||
46 |
It provides an interface to either a real GL (on SGI workstations) |
|
47 |
or a simulated VGL (i.e. GL-light; low nicotine). |
|
48 |
The GL simulation is derived from the PD vogl library, with slight |
|
49 |
modifictions to support multiple GL views. |
|
50 |
||
51 |
Most of the hard work was done by Jeff (thanks indeed) ... |
|
52 |
||
53 |
||
54 |
Some notes: |
|
55 |
||
56 |
I do not really know what most of these functions do - for more |
|
57 |
detail, see the GL man pages (on SGI) or the doc provided with VGL. |
|
58 |
||
59 |
The interface offered here provides a very very low level (i.e one-to-one) |
|
60 |
interface to GL functions. More high-level stuff is required, to make |
|
61 |
3D drawing be more object-oriented. |
|
62 |
(see a bit of this in 'clients/IRIS-specials') |
|
63 |
||
64 |
Some functions are duplicated, Jeff and I developed those in parallel - |
|
89 | 65 |
for now, both will remain - finally they will be merged and duplicates removed ... |
66 |
(examples are makeobj and makeObject). |
|
77 | 67 |
|
68 |
Also, in a hurry to implement all those methods, many do no or only |
|
69 |
limited argument checking - make certain, that you pass the correct |
|
70 |
arguments. |
|
71 |
||
72 |
There might be some confusion in the v3[sifd] functions: basically they |
|
73 |
all do the same, and could be mapped onto one st-method (such as vertex3). |
|
74 |
However, the C-functions expect different argument types - I dont know if |
|
75 |
one or another of these functions suffers from any performance penalties. |
|
76 |
Therefore, I leave the direct 1-to-1 mapping; GL experts might know more |
|
77 |
about this (I use v3f in all of my code). |
|
78 |
||
79 |
written june 93 by claus |
|
80 |
VGL stuff dec 93 |
|
81 |
many many additions jan 94 by Jeff McAffer <jeff@is.s.u-tokyo.ac.jp> |
|
82 |
||
83 |
Since this is a demo (consider it a free add-on goody) there is |
|
84 |
*** NO WARRANTY ** for this. |
|
85 |
||
86 |
Notice: this should be rewritten to use the openGL library functions |
|
157 | 87 |
(actually, to not loose the VGL interface, another OpenGLWorkstation |
88 |
class should be written) |
|
77 | 89 |
" |
90 |
! ! |
|
91 |
||
89 | 92 |
!GLXWorkstation primitiveDefinitions! |
77 | 93 |
|
0 | 94 |
%{ |
24 | 95 |
/* |
96 |
* on SGI, this class is compiled with -DGLX, while |
|
29 | 97 |
* for simulation (using vogl), this is compiled with -DVGL |
24 | 98 |
*/ |
29 | 99 |
|
0 | 100 |
/* |
46 | 101 |
* define this to enable: |
102 |
* blendcolor getgconfig getmultisample leftbuffer rightbuffer monobuffer |
|
103 |
* msalpha msmask mspattern mssize multisample stereobuffer |
|
104 |
* t3s t3i t3f t3d t4s t4i t4f t4d tlutbind zbsize |
|
105 |
* |
|
106 |
* these are not available on all gl's |
|
107 |
*/ |
|
108 |
||
109 |
/* #define FULL_GLX */ |
|
110 |
||
111 |
/* |
|
0 | 112 |
* this is stupid, GLX defines String, which is also defined here ... |
113 |
*/ |
|
29 | 114 |
# define String GLX_String |
24 | 115 |
|
168 | 116 |
#include <stdio.h> |
117 |
||
24 | 118 |
#ifdef GLX |
0 | 119 |
# include <gl/glws.h> |
12 | 120 |
# include <gl/sphere.h> |
24 | 121 |
#else |
82 | 122 |
# undef memset |
24 | 123 |
# include <vogl.h> |
157 | 124 |
# undef move |
24 | 125 |
# include <X11/Xlib.h> |
126 |
#endif |
|
0 | 127 |
|
185 | 128 |
/* |
129 |
* XSGIStereo extension - if available |
|
130 |
*/ |
|
131 |
#ifdef XSGIStereo |
|
132 |
# include <X11/extensions/SGIStereo.h> |
|
133 |
#endif |
|
134 |
||
35 | 135 |
#ifndef NULL |
58 | 136 |
# define NULL (char *)0 /* sigh */ |
35 | 137 |
#endif |
138 |
||
0 | 139 |
typedef enum { |
140 |
GLXcolorIndexSingleBuffer, |
|
141 |
GLXcolorIndexDoubleBuffer, |
|
142 |
GLXrgbSingleBuffer, |
|
143 |
GLXrgbDoubleBuffer |
|
144 |
} GLXWindowType; |
|
145 |
||
151 | 146 |
/* |
30 | 147 |
extern Window GLXCreateWindow(); |
151 | 148 |
*/ |
24 | 149 |
|
134 | 150 |
#ifdef THISCONTEXT_IN_REGISTER |
151 |
extern OBJ __thisContext__; |
|
151 | 152 |
# define ENTERGLX __thisContext__ = __thisContext |
158 | 153 |
# define LEAVEGLX __thisContext = __thisContext__; __thisContext__ = 0; |
134 | 154 |
#else |
155 |
# define ENTERGLX /* nothing */ |
|
156 |
# define LEAVEGLX /* nothing */ |
|
157 |
#endif |
|
158 |
||
0 | 159 |
#undef String |
160 |
||
161 |
/* |
|
162 |
* some defines - tired of typing ... |
|
29 | 163 |
* most of these macros/functions extract values from smalltalk objects and |
164 |
* put/pack them into corresponding c variables. |
|
165 |
* |
|
0 | 166 |
*/ |
207
9124817bbb03
use new c-pointer wrapper macros (based on externalAddress)
Claus Gittinger <cg@exept.de>
parents:
206
diff
changeset
|
167 |
#define myDpy (Display *)(__MKCP(_INST(displayId))) |
9124817bbb03
use new c-pointer wrapper macros (based on externalAddress)
Claus Gittinger <cg@exept.de>
parents:
206
diff
changeset
|
168 |
#define ISCONNECTED (_INST(displayId) != nil) |
9124817bbb03
use new c-pointer wrapper macros (based on externalAddress)
Claus Gittinger <cg@exept.de>
parents:
206
diff
changeset
|
169 |
#define _WindowVal(o) (Window)(__MKCP(o)) |
0 | 170 |
|
157 | 171 |
/* |
172 |
* set the GLXWindow for followup drawing |
|
173 |
*/ |
|
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
174 |
#define SETWIN(aGLXWindowId) \ |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
175 |
if (_INST(activeWindow) != aGLXWindowId) { \ |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
176 |
if (! ISCONNECTED ) { \ |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
177 |
RETURN (false); \ |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
178 |
} \ |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
179 |
if (! __isExternalAddress(aGLXWindowId)) { \ |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
180 |
RETURN (false); \ |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
181 |
} \ |
207
9124817bbb03
use new c-pointer wrapper macros (based on externalAddress)
Claus Gittinger <cg@exept.de>
parents:
206
diff
changeset
|
182 |
if (GLXwinset(myDpy, _WindowVal(aGLXWindowId)) < 0) { \ |
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
183 |
RETURN (false); \ |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
184 |
} \ |
214
5316b1373129
oops - glOk was left undefined
Claus Gittinger <cg@exept.de>
parents:
213
diff
changeset
|
185 |
_INST(activeWindow) = aGLXWindowId; \ |
5316b1373129
oops - glOk was left undefined
Claus Gittinger <cg@exept.de>
parents:
213
diff
changeset
|
186 |
__STORE(self, aGLXWindowId); \ |
5316b1373129
oops - glOk was left undefined
Claus Gittinger <cg@exept.de>
parents:
213
diff
changeset
|
187 |
} else { \ |
5316b1373129
oops - glOk was left undefined
Claus Gittinger <cg@exept.de>
parents:
213
diff
changeset
|
188 |
if (aGLXWindowId == nil) { \ |
5316b1373129
oops - glOk was left undefined
Claus Gittinger <cg@exept.de>
parents:
213
diff
changeset
|
189 |
RETURN (false); \ |
5316b1373129
oops - glOk was left undefined
Claus Gittinger <cg@exept.de>
parents:
213
diff
changeset
|
190 |
} \ |
12 | 191 |
} |
192 |
||
157 | 193 |
#define _MKBOOLEAN(b) ((b==FALSE) ? false : true) |
194 |
#define _booleanVal(b) ((b==false) ? (Boolean)FALSE : (Boolean)TRUE) |
|
195 |
#define _coordVal(c) \ |
|
196 |
((__isFloat(c)) ? (Coord)(_floatVal(c)) \ |
|
185 | 197 |
: (Coord)(__intVal(c))) |
198 |
#define _icoordVal(c) ((Icoord)(__intVal(c))) |
|
199 |
#define _scoordVal(c) ((Scoord)(__intVal(c))) |
|
200 |
#define _screencoordVal(c) ((Screencoord)(__intVal(c))) |
|
201 |
#define _colorindexVal(c) ((Colorindex)(__intVal(c))) |
|
202 |
#define _linestyleVal(l) ((Linestyle)(__intVal(l))) |
|
203 |
#define _shortVal(l) ((short)(__intVal(l))) |
|
204 |
#define _longVal(l) ((long)(__intVal(l))) |
|
205 |
#define _deviceVal(l) ((Device)(__intVal(l))) |
|
206 |
#define _tagVal(l) ((Tag)(__intVal(l))) |
|
207 |
#define _objectVal(l) ((Object)(__intVal(l))) |
|
208 |
#define _offsetVal(l) ((Offset)(__intVal(l))) |
|
209 |
#define _rgbVal(l) ((RGBvalue)(__intVal(l))) |
|
210 |
#define _angleVal(c) ((Angle)(__intVal(c))) |
|
157 | 211 |
|
29 | 212 |
/* |
213 |
* check for and fetch a boolean from ST-arg into C-dst |
|
157 | 214 |
* ST-object must be true or false. Return wth false if invalid. |
29 | 215 |
*/ |
216 |
#define _BOOLEAN_(arg, dst) \ |
|
30 | 217 |
if (arg==true) \ |
77 | 218 |
dst = (Boolean)TRUE; \ |
30 | 219 |
else if (arg==false) \ |
77 | 220 |
dst = (Boolean)FALSE; \ |
29 | 221 |
else { RETURN(false); } |
222 |
||
223 |
/* |
|
224 |
* check for and fetch a coord from ST-arg into C-dst |
|
157 | 225 |
* ST-object must be Float, SmallInteger or Fraction. |
226 |
* Return wth false if invalid. |
|
29 | 227 |
*/ |
0 | 228 |
#define _COORD_(arg, dst) \ |
97 | 229 |
if (__isFloat(arg)) \ |
77 | 230 |
dst = (Coord)(_floatVal(arg)); \ |
97 | 231 |
else if (__isSmallInteger(arg)) \ |
185 | 232 |
dst = (Coord)(__intVal(arg)); \ |
97 | 233 |
else if (__isFraction(arg) \ |
234 |
&& __isSmallInteger(_FractionInstPtr(arg)->f_numerator) \ |
|
235 |
&& __isSmallInteger(_FractionInstPtr(arg)->f_denominator)) { \ |
|
77 | 236 |
float n, d; \ |
237 |
\ |
|
185 | 238 |
n = (float)(__intVal(_FractionInstPtr(arg)->f_numerator)); \ |
239 |
d = (float)(__intVal(_FractionInstPtr(arg)->f_denominator)); \ |
|
77 | 240 |
dst = (Coord)(n / d); \ |
29 | 241 |
} else { RETURN(false); } |
242 |
||
243 |
/* |
|
244 |
* check for and fetch an icoord from ST-arg into C-dst |
|
157 | 245 |
* ST-object must be SmallInteger. Return wth false if invalid. |
29 | 246 |
*/ |
247 |
#define _ICOORD_(arg, dst) \ |
|
97 | 248 |
if (__isSmallInteger(arg)) \ |
185 | 249 |
dst = (Icoord)(__intVal(arg)); \ |
29 | 250 |
else { RETURN(false); } |
251 |
||
252 |
/* |
|
157 | 253 |
* check for and fetch an scoord from ST-arg into C-dst |
254 |
* ST-object must be SmallInteger. Return wth false if invalid. |
|
29 | 255 |
*/ |
256 |
#define _SCOORD_(arg, dst) \ |
|
97 | 257 |
if (__isSmallInteger(arg)) \ |
185 | 258 |
dst = (Scoord)(__intVal(arg)); \ |
29 | 259 |
else { RETURN(false); } |
260 |
||
261 |
#define _SCREENCOORD_(arg, dst) \ |
|
97 | 262 |
if (__isSmallInteger(arg)) \ |
185 | 263 |
dst = (Screencoord)(__intVal(arg)); \ |
29 | 264 |
else { RETURN(false); } |
265 |
||
266 |
#define _COLORINDEX_(arg, dst) \ |
|
97 | 267 |
if (__isSmallInteger(arg)) \ |
185 | 268 |
dst = (Colorindex)(__intVal(arg)); \ |
29 | 269 |
else { RETURN(false); } |
270 |
||
271 |
#define _ANGLE_(arg, dst) \ |
|
97 | 272 |
if (__isSmallInteger(arg)) \ |
185 | 273 |
dst = (Angle)(__intVal(arg)); \ |
29 | 274 |
else { RETURN(false); } |
0 | 275 |
|
276 |
#define _FLOAT_(arg, dst) \ |
|
97 | 277 |
if (__isFloat(arg)) \ |
77 | 278 |
dst = (float)(_floatVal(arg)); \ |
97 | 279 |
else if (__isSmallInteger(arg)) \ |
185 | 280 |
dst = (float)(__intVal(arg)); \ |
97 | 281 |
else if (__isFraction(arg) \ |
282 |
&& __isSmallInteger(_FractionInstPtr(arg)->f_numerator) \ |
|
283 |
&& __isSmallInteger(_FractionInstPtr(arg)->f_denominator)) { \ |
|
77 | 284 |
float n, d; \ |
285 |
\ |
|
185 | 286 |
n = (float)(__intVal(_FractionInstPtr(arg)->f_numerator)); \ |
287 |
d = (float)(__intVal(_FractionInstPtr(arg)->f_denominator)); \ |
|
77 | 288 |
dst = (float)(n / d); \ |
29 | 289 |
} else { RETURN(false); } |
0 | 290 |
|
291 |
#define _INT_(arg, dst) \ |
|
97 | 292 |
if (__isSmallInteger(arg)) \ |
185 | 293 |
dst = (int)(__intVal(arg)); \ |
29 | 294 |
else { RETURN(false); } |
295 |
||
30 | 296 |
#define _indexedArea(object) \ |
297 |
(((char *) (_InstPtr(object))) \ |
|
77 | 298 |
+ OHDR_SIZE \ |
185 | 299 |
+ (__intVal(_ClassInstPtr(__qClass(object))->c_ninstvars)) * sizeof(OBJ)) |
77 | 300 |
%} |
301 |
! ! |
|
302 |
||
168 | 303 |
!GLXWorkstation primitiveVariables! |
304 |
||
305 |
%{ |
|
306 |
/* |
|
307 |
* remembered info from private error handler |
|
308 |
*/ |
|
309 |
static char lastErrorMsg[80] = ""; |
|
310 |
static unsigned lastRequestCode = 0; |
|
311 |
static unsigned lastMinorCode = 0; |
|
312 |
static unsigned lastResource = 0; |
|
313 |
||
314 |
%} |
|
315 |
! ! |
|
316 |
||
89 | 317 |
!GLXWorkstation primitiveFunctions! |
77 | 318 |
|
319 |
%{ |
|
151 | 320 |
|
168 | 321 |
/* |
322 |
* catch X-errors and forward as errorInterrupt:#DisplayError, |
|
323 |
* (which itself invokes my handler and optionally raises an exceptionSignal) |
|
324 |
* the implementation below is somewhat wrong: it will |
|
325 |
* report all errors for Display, even though there could be |
|
326 |
* more than one display connection. (being fixed, new errorInterrupt mechanism |
|
327 |
* allows passing an additional argument, which is the displayID ...) |
|
328 |
* |
|
329 |
* this dublicates the functionality as found in XWorkstation; |
|
330 |
* the reason is to allow dynamic loading systems to load this module |
|
331 |
* before XWorkstation (which was not possible otherwise, due to unresolved |
|
332 |
* external references while loading this one) |
|
333 |
*/ |
|
334 |
static |
|
335 |
__XErrorHandler__(dpy, event) |
|
336 |
Display *dpy; |
|
337 |
XErrorEvent *event; |
|
338 |
{ |
|
339 |
XGetErrorText(dpy, event->error_code, lastErrorMsg, 80); |
|
340 |
if (lastErrorMsg[0] == '\0') { |
|
185 | 341 |
sprintf(lastErrorMsg, "code: %d", event->error_code); |
168 | 342 |
} |
343 |
lastRequestCode = event->request_code; |
|
344 |
lastMinorCode = event->minor_code; |
|
345 |
lastResource = event->resourceid; |
|
346 |
||
218
10072d9beba5
can now turn off Xlib error messages from the errorHandler
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
347 |
if (@global(ErrorPrinting) == true) { |
219
9ff0660f447f
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
348 |
fprintf(stderr, "XWORKSTAT: x-error cought maj=%d (0x%x) min=%d (0x%x) resource=%x\n", |
9ff0660f447f
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
349 |
event->request_code, event->request_code, |
9ff0660f447f
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
350 |
event->minor_code, event->minor_code, event->resourceid); |
9ff0660f447f
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
351 |
fprintf(stderr, "XWORKSTAT: x-error message is '%s'\n", lastErrorMsg); |
218
10072d9beba5
can now turn off Xlib error messages from the errorHandler
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
352 |
} |
168 | 353 |
|
207
9124817bbb03
use new c-pointer wrapper macros (based on externalAddress)
Claus Gittinger <cg@exept.de>
parents:
206
diff
changeset
|
354 |
__errorInterruptWithIDAndParameter__(@symbol(DisplayError), __MKOBJ(dpy)); |
168 | 355 |
return 0; |
356 |
} |
|
357 |
||
151 | 358 |
/* |
359 |
* begin moved from GLXsupport.c |
|
360 |
*/ |
|
361 |
||
362 |
/* |
|
363 |
* GLXsupport.c: |
|
364 |
* |
|
365 |
* This file provides a helper function "GLXCreateWindow", which does |
|
366 |
* all the necessary magic to create an X window suitable for GL drawing |
|
367 |
* to take place within. see the definition of GLXCreateWindow for a |
|
368 |
* description of how to call it. |
|
369 |
* |
|
370 |
* claus: I really had no time to look into all this, |
|
371 |
* this file has been just copied from a 4Dgifts demo .. |
|
372 |
* (will need more than a day to show more ...) |
|
373 |
*/ |
|
374 |
#if defined(GLX) || defined(VGL) |
|
375 |
||
376 |
#include <X11/Xlib.h> |
|
377 |
#include <X11/Xutil.h> |
|
378 |
#ifndef VGL |
|
379 |
# include <gl/glws.h> |
|
380 |
#endif |
|
381 |
#include <signal.h> |
|
382 |
#include <setjmp.h> |
|
383 |
#include "stcIntern.h" |
|
384 |
||
385 |
/* |
|
386 |
* glxhelper.h: |
|
387 |
* |
|
388 |
* List of drawing modes supported by GLXCreateWindow (in glxhelper.c). |
|
389 |
* More than this are possible with mixed model, but this is just an |
|
390 |
* example. You can either expand this list (and the corresponding code in |
|
391 |
* GLXCreateWindow) or call the mixed model calls yourself, using |
|
392 |
* GLXCreateWindow as an example. |
|
393 |
*/ |
|
394 |
||
395 |
static char *typeToName[] = { |
|
396 |
"color index single buffer", |
|
397 |
"color index double buffer", |
|
398 |
"rgb single buffer", |
|
399 |
"rgb double buffer", |
|
400 |
}; |
|
401 |
||
402 |
#ifndef VGL |
|
403 |
/* |
|
404 |
* Dorky little helper function used to build up a GLXconfig array. |
|
405 |
*/ |
|
406 |
||
407 |
static void set_entry (GLXconfig* ptr, int b, int m, int a) |
|
408 |
{ |
|
409 |
ptr->buffer = b; |
|
410 |
ptr->mode = m; |
|
411 |
ptr->arg = a; |
|
412 |
} |
|
413 |
#endif /* VGL */ |
|
414 |
||
415 |
static JMP_BUF errorReturn; |
|
416 |
||
417 |
static void |
|
418 |
glAbort() { |
|
419 |
longjmp(errorReturn, 1); |
|
420 |
} |
|
421 |
||
422 |
/* |
|
423 |
* GLXCreateWindow(dpy, parent, x, y, w, h, boderWidth, type) |
|
424 |
* |
|
425 |
* Return value is the X window id of the newly created window. |
|
426 |
* |
|
427 |
* Arguments are: |
|
428 |
* dpy The X "Display*" returned by XOpenDisplay |
|
429 |
* parent The parent of the newly created window, |
|
430 |
* a typical value for this is |
|
431 |
* RootWindow(dpy, DefaultScreen(dpy)) |
|
432 |
* x,y The location of the window to be created, |
|
433 |
* y coordinate is measured from the top down. |
|
434 |
* w,h size of the new window |
|
435 |
* borderWidth the X border size for this window, should probably |
|
436 |
* be zero. |
|
437 |
* type the GLXWindowType (see glxhelper.h) desribing the |
|
438 |
* typer of GL drawing to be done in this window |
|
439 |
*/ |
|
440 |
static Window |
|
441 |
GLXCreateWindow(dpy, parent, x, y, w, h, borderWidth, type) |
|
442 |
Display* dpy; |
|
443 |
Window parent; |
|
444 |
GLXWindowType type; |
|
445 |
{ |
|
446 |
#ifdef VGL |
|
447 |
Visual visual; |
|
448 |
#else |
|
449 |
GLXconfig params[50]; |
|
450 |
GLXconfig* next; |
|
451 |
GLXconfig* retconfig; |
|
452 |
Colormap cmap = DefaultColormap(dpy, DefaultScreen(dpy)); |
|
453 |
XVisualInfo *vis; |
|
454 |
#endif |
|
455 |
XVisualInfo template; |
|
456 |
XColor white; |
|
457 |
XSetWindowAttributes cwa; |
|
458 |
XWindowAttributes pwa; |
|
459 |
int scr, i, nret; |
|
460 |
Window win; |
|
461 |
#ifdef IRIX5 |
|
462 |
SIG_PF oldSig; |
|
463 |
#else |
|
464 |
void *oldSig; |
|
465 |
#endif |
|
466 |
||
467 |
if (setjmp(errorReturn)) { |
|
468 |
printf("hard error in GL - return\n"); |
|
469 |
signal(SIGSEGV, oldSig); |
|
470 |
return 0; |
|
471 |
} |
|
472 |
__CONT__ |
|
473 |
||
474 |
#ifdef VGL |
|
475 |
/* |
|
476 |
* I know what VGL supports; its somewhat unclean to hard code it here |
|
477 |
*/ |
|
478 |
switch (type) { |
|
479 |
case GLXcolorIndexSingleBuffer: |
|
480 |
case GLXcolorIndexDoubleBuffer: |
|
481 |
break; |
|
482 |
||
483 |
case GLXrgbSingleBuffer: |
|
484 |
case GLXrgbDoubleBuffer: |
|
485 |
printf("Sorry, VGL can't support %s type of windows\n", typeToName[type]); |
|
486 |
return 0; |
|
487 |
} |
|
488 |
||
489 |
scr = DefaultScreen(dpy); |
|
490 |
visual.visualid = CopyFromParent; |
|
491 |
cwa.border_pixel = 0; /* Even if we don't use it, it must be something */ |
|
492 |
if (w <= 0) { |
|
493 |
printf("VGL: bad width: %d\n", w); |
|
494 |
w = 1; |
|
495 |
} |
|
496 |
if (h <= 0) { |
|
497 |
printf("VGL: bad height: %d\n", h); |
|
498 |
h = 1; |
|
499 |
} |
|
500 |
win = XCreateWindow(dpy, parent, x, y, w, h, |
|
501 |
borderWidth, DisplayPlanes(dpy, scr), |
|
502 |
InputOutput, &visual, |
|
503 |
CWBorderPixel, &cwa); |
|
504 |
||
505 |
/* |
|
506 |
* on iris, seg-violations occur in te GL, if too many |
|
507 |
* views are created ... just to make certain, we catch those |
|
508 |
* in GL too. |
|
509 |
*/ |
|
510 |
oldSig = signal(SIGSEGV, glAbort); |
|
511 |
i = GLXlink(dpy, win); |
|
512 |
signal(SIGSEGV, oldSig); |
|
513 |
||
514 |
if (i < 0) { |
|
515 |
printf("GLXlink returned %d\n", i); |
|
516 |
return 0; |
|
517 |
} |
|
518 |
#else /* not VGL */ |
|
519 |
/* |
|
520 |
* This builds an array in "params" that describes for GLXgetconfig(3G) |
|
521 |
* the type of GL drawing that will be done. |
|
522 |
*/ |
|
523 |
next = params; |
|
524 |
switch (type) { |
|
525 |
case GLXcolorIndexSingleBuffer: |
|
526 |
set_entry(next++, GLX_NORMAL, GLX_RGB, FALSE); |
|
527 |
set_entry(next++, GLX_NORMAL, GLX_DOUBLE, FALSE); |
|
528 |
break; |
|
529 |
case GLXcolorIndexDoubleBuffer: |
|
530 |
set_entry(next++, GLX_NORMAL, GLX_RGB, FALSE); |
|
531 |
set_entry(next++, GLX_NORMAL, GLX_DOUBLE, TRUE); |
|
532 |
break; |
|
533 |
case GLXrgbSingleBuffer: |
|
534 |
set_entry(next++, GLX_NORMAL, GLX_RGB, TRUE); |
|
535 |
set_entry(next++, GLX_NORMAL, GLX_DOUBLE, FALSE); |
|
536 |
break; |
|
537 |
case GLXrgbDoubleBuffer: |
|
538 |
set_entry(next++, GLX_NORMAL, GLX_RGB, TRUE); |
|
539 |
set_entry(next++, GLX_NORMAL, GLX_DOUBLE, TRUE); |
|
540 |
break; |
|
541 |
} |
|
542 |
set_entry(next, 0, 0, 0); /* The input to GLXgetconfig is null terminated */ |
|
543 |
||
544 |
/* |
|
545 |
* Get configuration data for a window based on above parameters |
|
546 |
* First we have to find out which screen the parent window is on, |
|
547 |
* then we can call GXLgetconfig() |
|
548 |
*/ |
|
549 |
XGetWindowAttributes(dpy, parent, &pwa); |
|
550 |
retconfig = GLXgetconfig(dpy, XScreenNumberOfScreen(pwa.screen), params); |
|
551 |
if (retconfig == 0) { |
|
552 |
printf("Sorry, can't support %s type of windows\n", typeToName[type]); |
|
553 |
return 0; |
|
554 |
} |
|
555 |
||
556 |
/* |
|
557 |
* Scan through config info, pulling info needed to create a window |
|
558 |
* that supports the rendering mode. |
|
559 |
*/ |
|
560 |
for (next = retconfig; next->buffer; next++) { |
|
561 |
unsigned long buffer = next->buffer; |
|
562 |
unsigned long mode = next->mode; |
|
563 |
unsigned long value = next->arg; |
|
564 |
switch (mode) { |
|
565 |
case GLX_COLORMAP: |
|
566 |
if (buffer == GLX_NORMAL) { |
|
567 |
cmap = value; |
|
568 |
} |
|
569 |
break; |
|
570 |
case GLX_VISUAL: |
|
571 |
if (buffer == GLX_NORMAL) { |
|
572 |
template.visualid = value; |
|
573 |
template.screen = DefaultScreen(dpy); |
|
574 |
vis = XGetVisualInfo(dpy, VisualScreenMask|VisualIDMask, |
|
575 |
&template, &nret); |
|
576 |
} |
|
577 |
break; |
|
578 |
} |
|
579 |
} |
|
580 |
||
581 |
/* |
|
582 |
* Create the window |
|
583 |
*/ |
|
584 |
cwa.colormap = cmap; |
|
585 |
cwa.border_pixel = 0; /* Even if we don't use it, it must be something */ |
|
586 |
win = XCreateWindow(dpy, parent, x, y, w, h, |
|
587 |
borderWidth, vis->depth, InputOutput, vis->visual, |
|
588 |
CWColormap|CWBorderPixel, &cwa); |
|
589 |
||
590 |
/* |
|
591 |
* Rescan configuration info and find window slot that getconfig |
|
592 |
* provided. Fill it in with the window we just created. |
|
593 |
*/ |
|
594 |
for (next = retconfig; next->buffer; next++) { |
|
595 |
if ((next->buffer == GLX_NORMAL) && (next->mode == GLX_WINDOW)) { |
|
596 |
next->arg = win; |
|
597 |
break; |
|
598 |
} |
|
599 |
} |
|
600 |
||
601 |
/* |
|
602 |
* Now "retconfig" contains all the information the GL needs to |
|
603 |
* configure the window and its own internal state. |
|
604 |
*/ |
|
605 |
/* |
|
606 |
* on iris, seg-violations occur in te GL, if too many |
|
607 |
* views are created ... |
|
608 |
*/ |
|
609 |
oldSig = signal(SIGSEGV, glAbort); |
|
610 |
i = GLXlink(dpy, retconfig); |
|
611 |
signal(SIGSEGV, oldSig); |
|
612 |
||
613 |
if (i < 0) { |
|
614 |
printf("GLXlink returned %d\n", i); |
|
615 |
return 0; |
|
616 |
} |
|
617 |
||
618 |
/* |
|
619 |
* The GL sets its own X error handlers, which exits - this is not what we want |
|
620 |
*/ |
|
621 |
XSetErrorHandler(__XErrorHandler__); |
|
622 |
#endif |
|
623 |
return win; |
|
624 |
} |
|
625 |
||
626 |
static |
|
627 |
GLXUnlinkWindow(dpy, win) |
|
628 |
Display* dpy; |
|
629 |
Window win; |
|
630 |
{ |
|
631 |
/* |
|
632 |
* only needed for VGL - GLX does it automatically |
|
633 |
*/ |
|
634 |
#ifdef VGL |
|
635 |
GLXunlink(dpy, win); |
|
636 |
#endif |
|
637 |
} |
|
638 |
||
639 |
#endif /* GLX or VGL */ |
|
640 |
||
641 |
/* |
|
642 |
* end moved from GLXsupport.c |
|
643 |
*/ |
|
644 |
||
29 | 645 |
/* |
64 | 646 |
* helper for rotation - call rot() |
29 | 647 |
*/ |
648 |
static OBJ |
|
649 |
doRotate(angle, axis) |
|
650 |
OBJ angle; |
|
651 |
char axis; |
|
652 |
{ |
|
653 |
Angle a_angle; |
|
654 |
float f_angle; |
|
655 |
||
35 | 656 |
if (__isFloat(angle)) { |
77 | 657 |
f_angle = (float)(_floatVal(angle)); |
658 |
if (f_angle != 0.0) |
|
659 |
rot(f_angle, axis); |
|
660 |
return (true); |
|
29 | 661 |
} |
35 | 662 |
if (__isFraction(angle) |
97 | 663 |
&& __isSmallInteger(_FractionInstPtr(angle)->f_numerator) |
664 |
&& __isSmallInteger(_FractionInstPtr(angle)->f_denominator)) { |
|
77 | 665 |
float n, d; |
666 |
||
185 | 667 |
n = (float)(__intVal(_FractionInstPtr(angle)->f_numerator)); |
668 |
d = (float)(__intVal(_FractionInstPtr(angle)->f_denominator)); |
|
77 | 669 |
f_angle = n / d; |
670 |
if (f_angle != 0.0) |
|
671 |
rot(f_angle, axis); |
|
672 |
return (true); |
|
29 | 673 |
} |
97 | 674 |
if (__isSmallInteger(angle)) { |
185 | 675 |
f_angle = (float)(__intVal(angle)); |
77 | 676 |
if (f_angle != 0.0) |
677 |
rot(f_angle, axis); |
|
678 |
return (true); |
|
29 | 679 |
} |
680 |
return false; |
|
681 |
} |
|
0 | 682 |
|
24 | 683 |
/* |
29 | 684 |
* fetch integers from an st-array (elements must be smallIntegers) |
685 |
*/ |
|
686 |
static long * |
|
687 |
getLongsFromInto(obj, vec, count) |
|
688 |
OBJ obj; |
|
689 |
long *vec; |
|
690 |
{ |
|
691 |
OBJ cls, o; |
|
692 |
int nByte, i, ninstVars, nInstBytes; |
|
693 |
char *pElem; |
|
694 |
||
695 |
if (! _isNonNilObject(obj)) return (long *)NULL; |
|
134 | 696 |
cls = __qClass(obj); |
185 | 697 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
29 | 698 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 699 |
nByte = __qSize(obj) - nInstBytes; |
29 | 700 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
701 |
if (nByte < (count * sizeof(OBJ))) return (long *)NULL; |
|
702 |
for (i=0; i<count; i++) { |
|
77 | 703 |
o = *(OBJ *)pElem; |
97 | 704 |
if (! __isSmallInteger(o)) return (long *)NULL; |
185 | 705 |
vec[i] = (long)__intVal(o); |
77 | 706 |
pElem += sizeof(OBJ); |
29 | 707 |
} |
708 |
return vec; |
|
709 |
} |
|
710 |
||
711 |
/* |
|
712 |
* fetch shorts from an st-array (elements must be smallIntegers) |
|
713 |
*/ |
|
714 |
static short * |
|
715 |
getShortsFromInto(obj, vec, count) |
|
716 |
OBJ obj; |
|
717 |
short *vec; |
|
718 |
{ |
|
719 |
OBJ cls, o; |
|
720 |
int nByte, i, ninstVars, nInstBytes; |
|
721 |
char *pElem; |
|
722 |
||
723 |
if (! _isNonNilObject(obj)) return (short *)NULL; |
|
134 | 724 |
cls = __qClass(obj); |
185 | 725 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
29 | 726 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 727 |
nByte = __qSize(obj) - nInstBytes; |
29 | 728 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
729 |
if (nByte < (count * sizeof(OBJ))) return (short *)NULL; |
|
730 |
for (i=0; i<count; i++) { |
|
77 | 731 |
o = *(OBJ *)pElem; |
97 | 732 |
if (! __isSmallInteger(o)) return (short *)NULL; |
185 | 733 |
vec[i] = (short)__intVal(o); |
77 | 734 |
pElem += sizeof(OBJ); |
29 | 735 |
} |
736 |
return vec; |
|
737 |
} |
|
738 |
||
739 |
/* |
|
740 |
* fetch floats from an st-object into a c-float array |
|
741 |
* which may be a floatArray, doubleArray or array-of-something, |
|
742 |
* where something may be a float, fraction or smallInteger, |
|
24 | 743 |
*/ |
12 | 744 |
static float * |
745 |
getFloatsFromInto(obj, vec, count) |
|
746 |
OBJ obj; |
|
747 |
float *vec; |
|
748 |
{ |
|
749 |
OBJ cls; |
|
750 |
int nByte; |
|
751 |
OBJ o; |
|
752 |
int i, ninstVars, nInstBytes; |
|
753 |
char *pElem; |
|
754 |
||
755 |
if (! _isNonNilObject(obj)) return (float *)0; |
|
756 |
||
134 | 757 |
cls = __qClass(obj); |
185 | 758 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
12 | 759 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 760 |
nByte = __qSize(obj) - nInstBytes; |
12 | 761 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
762 |
||
185 | 763 |
switch (__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) { |
12 | 764 |
case FLOATARRAY: |
77 | 765 |
/* |
766 |
* best speed for float array |
|
767 |
* - the data is already as we want it |
|
768 |
*/ |
|
769 |
if (nByte < (count * sizeof(float))) return (float *)0; |
|
770 |
return (float *)pElem; |
|
12 | 771 |
|
772 |
case DOUBLEARRAY: |
|
77 | 773 |
/* |
774 |
* for double array, have to copy-and-cast |
|
775 |
*/ |
|
776 |
if (nByte < (count * sizeof(double))) return (float *)0; |
|
777 |
for (i=0; i<count; i++) { |
|
778 |
vec[i] = *((double *)pElem); |
|
779 |
pElem += sizeof(double); |
|
780 |
} |
|
781 |
return vec; |
|
12 | 782 |
|
783 |
case POINTERARRAY: |
|
77 | 784 |
/* |
785 |
* for other array, have to fetch, check and store |
|
786 |
* the elements can be floats, smallintegers or fractions |
|
787 |
*/ |
|
788 |
if (nByte < (count * sizeof(OBJ))) return (float *)0; |
|
789 |
/* get elements one-by-one */ |
|
790 |
for (i=0; i<count; i++) { |
|
791 |
o = *(OBJ *)pElem; |
|
792 |
if (__isFloat(o)) { |
|
793 |
vec[i] = _floatVal(o); |
|
97 | 794 |
} else if (__isSmallInteger(o)) { |
185 | 795 |
vec[i] = (float)(__intVal(o)); |
77 | 796 |
} else if (__isFraction(o) |
97 | 797 |
&& __isSmallInteger(_FractionInstPtr(o)->f_numerator) |
798 |
&& __isSmallInteger(_FractionInstPtr(o)->f_denominator)) { |
|
77 | 799 |
float n, d; |
800 |
||
185 | 801 |
n = (float)(__intVal(_FractionInstPtr(o)->f_numerator)); |
802 |
d = (float)(__intVal(_FractionInstPtr(o)->f_denominator)); |
|
77 | 803 |
vec[i] = n / d; |
804 |
} else |
|
805 |
return 0; |
|
806 |
pElem += sizeof(OBJ); |
|
807 |
} |
|
808 |
return vec; |
|
12 | 809 |
} |
810 |
return (float *)0; |
|
811 |
} |
|
812 |
||
29 | 813 |
/* |
814 |
* fetch doubles from an st-object into a c-double array |
|
815 |
* which may be a floatArray, doubleArray or array-of-something, |
|
816 |
* where something may be a float, fraction or smallInteger, |
|
817 |
*/ |
|
818 |
static double * |
|
819 |
getDoublesFromInto(obj, vec, count) |
|
820 |
OBJ obj; |
|
821 |
double *vec; |
|
822 |
{ |
|
823 |
OBJ cls, o; |
|
824 |
int nByte, i, ninstVars, nInstBytes; |
|
825 |
char *pElem; |
|
826 |
||
827 |
if (! _isNonNilObject(obj)) return (double *)0; |
|
134 | 828 |
cls = __qClass(obj); |
185 | 829 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
29 | 830 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 831 |
nByte = __qSize(obj) - nInstBytes; |
29 | 832 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
833 |
||
185 | 834 |
switch (__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) { |
29 | 835 |
case DOUBLEARRAY: |
77 | 836 |
/* best speed for double array - the data is already as we want it */ |
837 |
if (nByte < (count * sizeof(double))) return (double *)0; |
|
838 |
return (double *)pElem; |
|
29 | 839 |
|
840 |
case FLOATARRAY: |
|
77 | 841 |
if (nByte < (count * sizeof(float))) return (double *)0; |
842 |
for (i=0; i<count; i++) { |
|
843 |
vec[i] = *((float *)pElem); |
|
844 |
pElem += sizeof(float); |
|
845 |
} |
|
846 |
return vec; |
|
29 | 847 |
|
848 |
case POINTERARRAY: |
|
77 | 849 |
if (nByte < (count * sizeof(OBJ))) return (double *)0; |
850 |
/* get elements one-by-one */ |
|
851 |
for (i=0; i<count; i++) { |
|
852 |
o = *(OBJ *)pElem; |
|
853 |
if (__isFloat(o)) |
|
854 |
vec[i] = _floatVal(o); |
|
97 | 855 |
else if (__isSmallInteger(o)) |
185 | 856 |
vec[i] = (double)(__intVal(o)); |
77 | 857 |
else if (__isFraction(o) |
97 | 858 |
&& __isSmallInteger(_FractionInstPtr(o)->f_numerator) |
859 |
&& __isSmallInteger(_FractionInstPtr(o)->f_denominator)) { |
|
77 | 860 |
double n, d; |
861 |
||
185 | 862 |
n = (double)(__intVal(_FractionInstPtr(o)->f_numerator)); |
863 |
d = (double)(__intVal(_FractionInstPtr(o)->f_denominator)); |
|
77 | 864 |
vec[i] = n / d; |
865 |
||
866 |
} else |
|
867 |
return 0; |
|
868 |
pElem += sizeof(OBJ); |
|
869 |
} |
|
870 |
return vec; |
|
29 | 871 |
} |
872 |
return (double *)0; |
|
873 |
} |
|
874 |
||
875 |
/* |
|
876 |
* move from a c-float array into an st-object, |
|
877 |
* the st-object MUST be either a float- or double array |
|
878 |
*/ |
|
12 | 879 |
static |
880 |
putFloatsFromInto(vec, obj, count) |
|
881 |
OBJ obj; |
|
882 |
float *vec; |
|
883 |
{ |
|
884 |
OBJ cls; |
|
885 |
int nByte; |
|
886 |
OBJ o; |
|
887 |
int i, ninstVars, nInstBytes; |
|
888 |
char *pElem; |
|
889 |
||
890 |
if (! _isNonNilObject(obj)) return 0; |
|
891 |
||
134 | 892 |
cls = __qClass(obj); |
185 | 893 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
12 | 894 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 895 |
nByte = __qSize(obj) - nInstBytes; |
12 | 896 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
897 |
||
185 | 898 |
switch (__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) { |
12 | 899 |
case FLOATARRAY: |
77 | 900 |
if (nByte < (count * sizeof(float))) return 0; |
901 |
for (i=0; i<count; i++) { |
|
902 |
*(float *)pElem = vec[i]; |
|
903 |
pElem += sizeof(float); |
|
904 |
} |
|
905 |
return 1; |
|
12 | 906 |
|
907 |
case DOUBLEARRAY: |
|
77 | 908 |
if (nByte < (count * sizeof(float))) return 0; |
909 |
for (i=0; i<count; i++) { |
|
910 |
*(double *)pElem = vec[i]; |
|
911 |
pElem += sizeof(double); |
|
912 |
} |
|
913 |
return 1; |
|
12 | 914 |
} |
915 |
/* not implemented for others */ |
|
916 |
||
917 |
return 0; |
|
918 |
} |
|
919 |
||
920 |
static Matrix* |
|
921 |
getFloatsFromMatrixInto(obj, mp) |
|
922 |
OBJ obj; |
|
923 |
Matrix *mp; |
|
924 |
{ |
|
925 |
OBJ cls; |
|
926 |
extern OBJ FloatArray, DoubleArray, Array; |
|
927 |
int nByte; |
|
928 |
OBJ o; |
|
29 | 929 |
int ninstVars, nInstBytes; |
930 |
char *pElem; |
|
931 |
int x = 0; |
|
932 |
int i,j; |
|
12 | 933 |
|
934 |
if (! _isNonNilObject(obj)) return (Matrix *)0; |
|
935 |
||
134 | 936 |
cls = __qClass(obj); |
185 | 937 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
29 | 938 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 939 |
nByte = __qSize(obj) - nInstBytes; |
29 | 940 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
941 |
||
185 | 942 |
switch (__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) { |
29 | 943 |
case FLOATARRAY: |
77 | 944 |
/* |
945 |
* very easy for FLOATARRAY objects - no copying needed |
|
946 |
*/ |
|
947 |
if (nByte < (16 * sizeof(float))) return (Matrix *)0; |
|
948 |
return (Matrix *) _FloatArrayInstPtr(obj)->f_element; |
|
12 | 949 |
|
29 | 950 |
case DOUBLEARRAY: |
77 | 951 |
/* |
952 |
* for DOUBLEARRAY objects copy and cast |
|
953 |
*/ |
|
954 |
if (nByte < (16 * sizeof(double))) return (Matrix *)0; |
|
955 |
for (i=0; i<4; i++) { |
|
956 |
for (j=0; j<4; j++) { |
|
957 |
(*mp)[i][j] = _DoubleArrayInstPtr(obj)->d_element[x]; |
|
958 |
x++; |
|
959 |
} |
|
960 |
} |
|
961 |
return mp; |
|
29 | 962 |
|
963 |
case POINTERARRAY: |
|
77 | 964 |
if (nByte < (16 * sizeof(OBJ))) return (Matrix *)0; |
965 |
/* |
|
966 |
* get elements one-by-one |
|
967 |
*/ |
|
968 |
for (i=0; i<4; i++) { |
|
969 |
for (j=0; j<4; j++) { |
|
970 |
o = _ArrayInstPtr(obj)->a_element[x]; |
|
971 |
if (__isFloat(o)) { |
|
972 |
(*mp)[i][j] = _floatVal(o); |
|
97 | 973 |
} else if (__isSmallInteger(o)) { |
185 | 974 |
(*mp)[i][j] = (double)__intVal(o); |
77 | 975 |
} else if (__isFraction(o) |
97 | 976 |
&& __isSmallInteger(_FractionInstPtr(o)->f_numerator) |
977 |
&& __isSmallInteger(_FractionInstPtr(o)->f_denominator)) { |
|
77 | 978 |
double n, d; |
979 |
||
185 | 980 |
n = (double)(__intVal(_FractionInstPtr(o)->f_numerator)); |
981 |
d = (double)(__intVal(_FractionInstPtr(o)->f_denominator)); |
|
77 | 982 |
(*mp)[i][j] = n / d; |
983 |
} else |
|
984 |
return (Matrix *)0; |
|
985 |
x++; |
|
986 |
} |
|
987 |
} |
|
988 |
return mp; |
|
12 | 989 |
} |
990 |
return (Matrix *)0; |
|
991 |
} |
|
992 |
||
46 | 993 |
static float* |
994 |
getFloatsFromFloatArrayInto(obj, fp) |
|
995 |
OBJ obj; |
|
996 |
float *fp; |
|
997 |
{ |
|
998 |
OBJ cls; |
|
999 |
extern OBJ FloatArray, DoubleArray, Array; |
|
1000 |
int ninstVars; |
|
1001 |
||
1002 |
if (! _isNonNilObject(obj)) return (float *)0; |
|
134 | 1003 |
cls = __qClass(obj); |
46 | 1004 |
if (cls == FloatArray) |
77 | 1005 |
return _FloatArrayInstPtr(obj)->f_element; |
46 | 1006 |
|
185 | 1007 |
if ((__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) == FLOATARRAY) { |
1008 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
|
77 | 1009 |
return (float *) &(_InstPtr(obj)->i_instvars[ninstVars]); |
46 | 1010 |
} |
1011 |
||
1012 |
/* |
|
1013 |
* need more here (i.e. convert from array-of-floats) |
|
1014 |
*/ |
|
1015 |
return (float *)0; |
|
1016 |
} |
|
1017 |
||
1018 |
%} |
|
1019 |
! ! |
|
0 | 1020 |
|
168 | 1021 |
!GLXWorkstation class methodsFor:'error handling'! |
1022 |
||
1023 |
requestCodeOfLastError |
|
1024 |
%{ /* NOCONTEXT */ |
|
1025 |
||
1026 |
RETURN ( _MKSMALLINT(lastRequestCode) ); |
|
1027 |
%} |
|
1028 |
! |
|
1029 |
||
1030 |
minorCodeOfLastError |
|
1031 |
%{ /* NOCONTEXT */ |
|
1032 |
||
1033 |
RETURN ( _MKSMALLINT(lastMinorCode) ); |
|
1034 |
%} |
|
1035 |
! |
|
1036 |
||
1037 |
resourceIdOfLastError |
|
1038 |
%{ /* NOCONTEXT */ |
|
1039 |
||
1040 |
RETURN ( _MKSMALLINT(lastResource) ); |
|
1041 |
%} |
|
1042 |
! |
|
1043 |
||
1044 |
errorStringOfLastError |
|
1045 |
%{ |
|
216 | 1046 |
RETURN ( __MKSTRING(lastErrorMsg COMMA_CON) ); |
168 | 1047 |
%} |
1048 |
! ! |
|
1049 |
||
1050 |
!GLXWorkstation methodsFor:'initialization'! |
|
1051 |
||
1052 |
initializeFor:aDisplayName |
|
169 | 1053 |
(super initializeFor:aDisplayName) isNil ifTrue:[^ nil]. |
168 | 1054 |
%{ |
1055 |
if (_INST(displayId) != nil) { |
|
185 | 1056 |
XSetErrorHandler(__XErrorHandler__); |
1057 |
} |
|
1058 |
%} |
|
1059 |
! |
|
1060 |
||
1061 |
initializeScreenProperties |
|
1062 |
super initializeScreenProperties. |
|
1063 |
||
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1064 |
"/ GL has a 'bug' (or feature ?) |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1065 |
"/ which makes it exit (instead of giving an error return) |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1066 |
"/ if a gl view is opened on a non-gl capable remote display. |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1067 |
"/ we certainly do not want this here. |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1068 |
"/ Since I cannot tell in advance if the remote display is gl capable, |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1069 |
"/ and its too late once we know its not, we simply disallow any remote gl. |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1070 |
"/ Sorry. (I guess, there are some query functions for that available, but I |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1071 |
"/ have no documentation). |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1072 |
|
213
a24397d724b3
no remote GL with IRIX, again
Claus Gittinger <cg@exept.de>
parents:
212
diff
changeset
|
1073 |
%{ |
a24397d724b3
no remote GL with IRIX, again
Claus Gittinger <cg@exept.de>
parents:
212
diff
changeset
|
1074 |
# ifdef GLX |
a24397d724b3
no remote GL with IRIX, again
Claus Gittinger <cg@exept.de>
parents:
212
diff
changeset
|
1075 |
%}. |
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1076 |
glOK := (displayName = ':0') or:[displayName = ':0.0']. |
213
a24397d724b3
no remote GL with IRIX, again
Claus Gittinger <cg@exept.de>
parents:
212
diff
changeset
|
1077 |
%{ |
214
5316b1373129
oops - glOk was left undefined
Claus Gittinger <cg@exept.de>
parents:
213
diff
changeset
|
1078 |
#else |
5316b1373129
oops - glOk was left undefined
Claus Gittinger <cg@exept.de>
parents:
213
diff
changeset
|
1079 |
%}. |
5316b1373129
oops - glOk was left undefined
Claus Gittinger <cg@exept.de>
parents:
213
diff
changeset
|
1080 |
glOK := true. |
5316b1373129
oops - glOk was left undefined
Claus Gittinger <cg@exept.de>
parents:
213
diff
changeset
|
1081 |
%{ |
213
a24397d724b3
no remote GL with IRIX, again
Claus Gittinger <cg@exept.de>
parents:
212
diff
changeset
|
1082 |
#endif |
a24397d724b3
no remote GL with IRIX, again
Claus Gittinger <cg@exept.de>
parents:
212
diff
changeset
|
1083 |
%}. |
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1084 |
|
185 | 1085 |
%{ |
1086 |
Display *dpy = myDpy; |
|
1087 |
int dummy; |
|
1088 |
||
1089 |
if (ISCONNECTED) { |
|
1090 |
#if defined(XSGIStereo) && defined(GLX) |
|
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1091 |
if (_INST(glOK) != true) |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1092 |
_INST(hasStereoExtension) = false; |
185 | 1093 |
else |
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1094 |
if (XQueryExtension(dpy, "SGIFullScreenStereo", &dummy, &dummy, &dummy)) |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1095 |
_INST(hasStereoExtension) = true; |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1096 |
else |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1097 |
#endif |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1098 |
_INST(hasStereoExtension) = false; |
168 | 1099 |
} |
1100 |
%} |
|
1101 |
! ! |
|
1102 |
||
24 | 1103 |
!GLXWorkstation methodsFor:'queries'! |
1104 |
||
157 | 1105 |
supportsGLDrawing |
1106 |
"return true, if this device supports 3D GL drawing." |
|
1107 |
||
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1108 |
^ glOK |
157 | 1109 |
|
1110 |
" |
|
1111 |
Display supportsGLDrawing |
|
1112 |
" |
|
1113 |
! |
|
1114 |
||
159 | 1115 |
glVersion |
1116 |
"return a string describing the GL version. |
|
1117 |
For informative use only; portable applications do not depend |
|
1118 |
on the returned string." |
|
1119 |
||
1120 |
%{ /* NOCONTEXT */ |
|
1121 |
#ifdef VGL |
|
216 | 1122 |
RETURN (__MKSTRING("vogl" COMMA_CON)); |
159 | 1123 |
#else |
1124 |
char buffer[128]; |
|
1125 |
||
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1126 |
if (_INST(glOK) == true) { |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1127 |
gversion(buffer); |
216 | 1128 |
RETURN (__MKSTRING(buffer COMMA_CON)); |
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1129 |
} else { |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1130 |
RETURN (nil); |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1131 |
} |
159 | 1132 |
#endif |
1133 |
%} |
|
1134 |
||
1135 |
" |
|
1136 |
Display glVersion |
|
1137 |
" |
|
1138 |
! |
|
1139 |
||
24 | 1140 |
supportsRGB |
1141 |
"return true, if this gl workstation supports rgb |
|
29 | 1142 |
(in addition to indexed) colors. Actually, we return true |
157 | 1143 |
for a real GL engine, false for the simulator here. |
1144 |
For portable applications, always combine this with a query |
|
1145 |
if the display supports GL drawing at all." |
|
24 | 1146 |
|
1147 |
%{ /* NOCONTEXT */ |
|
1148 |
#ifdef GLX |
|
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1149 |
RETURN ( _INST(glOK) ); |
24 | 1150 |
#endif |
89 | 1151 |
%}. |
1152 |
^ false |
|
1153 |
||
1154 |
" |
|
1155 |
Display supportsRGB |
|
1156 |
" |
|
64 | 1157 |
! |
1158 |
||
1159 |
supportsLight |
|
157 | 1160 |
"return true, if this gl workstation supports light sources |
1161 |
(i.e. if its a real GL). |
|
1162 |
For portable applications, always combine this with a query |
|
1163 |
if the display supports GL drawing at all." |
|
89 | 1164 |
|
1165 |
%{ /* NOCONTEXT */ |
|
64 | 1166 |
#ifdef GLX |
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1167 |
RETURN ( _INST(glOK) ); |
64 | 1168 |
#endif |
89 | 1169 |
%}. |
1170 |
^ false |
|
1171 |
||
1172 |
" |
|
1173 |
Display supportsLight |
|
1174 |
" |
|
1175 |
! |
|
1176 |
||
1177 |
supportsTextures |
|
1178 |
"return true, if this gl workstation supports texture mapping |
|
157 | 1179 |
(i.e. if its a real GL). |
1180 |
For portable applications, always combine this with a query |
|
1181 |
if the display supports GL drawing at all." |
|
89 | 1182 |
|
1183 |
%{ /* NOCONTEXT */ |
|
1184 |
#ifdef GLX |
|
1185 |
if (getgdesc(GD_TEXTURE) != 0) { |
|
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1186 |
RETURN ( _INST(glOK) ); |
89 | 1187 |
} |
1188 |
#endif |
|
1189 |
%}. |
|
1190 |
^ false |
|
1191 |
||
1192 |
" |
|
1193 |
Display supportsTextures |
|
1194 |
" |
|
1195 |
! |
|
1196 |
||
1197 |
supportsDoubleBuffer |
|
157 | 1198 |
"return true, if this gl workstation supports double buffering. |
1199 |
For portable applications, always combine this with a query |
|
1200 |
if the display supports GL drawing at all." |
|
1201 |
||
89 | 1202 |
%{ /* NOCONTEXT */ |
1203 |
||
1204 |
#ifdef GLX |
|
1205 |
if (getgdesc(GD_BITS_NORM_DBL_RED) != 0) { |
|
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1206 |
RETURN ( _INST(glOK) ); |
89 | 1207 |
} |
1208 |
#endif |
|
1209 |
%}. |
|
1210 |
^ false |
|
1211 |
||
1212 |
" |
|
1213 |
Display supportsDoubleBuffer |
|
1214 |
" |
|
1215 |
! |
|
1216 |
||
1217 |
supportsZBuffer |
|
157 | 1218 |
"return true, if this gl workstation has z buffer support. |
1219 |
For portable applications, always combine this with a query |
|
1220 |
if the display supports GL drawing at all." |
|
1221 |
||
89 | 1222 |
%{ /* NOCONTEXT */ |
1223 |
||
1224 |
#ifdef GLX |
|
1225 |
if (getgdesc(GD_BITS_NORM_ZBUFFER) != 0) { |
|
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1226 |
RETURN ( _INST(glOK) ); |
89 | 1227 |
} |
1228 |
#endif |
|
1229 |
%}. |
|
1230 |
^ false |
|
1231 |
||
1232 |
" |
|
1233 |
Display supportsZBuffer |
|
1234 |
" |
|
1235 |
! |
|
1236 |
||
1237 |
maxZValue |
|
1238 |
"return the max. Z value (only valid if z-buffer is supported)" |
|
1239 |
%{ |
|
1240 |
#ifdef GLX |
|
1241 |
long zMax; |
|
1242 |
extern OBJ _MKLARGEINT(); |
|
1243 |
||
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1244 |
if (_INST(glOK) == true) { |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1245 |
zMax = getgdesc(GD_ZMAX); |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1246 |
|
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1247 |
if ((zMax >= _MIN_INT) && (zMax <= _MAX_INT)) { |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1248 |
RETURN ( _MKSMALLINT(zMax) ); |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1249 |
} |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1250 |
RETURN ( _MKLARGEINT(zMax) ); |
89 | 1251 |
} |
1252 |
#endif |
|
1253 |
%}. |
|
1254 |
^ nil |
|
185 | 1255 |
! |
1256 |
||
1257 |
hasStereoExtension |
|
1258 |
"return true, if this workstation supports stereo GL drawing. |
|
1259 |
Both the server must support it, and the feature must have been |
|
1260 |
enabled in the smalltalk system, for true to be returned." |
|
1261 |
||
1262 |
^ hasStereoExtension |
|
1263 |
||
1264 |
" |
|
1265 |
Display hasStereoExtension |
|
1266 |
" |
|
24 | 1267 |
! ! |
1268 |
||
0 | 1269 |
!GLXWorkstation methodsFor:'window creation'! |
1270 |
||
12 | 1271 |
createGLXWindowFor:aView left:xpos top:ypos width:wwidth height:wheight type:glxType |
157 | 1272 |
|ext wsuperView wsuperViewId windowId| |
0 | 1273 |
|
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1274 |
glOK ifFalse:[^ nil]. |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1275 |
|
0 | 1276 |
wsuperView := aView superView. |
1277 |
wsuperView notNil ifTrue:[ |
|
77 | 1278 |
wsuperViewId := wsuperView id |
0 | 1279 |
]. |
1280 |
||
1281 |
%{ |
|
1282 |
Display *dpy = myDpy; |
|
185 | 1283 |
int screen = __intVal(_INST(screen)); |
0 | 1284 |
Window newWindow, parentWindow; |
1285 |
extern Window GLXCreateWindow(); |
|
12 | 1286 |
int t; |
0 | 1287 |
|
97 | 1288 |
if (__isSmallInteger(xpos) && __isSmallInteger(ypos) |
1289 |
&& __isSmallInteger(wwidth) && __isSmallInteger(wheight)) { |
|
206
4284b80bebdf
changed to use ExternalAddress handles for all Window, Font,
Claus Gittinger <cg@exept.de>
parents:
190
diff
changeset
|
1290 |
if (__isExternalAddress(wsuperViewId)) { |
207
9124817bbb03
use new c-pointer wrapper macros (based on externalAddress)
Claus Gittinger <cg@exept.de>
parents:
206
diff
changeset
|
1291 |
parentWindow = _WindowVal(wsuperViewId); |
77 | 1292 |
} else { |
1293 |
parentWindow = RootWindow(dpy, screen); |
|
1294 |
} |
|
1295 |
||
1296 |
if (glxType == @symbol(colorIndexSingleBuffer)) |
|
1297 |
t = GLXcolorIndexSingleBuffer; |
|
1298 |
else if (glxType == @symbol(colorIndexDoubleBuffer)) |
|
1299 |
t = GLXcolorIndexDoubleBuffer; |
|
1300 |
else if (glxType == @symbol(rgbSingleBuffer)) |
|
1301 |
t = GLXrgbSingleBuffer; |
|
1302 |
else if (glxType == @symbol(rgbDoubleBuffer)) |
|
1303 |
t = GLXrgbDoubleBuffer; |
|
1304 |
else { |
|
1305 |
RETURN ( nil ); |
|
1306 |
} |
|
1307 |
||
134 | 1308 |
ENTERGLX; |
77 | 1309 |
newWindow = GLXCreateWindow(dpy, parentWindow, |
185 | 1310 |
__intVal(xpos), __intVal(ypos), |
1311 |
__intVal(wwidth), __intVal(wheight), |
|
77 | 1312 |
0, t); |
134 | 1313 |
LEAVEGLX; |
77 | 1314 |
|
1315 |
if (! newWindow) { |
|
1316 |
RETURN ( nil ); |
|
1317 |
} |
|
1318 |
||
207
9124817bbb03
use new c-pointer wrapper macros (based on externalAddress)
Claus Gittinger <cg@exept.de>
parents:
206
diff
changeset
|
1319 |
windowId = __MKOBJ(newWindow); |
0 | 1320 |
} |
206
4284b80bebdf
changed to use ExternalAddress handles for all Window, Font,
Claus Gittinger <cg@exept.de>
parents:
190
diff
changeset
|
1321 |
%}. |
0 | 1322 |
windowId notNil ifTrue:[ |
77 | 1323 |
self addKnownView:aView withId:windowId. |
0 | 1324 |
]. |
1325 |
^ windowId |
|
20 | 1326 |
! |
1327 |
||
1328 |
unlinkGLXView:aGLXWindowId |
|
1329 |
"remove X/GLX link" |
|
1330 |
%{ |
|
206
4284b80bebdf
changed to use ExternalAddress handles for all Window, Font,
Claus Gittinger <cg@exept.de>
parents:
190
diff
changeset
|
1331 |
if (__isExternalAddress(aGLXWindowId)) { |
134 | 1332 |
ENTERGLX; |
207
9124817bbb03
use new c-pointer wrapper macros (based on externalAddress)
Claus Gittinger <cg@exept.de>
parents:
206
diff
changeset
|
1333 |
GLXUnlinkWindow(myDpy, _WindowVal(aGLXWindowId)); |
134 | 1334 |
LEAVEGLX; |
1335 |
} |
|
20 | 1336 |
%} |
0 | 1337 |
! ! |
1338 |
||
64 | 1339 |
!GLXWorkstation methodsFor:'viewing'! |
0 | 1340 |
|
24 | 1341 |
glxPerspectiveFovy:fovy aspect:aspect near:near far:far in:aGLXWindowId |
0 | 1342 |
"define perspective projection" |
1343 |
||
1344 |
%{ /* NOCONTEXT */ |
|
1345 |
||
1346 |
Angle a_fovy; |
|
1347 |
Coord c_near, c_far; |
|
1348 |
float f_aspect; |
|
1349 |
||
29 | 1350 |
_ANGLE_ (fovy, a_fovy) |
1351 |
_FLOAT_ (aspect, f_aspect) |
|
1352 |
_COORD_ (near, c_near) |
|
1353 |
_COORD_ (far, c_far) |
|
1354 |
||
1355 |
SETWIN(aGLXWindowId) |
|
1356 |
perspective(a_fovy, f_aspect, c_near, c_far); |
|
1357 |
||
1358 |
RETURN (true); |
|
1359 |
%} |
|
1360 |
! |
|
1361 |
||
1362 |
glxWindowLeft: left right: right bottom: bottom top: top near: near far: far in: aGLXWindowId |
|
1363 |
"this one was added independently by JEFF - kept for his programs ..." |
|
1364 |
||
1365 |
self glxWindowLeft:left right:right top:top bottom:bottom near:near far:far in:aGLXWindowId |
|
24 | 1366 |
! |
1367 |
||
1368 |
glxWindowLeft:left right:right top:top bottom:bottom near:near far:far in:aGLXWindowId |
|
1369 |
"define perspective viewing pyramid" |
|
1370 |
||
1371 |
%{ /* NOCONTEXT */ |
|
1372 |
Coord c_left, c_right, c_top, c_bot, c_near, c_far; |
|
1373 |
||
29 | 1374 |
_COORD_ (left, c_left) |
1375 |
_COORD_ (right, c_right) |
|
1376 |
_COORD_ (top, c_top) |
|
1377 |
_COORD_ (bottom, c_bot) |
|
1378 |
_COORD_ (near, c_near) |
|
1379 |
_COORD_ (far, c_far) |
|
1380 |
SETWIN(aGLXWindowId) |
|
1381 |
window(c_left, c_right, c_bot, c_top, c_near, c_far); |
|
1382 |
||
1383 |
RETURN (true); |
|
1384 |
%} |
|
0 | 1385 |
! |
1386 |
||
64 | 1387 |
glxLookatVx:vx vy:vy vz:vz px:px py:py pz:pz twist:twist in:aGLXWindowId |
1388 |
"define viewing transformation" |
|
1389 |
||
1390 |
%{ /* NOCONTEXT */ |
|
1391 |
||
1392 |
Coord f_vx, f_vy, f_vz, f_px, f_py, f_pz; |
|
1393 |
Angle a_twist; |
|
1394 |
||
1395 |
_COORD_ (vx, f_vx) |
|
1396 |
_COORD_ (vy, f_vy) |
|
1397 |
_COORD_ (vz, f_vz) |
|
1398 |
_COORD_ (px, f_px) |
|
1399 |
_COORD_ (py, f_py) |
|
1400 |
_COORD_ (pz, f_pz) |
|
1401 |
_ANGLE_ (twist, a_twist) |
|
1402 |
SETWIN(aGLXWindowId) |
|
1403 |
lookat(f_vx, f_vy, f_vz, f_px, f_py, f_pz, a_twist); |
|
1404 |
RETURN (true); |
|
1405 |
%} |
|
1406 |
! |
|
1407 |
||
1408 |
glxOrthoLeft: left right: right bottom: bottom top: top near: near far: far in: aGLXWindowId |
|
1409 |
"define orthogonal projection" |
|
1410 |
||
1411 |
%{ /* NOCONTEXT */ |
|
1412 |
float f_left, f_right, f_bottom, f_top, |
|
77 | 1413 |
f_near, f_far; |
64 | 1414 |
|
1415 |
_FLOAT_(left, f_left) |
|
1416 |
_FLOAT_(right, f_right) |
|
1417 |
_FLOAT_(bottom, f_bottom) |
|
1418 |
_FLOAT_(top, f_top) |
|
1419 |
_FLOAT_(near, f_near) |
|
1420 |
_FLOAT_(far, f_far) |
|
1421 |
SETWIN(aGLXWindowId) |
|
1422 |
ortho(f_left, f_right, f_bottom, f_top, f_near, f_far); |
|
1423 |
RETURN (true); |
|
1424 |
%} |
|
1425 |
! |
|
1426 |
||
1427 |
glxOrtho2Left: left right: right bottom: bottom top: top in: aGLXWindowId |
|
1428 |
"define 2D orthogonal projection" |
|
1429 |
||
1430 |
%{ /* NOCONTEXT */ |
|
1431 |
float f_left, f_right, f_top, f_bottom; |
|
1432 |
||
1433 |
SETWIN(aGLXWindowId) |
|
1434 |
_FLOAT_(left, f_left) |
|
1435 |
_FLOAT_(right, f_right) |
|
1436 |
_FLOAT_(bottom, f_bottom) |
|
1437 |
_FLOAT_(top, f_top) |
|
1438 |
ortho2(f_left, f_right, f_bottom, f_top); |
|
89 | 1439 |
%} |
1440 |
. |
|
1441 |
^ true |
|
64 | 1442 |
! |
1443 |
||
127 | 1444 |
glxPolarviewDist: dist azim: azim inc: inc twist: twist in: aGLXWindowId |
1445 |
||
1446 |
%{ /* NOCONTEXT */ |
|
1447 |
Coord c_dist; |
|
1448 |
Angle a_azim, a_inc, a_twist; |
|
1449 |
||
1450 |
_COORD_(dist, c_dist) |
|
1451 |
_ANGLE_(azim, a_azim) |
|
1452 |
_ANGLE_(inc, a_inc) |
|
1453 |
_ANGLE_(twist, a_twist) |
|
1454 |
SETWIN(aGLXWindowId) |
|
1455 |
polarview(c_dist, a_azim, a_inc, a_twist); |
|
1456 |
RETURN (true); |
|
1457 |
%} |
|
1458 |
! |
|
1459 |
||
64 | 1460 |
glxReshapeViewPortIn: aGLXWindowId |
1461 |
||
1462 |
%{ /* NOCONTEXT */ |
|
1463 |
SETWIN(aGLXWindowId) |
|
1464 |
reshapeviewport(); |
|
89 | 1465 |
%} |
1466 |
. |
|
1467 |
^ true |
|
127 | 1468 |
! |
1469 |
||
1470 |
glxViewportLeft:left right:right bottom:bottom top:top in:aGLXWindowId |
|
1471 |
||
1472 |
%{ /* NOCONTEXT */ |
|
1473 |
SETWIN(aGLXWindowId) |
|
1474 |
viewport(_screencoordVal(left), _screencoordVal(right), |
|
1475 |
_screencoordVal(bottom), _screencoordVal(top)); |
|
1476 |
RETURN (true); |
|
1477 |
%} |
|
1478 |
! ! |
|
1479 |
||
1480 |
!GLXWorkstation methodsFor:'window control'! |
|
1481 |
||
1482 |
glxWinclose:gwid in:aGLXWindowId |
|
1483 |
||
1484 |
%{ /* NOCONTEXT */ |
|
1485 |
#ifdef GLX |
|
1486 |
SETWIN(aGLXWindowId) |
|
1487 |
winclose(_longVal(gwid)); |
|
1488 |
RETURN (true); |
|
1489 |
#endif |
|
1490 |
%} |
|
1491 |
. |
|
1492 |
^ false |
|
1493 |
! |
|
1494 |
||
1495 |
glxWinconstraintsIn: aGLXWindowId |
|
1496 |
||
1497 |
%{ /* NOCONTEXT */ |
|
1498 |
#ifdef GLX |
|
1499 |
SETWIN(aGLXWindowId) |
|
1500 |
winconstraints(); |
|
1501 |
RETURN (true); |
|
1502 |
#endif |
|
1503 |
%} |
|
1504 |
. |
|
1505 |
^ false |
|
1506 |
! |
|
1507 |
||
1508 |
glxWindepth: gwid in: aGLXWindowId |
|
1509 |
||
1510 |
%{ /* NOCONTEXT */ |
|
1511 |
#ifdef GLX |
|
1512 |
SETWIN(aGLXWindowId) |
|
1513 |
RETURN (_MKSMALLINT(windepth(_longVal(gwid)))); |
|
1514 |
#endif |
|
1515 |
%} |
|
1516 |
. |
|
1517 |
^ false |
|
1518 |
! |
|
1519 |
||
1520 |
glxWingetIn: aGLXWindowId |
|
1521 |
||
1522 |
%{ /* NOCONTEXT */ |
|
1523 |
#ifdef GLX |
|
1524 |
SETWIN(aGLXWindowId) |
|
1525 |
RETURN (_MKSMALLINT(winget())); |
|
1526 |
#endif |
|
1527 |
%} |
|
1528 |
. |
|
1529 |
^ false |
|
1530 |
! |
|
1531 |
||
1532 |
glxWinmoveX: x y: y in: aGLXWindowId |
|
1533 |
||
1534 |
%{ /* NOCONTEXT */ |
|
1535 |
#ifdef GLX |
|
1536 |
SETWIN(aGLXWindowId) |
|
1537 |
winmove(_longVal(x), _longVal(y)); |
|
1538 |
RETURN (true); |
|
1539 |
#endif |
|
1540 |
%} |
|
1541 |
. |
|
1542 |
^ false |
|
1543 |
! |
|
1544 |
||
1545 |
glxWinpopIn: aGLXWindowId |
|
1546 |
||
1547 |
%{ /* NOCONTEXT */ |
|
1548 |
#ifdef GLX |
|
1549 |
SETWIN(aGLXWindowId) |
|
1550 |
winpop(); |
|
1551 |
RETURN (true); |
|
1552 |
#endif |
|
1553 |
%} |
|
1554 |
. |
|
1555 |
^ false |
|
1556 |
! |
|
1557 |
||
1558 |
glxWinpositionX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
1559 |
||
1560 |
%{ /* NOCONTEXT */ |
|
1561 |
#ifdef GLX |
|
1562 |
SETWIN(aGLXWindowId) |
|
1563 |
winposition(_longVal(x1), _longVal(y1), _longVal(x2), _longVal(y2)); |
|
1564 |
RETURN (true); |
|
1565 |
#endif |
|
1566 |
%} |
|
1567 |
. |
|
1568 |
^ false |
|
1569 |
! |
|
1570 |
||
1571 |
glxWinpushIn: aGLXWindowId |
|
1572 |
||
1573 |
%{ /* NOCONTEXT */ |
|
1574 |
#ifdef GLX |
|
1575 |
SETWIN(aGLXWindowId) |
|
1576 |
winpush(); |
|
1577 |
RETURN (true); |
|
1578 |
#endif |
|
1579 |
%} |
|
1580 |
. |
|
1581 |
^ false |
|
1582 |
! |
|
1583 |
||
1584 |
glxWinset: gwid in: aGLXWindowId |
|
1585 |
||
1586 |
%{ /* NOCONTEXT */ |
|
1587 |
#ifdef GLX |
|
1588 |
SETWIN(aGLXWindowId) |
|
1589 |
winset(_longVal(gwid)); |
|
1590 |
RETURN (true); |
|
1591 |
#endif |
|
1592 |
%} |
|
1593 |
. |
|
1594 |
^ false |
|
64 | 1595 |
! ! |
1596 |
||
1597 |
!GLXWorkstation methodsFor:'transformations'! |
|
1598 |
||
1599 |
glxTranslateX:x in:aGLXWindowId |
|
1600 |
"translate current matrix on X axis" |
|
1601 |
||
1602 |
%{ /* NOCONTEXT */ |
|
1603 |
||
1604 |
Coord c_x; |
|
1605 |
||
1606 |
_COORD_ (x, c_x) |
|
1607 |
SETWIN(aGLXWindowId) |
|
1608 |
translate(c_x, (Coord)0, (Coord)0); |
|
1609 |
RETURN (true); |
|
1610 |
%} |
|
1611 |
! |
|
1612 |
||
1613 |
glxTranslateY:y in:aGLXWindowId |
|
1614 |
"translate current matrix on Y axis" |
|
1615 |
||
1616 |
%{ /* NOCONTEXT */ |
|
1617 |
||
1618 |
Coord c_y; |
|
1619 |
||
1620 |
_COORD_ (y, c_y) |
|
1621 |
SETWIN(aGLXWindowId) |
|
1622 |
translate((Coord)0, c_y, (Coord)0); |
|
1623 |
RETURN (true); |
|
1624 |
%} |
|
1625 |
! |
|
1626 |
||
1627 |
glxTranslateZ:z in:aGLXWindowId |
|
1628 |
"translate current matrix on Z axis" |
|
1629 |
||
1630 |
%{ /* NOCONTEXT */ |
|
1631 |
||
1632 |
Coord c_z; |
|
1633 |
||
1634 |
_COORD_ (z, c_z) |
|
1635 |
SETWIN(aGLXWindowId) |
|
1636 |
translate((Coord)0, (Coord)0, c_z); |
|
1637 |
RETURN (true); |
|
1638 |
%} |
|
1639 |
! |
|
1640 |
||
12 | 1641 |
glxTranslateX:x y:y z:z in:aGLXWindowId |
58 | 1642 |
"translate current matrix, given individual x, y and z values" |
0 | 1643 |
|
1644 |
%{ /* NOCONTEXT */ |
|
1645 |
||
1646 |
Coord c_x, c_y, c_z; |
|
1647 |
||
29 | 1648 |
_COORD_ (x, c_x) |
1649 |
_COORD_ (y, c_y) |
|
1650 |
_COORD_ (z, c_z) |
|
1651 |
SETWIN(aGLXWindowId) |
|
1652 |
translate(c_x, c_y, c_z); |
|
1653 |
RETURN (true); |
|
1654 |
%} |
|
0 | 1655 |
! |
1656 |
||
58 | 1657 |
glxTranslate:arrayOf3Floats in:aGLXWindowId |
1658 |
"translate current matrix, given a 3-element vector" |
|
1659 |
||
1660 |
%{ /* NOCONTEXT */ |
|
1661 |
||
1662 |
float vec[3], *v; |
|
1663 |
||
1664 |
if (! (v = getFloatsFromInto(arrayOf3Floats, vec, 3))) RETURN(false); |
|
1665 |
||
1666 |
SETWIN(aGLXWindowId) |
|
1667 |
translate((Coord)(v[0]), (Coord)(v[1]), (Coord)(v[2])); |
|
1668 |
RETURN (true); |
|
1669 |
%} |
|
1670 |
! |
|
1671 |
||
64 | 1672 |
glxScaleX:x in:aGLXWindowId |
1673 |
"scale in x direction" |
|
1674 |
||
1675 |
%{ /* NOCONTEXT */ |
|
1676 |
||
1677 |
float f_x; |
|
1678 |
||
1679 |
_FLOAT_ (x, f_x) |
|
1680 |
SETWIN(aGLXWindowId) |
|
1681 |
scale(f_x, (float)0, (float)0); |
|
1682 |
RETURN (true); |
|
1683 |
%} |
|
1684 |
! |
|
1685 |
||
1686 |
glxScaleY:y in:aGLXWindowId |
|
1687 |
"scale in y direction" |
|
1688 |
||
1689 |
%{ /* NOCONTEXT */ |
|
1690 |
||
1691 |
float f_y; |
|
1692 |
||
1693 |
_FLOAT_ (y, f_y) |
|
1694 |
SETWIN(aGLXWindowId) |
|
1695 |
scale((float)0, f_y, (float)0); |
|
1696 |
RETURN (true); |
|
1697 |
%} |
|
1698 |
! |
|
1699 |
||
1700 |
glxScaleZ:z in:aGLXWindowId |
|
1701 |
"scale in z direction" |
|
1702 |
||
1703 |
%{ /* NOCONTEXT */ |
|
1704 |
||
1705 |
float f_z; |
|
1706 |
||
1707 |
_FLOAT_ (z, f_z) |
|
1708 |
SETWIN(aGLXWindowId) |
|
1709 |
scale((float)0, (float)0, f_z); |
|
1710 |
RETURN (true); |
|
1711 |
%} |
|
1712 |
! |
|
1713 |
||
12 | 1714 |
glxScaleX:x y:y z:z in:aGLXWindowId |
58 | 1715 |
"scale & mirror current matrix, given individual x, y and z values" |
0 | 1716 |
|
1717 |
%{ /* NOCONTEXT */ |
|
1718 |
||
1719 |
float f_x, f_y, f_z; |
|
1720 |
||
29 | 1721 |
_FLOAT_ (x, f_x) |
1722 |
_FLOAT_ (y, f_y) |
|
1723 |
_FLOAT_ (z, f_z) |
|
1724 |
SETWIN(aGLXWindowId) |
|
1725 |
scale(f_x, f_y, f_z); |
|
1726 |
RETURN (true); |
|
1727 |
%} |
|
24 | 1728 |
! |
1729 |
||
58 | 1730 |
glxScale:arrayOf3Floats in:aGLXWindowId |
1731 |
"scale current matrix, given a 3-element vector" |
|
1732 |
||
1733 |
%{ /* NOCONTEXT */ |
|
1734 |
||
1735 |
float vec[3], *v; |
|
1736 |
||
1737 |
if (! (v = getFloatsFromInto(arrayOf3Floats, vec, 3))) RETURN(false); |
|
1738 |
||
1739 |
SETWIN(aGLXWindowId) |
|
1740 |
scale(v[0], v[1], v[2]); |
|
1741 |
RETURN (true); |
|
1742 |
%} |
|
1743 |
! |
|
1744 |
||
24 | 1745 |
glxRotateX:angle in:aGLXWindowId |
58 | 1746 |
"rotate the current matrix on x axis. |
64 | 1747 |
The angle is in degrees." |
24 | 1748 |
|
1749 |
%{ /* NOCONTEXT */ |
|
1750 |
||
1751 |
SETWIN(aGLXWindowId) |
|
1752 |
RETURN (doRotate(angle, 'x')); |
|
1753 |
%} |
|
1754 |
! |
|
1755 |
||
1756 |
glxRotateY:angle in:aGLXWindowId |
|
58 | 1757 |
"rotate the current matrix on y axis. |
64 | 1758 |
The angle is in degrees." |
24 | 1759 |
|
1760 |
%{ /* NOCONTEXT */ |
|
1761 |
||
1762 |
SETWIN(aGLXWindowId) |
|
1763 |
RETURN (doRotate(angle, 'y')); |
|
1764 |
%} |
|
1765 |
! |
|
1766 |
||
1767 |
glxRotateZ:angle in:aGLXWindowId |
|
58 | 1768 |
"rotate the current matrix on z axis. |
64 | 1769 |
The angle is in degrees." |
24 | 1770 |
|
1771 |
%{ /* NOCONTEXT */ |
|
1772 |
||
1773 |
SETWIN(aGLXWindowId) |
|
1774 |
RETURN (doRotate(angle, 'z')); |
|
0 | 1775 |
%} |
1776 |
! |
|
1777 |
||
12 | 1778 |
glxRotate:angle axis:axis in:aGLXWindowId |
29 | 1779 |
"rotate the current matrix around the axis given by the axis arg, |
58 | 1780 |
which must be one of the symbols: #x, #y or #z. |
64 | 1781 |
The angle is in degrees." |
0 | 1782 |
|
1783 |
%{ /* NOCONTEXT */ |
|
1784 |
||
1785 |
char c_axis; |
|
1786 |
||
46 | 1787 |
if (axis == @symbol(x)) |
77 | 1788 |
c_axis = 'x'; |
46 | 1789 |
else if (axis == @symbol(y)) |
77 | 1790 |
c_axis = 'y'; |
46 | 1791 |
else if (axis == @symbol(z)) |
77 | 1792 |
c_axis = 'z'; |
29 | 1793 |
else { |
77 | 1794 |
RETURN (false); |
29 | 1795 |
} |
1796 |
||
1797 |
SETWIN(aGLXWindowId) |
|
1798 |
RETURN ( doRotate(angle, c_axis) ); |
|
1799 |
%} |
|
0 | 1800 |
! |
1801 |
||
24 | 1802 |
glxRotateX:xAngle y:yAngle z:zAngle in:aGLXWindowId |
58 | 1803 |
"rotate the current matrix on all axes, given individual x, y and z values. |
64 | 1804 |
The values are in degrees" |
24 | 1805 |
|
1806 |
%{ /* NOCONTEXT */ |
|
1807 |
||
1808 |
SETWIN(aGLXWindowId) |
|
1809 |
if ( doRotate(xAngle, 'x') == true) { |
|
77 | 1810 |
if ( doRotate(yAngle, 'y') == true) { |
1811 |
RETURN (doRotate(zAngle, 'z')); |
|
1812 |
} |
|
24 | 1813 |
} |
1814 |
%} |
|
1815 |
. |
|
1816 |
^ false |
|
1817 |
! |
|
1818 |
||
58 | 1819 |
glxRotate:arrayOf3Floats in:aGLXWindowId |
64 | 1820 |
"rotate current matrix, given a 3-element vector (or more). |
1821 |
The elements of the array are degrees." |
|
58 | 1822 |
|
1823 |
%{ /* NOCONTEXT */ |
|
1824 |
||
1825 |
float vec[3], *v; |
|
1826 |
||
1827 |
if (! (v = getFloatsFromInto(arrayOf3Floats, vec, 3))) RETURN(false); |
|
1828 |
||
1829 |
SETWIN(aGLXWindowId) |
|
1830 |
rot(v[0], 'x'); |
|
1831 |
rot(v[1], 'y'); |
|
1832 |
rot(v[2], 'z'); |
|
1833 |
RETURN (true); |
|
1834 |
%} |
|
1835 |
! |
|
1836 |
||
64 | 1837 |
glxRotateIX:angle in:aGLXWindowId |
1838 |
"rotate the current matrix on x axis. |
|
1839 |
The angle is an integer specifying tenths of a degree." |
|
1840 |
||
1841 |
%{ /* NOCONTEXT */ |
|
1842 |
||
97 | 1843 |
if (__isSmallInteger(angle)) { |
77 | 1844 |
SETWIN(aGLXWindowId) |
185 | 1845 |
rotate(__intVal(angle), 'x'); |
77 | 1846 |
RETURN (true); |
64 | 1847 |
} |
1848 |
%} |
|
1849 |
. |
|
1850 |
^ false |
|
1851 |
! |
|
1852 |
||
1853 |
glxRotateIY:angle in:aGLXWindowId |
|
1854 |
"rotate the current matrix on x axis. |
|
1855 |
The angle is an integer specifying tenths of a degree." |
|
1856 |
||
1857 |
%{ /* NOCONTEXT */ |
|
1858 |
||
97 | 1859 |
if (__isSmallInteger(angle)) { |
77 | 1860 |
SETWIN(aGLXWindowId) |
185 | 1861 |
rotate(__intVal(angle), 'y'); |
77 | 1862 |
RETURN (true); |
64 | 1863 |
} |
1864 |
%} |
|
1865 |
. |
|
1866 |
^ false |
|
1867 |
! |
|
1868 |
||
1869 |
glxRotateIZ:angle in:aGLXWindowId |
|
1870 |
"rotate the current matrix on x axis. |
|
1871 |
The angle is an integer specifying tenths of a degree." |
|
1872 |
||
1873 |
%{ /* NOCONTEXT */ |
|
1874 |
||
97 | 1875 |
if (__isSmallInteger(angle)) { |
77 | 1876 |
SETWIN(aGLXWindowId) |
185 | 1877 |
rotate(__intVal(angle), 'z'); |
77 | 1878 |
RETURN (true); |
64 | 1879 |
} |
1880 |
%} |
|
1881 |
. |
|
1882 |
^ false |
|
0 | 1883 |
! |
1884 |
||
64 | 1885 |
glxRotateI:angle axis:axis in:aGLXWindowId |
1886 |
"rotate the current matrix around the axis given by the axis arg, |
|
1887 |
which must be one of the symbols: #x, #y or #z. |
|
1888 |
The angle is an integer specifying tenths of a degree." |
|
1889 |
||
1890 |
%{ /* NOCONTEXT */ |
|
1891 |
||
1892 |
char c_axis; |
|
1893 |
||
1894 |
if (axis == @symbol(x)) |
|
77 | 1895 |
c_axis = 'x'; |
64 | 1896 |
else if (axis == @symbol(y)) |
77 | 1897 |
c_axis = 'y'; |
64 | 1898 |
else if (axis == @symbol(z)) |
77 | 1899 |
c_axis = 'z'; |
64 | 1900 |
else { |
77 | 1901 |
RETURN (false); |
64 | 1902 |
} |
1903 |
||
97 | 1904 |
if (__isSmallInteger(angle)) { |
77 | 1905 |
SETWIN(aGLXWindowId) |
185 | 1906 |
rotate(__intVal(angle), c_axis); |
77 | 1907 |
RETURN (true); |
64 | 1908 |
} |
1909 |
%} |
|
1910 |
. |
|
1911 |
^ false |
|
1912 |
! |
|
1913 |
||
1914 |
glxRotateIX:xAngle y:yAngle z:zAngle in:aGLXWindowId |
|
1915 |
"rotate the current matrix on all axes, given individual x, y and z values. |
|
1916 |
The values are integers specifying tenths of a degree." |
|
1917 |
||
1918 |
%{ /* NOCONTEXT */ |
|
1919 |
||
97 | 1920 |
if (__bothSmallInteger(xAngle, yAngle) |
1921 |
&& __isSmallInteger(zAngle)) { |
|
77 | 1922 |
SETWIN(aGLXWindowId) |
185 | 1923 |
rotate(__intVal(xAngle), 'x'); |
1924 |
rotate(__intVal(yAngle), 'y'); |
|
1925 |
rotate(__intVal(zAngle), 'z'); |
|
77 | 1926 |
RETURN (true); |
64 | 1927 |
} |
1928 |
%} |
|
1929 |
. |
|
1930 |
^ false |
|
1931 |
! ! |
|
1932 |
||
1933 |
!GLXWorkstation methodsFor:'materials & lights'! |
|
1934 |
||
12 | 1935 |
glxLmdef:what index:index np:np props:props in:aGLXWindowId |
0 | 1936 |
"define a material, light source or lighting model; |
89 | 1937 |
what must be one of #material, #light or #lightModel. |
29 | 1938 |
props must be a FloatArray or a subclass of FloatArray" |
0 | 1939 |
|
1940 |
%{ /* NOCONTEXT */ |
|
1941 |
#ifdef GLX |
|
1942 |
short defType; |
|
1943 |
short i_index, i_np; |
|
1944 |
extern OBJ FloatArray; |
|
1945 |
float *fp; |
|
29 | 1946 |
OBJ cls; |
1947 |
int ninstVars, nInstBytes; |
|
1948 |
||
46 | 1949 |
if (what == @symbol(material)) |
77 | 1950 |
defType = DEFMATERIAL; |
46 | 1951 |
else if (what == @symbol(light)) |
77 | 1952 |
defType = DEFLIGHT; |
46 | 1953 |
else if (what == @symbol(lightModel)) |
77 | 1954 |
defType = DEFLMODEL; |
29 | 1955 |
else { |
77 | 1956 |
RETURN (false); |
29 | 1957 |
} |
1958 |
||
1959 |
_INT_ (index, i_index); |
|
1960 |
_INT_ (np, i_np); |
|
1961 |
||
1962 |
if (! _isNonNilObject(props)) fp = NULL; |
|
1963 |
else { |
|
134 | 1964 |
cls = __qClass(props); |
77 | 1965 |
if (cls == FloatArray) |
1966 |
fp = _FloatArrayInstPtr(props)->f_element; |
|
1967 |
else { |
|
185 | 1968 |
if ((__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) == FLOATARRAY) { |
1969 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
|
77 | 1970 |
fp = (float *) &(_InstPtr(props)->i_instvars[ninstVars]); |
1971 |
} else { |
|
1972 |
RETURN (false); |
|
1973 |
} |
|
1974 |
} |
|
29 | 1975 |
} |
1976 |
SETWIN(aGLXWindowId) |
|
1977 |
lmdef(defType, i_index, i_np, fp); |
|
1978 |
RETURN (true); |
|
0 | 1979 |
#endif |
1980 |
%} |
|
1981 |
. |
|
1982 |
^ false |
|
1983 |
! |
|
1984 |
||
12 | 1985 |
glxLmbind:target index:index in:aGLXWindowId |
89 | 1986 |
"select a material, light or lighting model. |
1987 |
target must be a symbol from: #material, #backMaterial, |
|
1988 |
#light0-light7 or #lightModel." |
|
0 | 1989 |
|
1990 |
%{ /* NOCONTEXT */ |
|
1991 |
#ifdef GLX |
|
1992 |
short defType; |
|
1993 |
short i_index; |
|
1994 |
||
46 | 1995 |
if (target == @symbol(material)) |
77 | 1996 |
defType = MATERIAL; |
46 | 1997 |
else if (target == @symbol(backMaterial)) |
77 | 1998 |
defType = BACKMATERIAL; |
46 | 1999 |
else if (target == @symbol(light0)) |
77 | 2000 |
defType = LIGHT0; |
46 | 2001 |
else if (target == @symbol(light1)) |
77 | 2002 |
defType = LIGHT1; |
46 | 2003 |
else if (target == @symbol(light2)) |
77 | 2004 |
defType = LIGHT2; |
46 | 2005 |
else if (target == @symbol(light3)) |
77 | 2006 |
defType = LIGHT3; |
46 | 2007 |
else if (target == @symbol(light4)) |
77 | 2008 |
defType = LIGHT4; |
46 | 2009 |
else if (target == @symbol(light5)) |
77 | 2010 |
defType = LIGHT5; |
46 | 2011 |
else if (target == @symbol(light6)) |
77 | 2012 |
defType = LIGHT6; |
46 | 2013 |
else if (target == @symbol(light7)) |
77 | 2014 |
defType = LIGHT7; |
46 | 2015 |
else if (target == @symbol(lightModel)) |
77 | 2016 |
defType = LMODEL; |
29 | 2017 |
else { |
77 | 2018 |
RETURN (false); |
29 | 2019 |
} |
2020 |
||
2021 |
_INT_ (index, i_index); |
|
2022 |
SETWIN(aGLXWindowId) |
|
2023 |
lmbind(defType, i_index); |
|
2024 |
RETURN (true); |
|
0 | 2025 |
#endif |
2026 |
%} |
|
2027 |
. |
|
2028 |
^ false |
|
89 | 2029 |
! |
2030 |
||
2031 |
glxTexDef2d:index nc:nc width:w height:h bits:image np:np props:props in:aGLXWindowId |
|
2032 |
"define a 2D texture. index is the 'name' of the texture; |
|
2033 |
nc is the number of components (1-4) per pixel; |
|
2034 |
w/h define the size of the texture; bits is a byteArray containing the |
|
2035 |
long-word aligned pixel data; np is the number of props found in |
|
2036 |
the floatArray props. Props must be delimited by a 0.0 entry." |
|
2037 |
||
2038 |
%{ /* NOCONTEXT */ |
|
2039 |
#ifdef GLX |
|
2040 |
unsigned char *cp; |
|
2041 |
const float *fp; |
|
2042 |
OBJ cls; |
|
2043 |
float fbuff[30]; |
|
2044 |
||
2045 |
if (__isByteArray(image)) { |
|
2046 |
cp = _ByteArrayInstPtr(image)->ba_element; |
|
2047 |
fp = getFloatsFromFloatArrayInto(props, fbuff); |
|
2048 |
||
2049 |
SETWIN(aGLXWindowId) |
|
185 | 2050 |
texdef2d(__intVal(index), __intVal(nc), __intVal(w), __intVal(h), |
2051 |
(const unsigned long *)cp, __intVal(np), fp); |
|
89 | 2052 |
RETURN (true); |
2053 |
} |
|
2054 |
#endif |
|
2055 |
%} |
|
2056 |
. |
|
2057 |
^ false |
|
2058 |
! |
|
2059 |
||
2060 |
glxTexDef3d:index nc:nc width:w height:h depth:d bits:image np:np props:props in:aGLXWindowId |
|
2061 |
"define a 3D texture. index is the 'name' of the texture; |
|
2062 |
nc is the number of components (1-4) per pixel; |
|
2063 |
w/h/d define the size of the texture; bits is a byteArray containing the |
|
2064 |
long-word aligned pixel data; np is the number of props found in |
|
2065 |
the floatArray props. Props must be delimited by a 0.0 entry." |
|
2066 |
||
2067 |
%{ /* NOCONTEXT */ |
|
2068 |
#ifdef GLX |
|
2069 |
unsigned char *cp; |
|
2070 |
const float *fp; |
|
2071 |
OBJ cls; |
|
2072 |
float fbuff[30]; |
|
2073 |
||
2074 |
if (__isByteArray(image)) { |
|
2075 |
cp = _ByteArrayInstPtr(image)->ba_element; |
|
2076 |
fp = getFloatsFromFloatArrayInto(props, fbuff); |
|
2077 |
||
2078 |
SETWIN(aGLXWindowId) |
|
185 | 2079 |
texdef3d(__intVal(index), __intVal(nc), __intVal(w), __intVal(h), |
2080 |
__intVal(d), |
|
2081 |
(const unsigned long *)cp, __intVal(np), fp); |
|
89 | 2082 |
RETURN (true); |
2083 |
} |
|
2084 |
#endif |
|
2085 |
%} |
|
2086 |
. |
|
2087 |
^ false |
|
2088 |
! |
|
2089 |
||
2090 |
glxTevdef:index np:np props:props in:aGLXWindowId |
|
2091 |
||
2092 |
%{ /* NOCONTEXT */ |
|
2093 |
#ifdef GLX |
|
2094 |
const float *fp; |
|
2095 |
float fbuff[30]; |
|
2096 |
||
2097 |
SETWIN(aGLXWindowId) |
|
2098 |
fp = getFloatsFromFloatArrayInto(props, fbuff); |
|
185 | 2099 |
tevdef(__intVal(index), __intVal(np), fp); |
89 | 2100 |
RETURN (true); |
2101 |
#endif |
|
2102 |
%} |
|
2103 |
. |
|
2104 |
^ false |
|
2105 |
! |
|
2106 |
||
2107 |
glxTevbind:target index:index in:aGLXWindowId |
|
2108 |
"bind a texture environment; target must be 0 |
|
2109 |
or the symbol #env0." |
|
2110 |
||
2111 |
%{ /* NOCONTEXT */ |
|
2112 |
#ifdef GLX |
|
2113 |
long t; |
|
2114 |
||
97 | 2115 |
if (__isSmallInteger(target)) { |
185 | 2116 |
t = __intVal(target); |
89 | 2117 |
} else { |
2118 |
if (target == @symbol(env0)) { |
|
2119 |
t = TV_ENV0; |
|
2120 |
} else { |
|
2121 |
RETURN (false); |
|
2122 |
} |
|
2123 |
} |
|
2124 |
SETWIN(aGLXWindowId) |
|
185 | 2125 |
tevbind(t, __intVal(index)); |
89 | 2126 |
RETURN (true); |
2127 |
#endif |
|
2128 |
%} |
|
2129 |
. |
|
2130 |
^ false |
|
2131 |
! |
|
2132 |
||
2133 |
glxTexbind:target index:index in:aGLXWindowId |
|
2134 |
"bind a texture; target must be an integer or one |
|
2135 |
of the symbols #texture0, #textureDetail or #textureIdle." |
|
2136 |
||
2137 |
%{ /* NOCONTEXT */ |
|
2138 |
#ifdef GLX |
|
2139 |
long t; |
|
2140 |
||
97 | 2141 |
if (__isSmallInteger(target)) { |
185 | 2142 |
t = __intVal(target); |
89 | 2143 |
} else { |
2144 |
if (target == @symbol(texture0)) { |
|
2145 |
t = TX_TEXTURE_0; |
|
2146 |
} else if (target == @symbol(textureDetail)) { |
|
2147 |
t = TX_TEXTURE_DETAIL; |
|
2148 |
} else if (target == @symbol(textureIdle)) { |
|
2149 |
t = TX_TEXTURE_IDLE; |
|
2150 |
} else { |
|
2151 |
RETURN (false); |
|
2152 |
} |
|
2153 |
} |
|
2154 |
SETWIN(aGLXWindowId) |
|
185 | 2155 |
texbind(t, __intVal(index)); |
89 | 2156 |
RETURN (true); |
2157 |
#endif |
|
2158 |
%} |
|
2159 |
. |
|
2160 |
^ false |
|
64 | 2161 |
! ! |
2162 |
||
2163 |
!GLXWorkstation methodsFor:'color'! |
|
0 | 2164 |
|
12 | 2165 |
glxColor:index in:aGLXWindowId |
0 | 2166 |
"set color, for non gouraud shading, we dont care if the |
2167 |
argument is integer or float; otherwise, better results are |
|
2168 |
expected with float values." |
|
2169 |
||
2170 |
%{ /* NOCONTEXT */ |
|
2171 |
||
12 | 2172 |
SETWIN(aGLXWindowId) |
97 | 2173 |
if (__isSmallInteger(index)) { |
185 | 2174 |
color((Colorindex)(__intVal(index))); |
77 | 2175 |
RETURN (true); |
0 | 2176 |
} |
35 | 2177 |
if (__isFloat(index)) { |
77 | 2178 |
colorf((float)(_floatVal(index))); |
2179 |
RETURN (true); |
|
0 | 2180 |
} |
2181 |
%} |
|
2182 |
. |
|
2183 |
^ false |
|
2184 |
! |
|
2185 |
||
12 | 2186 |
glxColorRed:r green:g blue:b in:aGLXWindowId |
89 | 2187 |
"set color, args must be integer values in 0..255" |
12 | 2188 |
|
2189 |
%{ /* NOCONTEXT */ |
|
29 | 2190 |
|
12 | 2191 |
#ifdef GLX |
2192 |
short s_r, s_g, s_b; |
|
2193 |
||
29 | 2194 |
_INT_(r, s_r); |
2195 |
_INT_(g, s_g); |
|
2196 |
_INT_(b, s_b); |
|
2197 |
SETWIN(aGLXWindowId) |
|
2198 |
RGBcolor(s_r, s_g, s_b); |
|
2199 |
RETURN (true); |
|
12 | 2200 |
#endif |
2201 |
%} |
|
2202 |
. |
|
2203 |
^ false |
|
89 | 2204 |
! |
2205 |
||
2206 |
glxColorRed:r green:g blue:b alpha:a in:aGLXWindowId |
|
2207 |
"set color including alpha value, args must be integer values within 0..255" |
|
2208 |
||
2209 |
%{ /* NOCONTEXT */ |
|
2210 |
||
2211 |
#ifdef GLX |
|
2212 |
short s_r, s_g, s_b, s_a; |
|
2213 |
||
2214 |
_INT_(r, s_r); |
|
2215 |
_INT_(g, s_g); |
|
2216 |
_INT_(b, s_b); |
|
2217 |
_INT_(a, s_a); |
|
2218 |
SETWIN(aGLXWindowId) |
|
2219 |
cpack((((((s_a<<8) | s_b) << 8) | s_g) << 8) | s_r); |
|
2220 |
RETURN (true); |
|
2221 |
#endif |
|
2222 |
%} |
|
2223 |
. |
|
2224 |
^ false |
|
127 | 2225 |
! |
2226 |
||
2227 |
glxTextcolor: tcolor in: aGLXWindowId |
|
2228 |
||
2229 |
%{ /* NOCONTEXT */ |
|
2230 |
#ifdef GLX |
|
2231 |
SETWIN(aGLXWindowId) |
|
2232 |
textcolor(_colorindexVal(tcolor)); |
|
2233 |
RETURN (true); |
|
2234 |
#endif |
|
2235 |
%} |
|
2236 |
. |
|
2237 |
^ false |
|
64 | 2238 |
! ! |
2239 |
||
2240 |
!GLXWorkstation methodsFor:'clearing'! |
|
12 | 2241 |
|
2242 |
glxClearIn:aGLXWindowId |
|
0 | 2243 |
"clear to current color" |
2244 |
||
2245 |
%{ /* NOCONTEXT */ |
|
12 | 2246 |
SETWIN(aGLXWindowId) |
0 | 2247 |
clear(); |
2248 |
RETURN (true); |
|
2249 |
%} |
|
2250 |
! |
|
2251 |
||
12 | 2252 |
glxZClearIn:aGLXWindowId |
0 | 2253 |
"clear z buffer" |
2254 |
||
2255 |
%{ /* NOCONTEXT */ |
|
2256 |
#ifdef GLX |
|
12 | 2257 |
SETWIN(aGLXWindowId) |
0 | 2258 |
zclear(); |
2259 |
RETURN (true); |
|
2260 |
#endif |
|
2261 |
%} |
|
2262 |
. |
|
2263 |
^ false |
|
89 | 2264 |
! |
2265 |
||
2266 |
glxCzclearCval:cval zval:zval in:aGLXWindowId |
|
2267 |
"clear to a color (cval) and clear z buffer to zval simultaniously" |
|
2268 |
||
2269 |
%{ /* NOCONTEXT */ |
|
2270 |
#ifdef GLX |
|
2271 |
SETWIN(aGLXWindowId) |
|
185 | 2272 |
czclear((ulong)__intVal(cval), __intVal(zval)); |
89 | 2273 |
RETURN (true); |
2274 |
#endif |
|
2275 |
%} |
|
2276 |
. |
|
2277 |
^ false |
|
64 | 2278 |
! ! |
2279 |
||
2280 |
!GLXWorkstation methodsFor:'matrix stack'! |
|
0 | 2281 |
|
12 | 2282 |
glxPushmatrixIn:aGLXWindowId |
0 | 2283 |
"push down transformation stack" |
2284 |
||
2285 |
%{ /* NOCONTEXT */ |
|
12 | 2286 |
SETWIN(aGLXWindowId) |
0 | 2287 |
pushmatrix(); |
2288 |
RETURN (true); |
|
2289 |
%} |
|
2290 |
! |
|
2291 |
||
12 | 2292 |
glxPopmatrixIn:aGLXWindowId |
0 | 2293 |
"pop transformation stack" |
2294 |
||
2295 |
%{ /* NOCONTEXT */ |
|
12 | 2296 |
SETWIN(aGLXWindowId) |
0 | 2297 |
popmatrix(); |
2298 |
RETURN (true); |
|
2299 |
%} |
|
2300 |
! |
|
2301 |
||
64 | 2302 |
glxGetMatrix:arrayOf16Floats in:aGLXWindowId |
2303 |
"argument must be an array (a matrix) of 16 floats. The current matrix |
|
2304 |
will be stored into that." |
|
2305 |
||
2306 |
%{ /* NOCONTEXT */ |
|
2307 |
Matrix matrix; |
|
2308 |
||
2309 |
SETWIN(aGLXWindowId) |
|
2310 |
getmatrix(matrix); |
|
2311 |
if (! putFloatsFromInto(matrix, arrayOf16Floats, 16)) RETURN(false); |
|
2312 |
%} |
|
2313 |
. |
|
2314 |
^ true |
|
2315 |
! |
|
2316 |
||
2317 |
glxLoadMatrix:arrayOf16Floats in:aGLXWindowId |
|
2318 |
"argument must be an array(a matrix) of 16 floats. The current matrix |
|
2319 |
will be loaded from that." |
|
2320 |
||
2321 |
%{ /* NOCONTEXT */ |
|
2322 |
Matrix matrix; |
|
2323 |
Matrix *m; |
|
2324 |
||
2325 |
if (! (m = getFloatsFromMatrixInto(arrayOf16Floats, &matrix))) RETURN (false); |
|
2326 |
SETWIN(aGLXWindowId) |
|
2327 |
loadmatrix(*m); |
|
2328 |
RETURN (true); |
|
2329 |
%} |
|
2330 |
! |
|
2331 |
||
2332 |
glxMultMatrix:arrayOf16Floats in:aGLXWindowId |
|
2333 |
"argument must be an array(a matrix) of 16 floats containing a |
|
2334 |
matrix to multiply into the current matrix." |
|
2335 |
||
2336 |
%{ /* NOCONTEXT */ |
|
2337 |
Matrix matrix; |
|
2338 |
Matrix *m; |
|
2339 |
||
2340 |
if (! (m = getFloatsFromMatrixInto(arrayOf16Floats, &matrix))) RETURN (false); |
|
2341 |
SETWIN(aGLXWindowId) |
|
2342 |
multmatrix(*m); |
|
2343 |
RETURN (true); |
|
2344 |
%} |
|
2345 |
! ! |
|
2346 |
||
127 | 2347 |
!GLXWorkstation methodsFor:'video and planes'! |
2348 |
||
2349 |
glxStereobufferIn: aGLXWindowId |
|
2350 |
||
2351 |
%{ /* NOCONTEXT */ |
|
2352 |
#ifdef FULL_GLX |
|
2353 |
SETWIN(aGLXWindowId) |
|
2354 |
stereobuffer(); |
|
2355 |
RETURN (true); |
|
2356 |
#endif |
|
2357 |
%} |
|
2358 |
. |
|
2359 |
^ false |
|
2360 |
! |
|
2361 |
||
2362 |
glxUnderlay: planes in: aGLXWindowId |
|
2363 |
||
2364 |
%{ /* NOCONTEXT */ |
|
2365 |
#ifdef GLX |
|
2366 |
SETWIN(aGLXWindowId) |
|
2367 |
underlay(_longVal(planes)); |
|
2368 |
RETURN (true); |
|
2369 |
#endif |
|
2370 |
%} |
|
2371 |
. |
|
2372 |
^ false |
|
2373 |
! |
|
2374 |
||
2375 |
glxOverlayPlanes: planes in: aGLXWindowId |
|
2376 |
||
2377 |
%{ /* NOCONTEXT */ |
|
2378 |
#ifdef GLX |
|
2379 |
SETWIN(aGLXWindowId) |
|
2380 |
overlay(_longVal(planes)); |
|
2381 |
RETURN (true); |
|
2382 |
#endif |
|
2383 |
%} |
|
2384 |
. |
|
2385 |
^ false |
|
2386 |
! |
|
2387 |
||
2388 |
glxVideocmd:cmd in:aGLXWindowId |
|
2389 |
||
2390 |
%{ /* NOCONTEXT */ |
|
2391 |
#ifdef GLX |
|
2392 |
SETWIN(aGLXWindowId) |
|
2393 |
videocmd(_longVal(cmd)); |
|
2394 |
RETURN (true); |
|
2395 |
#endif |
|
2396 |
%} |
|
2397 |
. |
|
2398 |
^ false |
|
2399 |
! ! |
|
2400 |
||
64 | 2401 |
!GLXWorkstation methodsFor:'double buffering'! |
2402 |
||
2403 |
glxDoubleBufferIn:aGLXWindowId |
|
2404 |
"set double buffer mode" |
|
2405 |
||
2406 |
%{ /* NOCONTEXT */ |
|
2407 |
SETWIN(aGLXWindowId) |
|
2408 |
doublebuffer(); |
|
2409 |
RETURN (true); |
|
2410 |
%} |
|
89 | 2411 |
! |
2412 |
||
2413 |
glxSingleBufferIn: aGLXWindowId |
|
2414 |
"set single buffer mode" |
|
2415 |
||
2416 |
%{ /* NOCONTEXT */ |
|
2417 |
SETWIN(aGLXWindowId) |
|
2418 |
singlebuffer(); |
|
2419 |
RETURN (true); |
|
2420 |
%} |
|
64 | 2421 |
! |
2422 |
||
12 | 2423 |
glxSwapBuffersIn:aGLXWindowId |
0 | 2424 |
"swap double buffers" |
2425 |
||
2426 |
%{ /* NOCONTEXT */ |
|
12 | 2427 |
SETWIN(aGLXWindowId) |
0 | 2428 |
swapbuffers(); |
2429 |
RETURN (true); |
|
24 | 2430 |
%} |
2431 |
! |
|
2432 |
||
64 | 2433 |
glxFrontBufferIn:aGLXWindowId |
2434 |
"switch to front buffer - turning backbuffer off" |
|
2435 |
||
2436 |
%{ /* NOCONTEXT */ |
|
2437 |
SETWIN(aGLXWindowId) |
|
2438 |
#ifdef GLX |
|
2439 |
backbuffer(FALSE); |
|
2440 |
#endif |
|
2441 |
frontbuffer(TRUE); |
|
2442 |
RETURN (true); |
|
2443 |
%} |
|
2444 |
! |
|
2445 |
||
2446 |
glxBackBufferIn:aGLXWindowId |
|
2447 |
"switch to back buffer - turning frontbuffer off" |
|
2448 |
||
2449 |
%{ /* NOCONTEXT */ |
|
2450 |
SETWIN(aGLXWindowId) |
|
2451 |
#ifdef GLX |
|
2452 |
frontbuffer(FALSE); |
|
2453 |
#endif |
|
2454 |
backbuffer(TRUE); |
|
2455 |
RETURN (true); |
|
2456 |
%} |
|
2457 |
! |
|
2458 |
||
2459 |
glxBackbuffer: b in: aGLXWindowId |
|
2460 |
||
2461 |
%{ /* NOCONTEXT */ |
|
2462 |
SETWIN(aGLXWindowId) |
|
2463 |
backbuffer(_booleanVal(b)); |
|
2464 |
RETURN (true); |
|
2465 |
%} |
|
2466 |
! |
|
2467 |
||
2468 |
glxFrontbuffer: b in: aGLXWindowId |
|
2469 |
||
2470 |
%{ /* NOCONTEXT */ |
|
2471 |
SETWIN(aGLXWindowId) |
|
2472 |
frontbuffer(_booleanVal(b)); |
|
2473 |
RETURN (true); |
|
2474 |
%} |
|
2475 |
! ! |
|
2476 |
||
2477 |
!GLXWorkstation methodsFor:'zbuffer'! |
|
2478 |
||
2479 |
glxZbuffer:aBoolean in:aGLXWindowId |
|
2480 |
"enable/disable z-buffer operation" |
|
2481 |
||
2482 |
%{ /* NOCONTEXT */ |
|
2483 |
#ifdef GLX |
|
2484 |
SETWIN(aGLXWindowId) |
|
2485 |
zbuffer(aBoolean == false ? FALSE : TRUE); |
|
2486 |
RETURN (true); |
|
2487 |
#endif |
|
2488 |
%} |
|
2489 |
. |
|
2490 |
^ false |
|
2491 |
! |
|
2492 |
||
2493 |
glxZbsize: planes in: aGLXWindowId |
|
2494 |
||
2495 |
%{ /* NOCONTEXT */ |
|
2496 |
#ifdef FULL_GLX |
|
2497 |
SETWIN(aGLXWindowId) |
|
2498 |
zbsize(_longVal(planes)); |
|
2499 |
RETURN (true); |
|
2500 |
#endif |
|
2501 |
%} |
|
2502 |
. |
|
2503 |
^ false |
|
2504 |
! |
|
2505 |
||
2506 |
glxZdraw: b in: aGLXWindowId |
|
2507 |
"enable/disable drawing into the z-buffer" |
|
2508 |
||
2509 |
%{ /* NOCONTEXT */ |
|
2510 |
#ifdef GLX |
|
2511 |
SETWIN(aGLXWindowId) |
|
2512 |
zdraw(_booleanVal(b)); |
|
2513 |
RETURN (true); |
|
2514 |
#endif |
|
2515 |
%} |
|
2516 |
. |
|
2517 |
^ false |
|
2518 |
! |
|
2519 |
||
2520 |
glxZfunction: func in: aGLXWindowId |
|
2521 |
"set the z-buffer comparison function. |
|
2522 |
func may be either the numeric value or a symbol (preferred)" |
|
2523 |
||
2524 |
%{ /* NOCONTEXT */ |
|
2525 |
#ifdef GLX |
|
2526 |
long f; |
|
2527 |
||
2528 |
SETWIN(aGLXWindowId) |
|
2529 |
if (func == @symbol(NEVER)) |
|
77 | 2530 |
f = ZF_NEVER; |
64 | 2531 |
else if (func == @symbol(LESS)) |
77 | 2532 |
f = ZF_LESS; |
64 | 2533 |
else if (func == @symbol(EQUAL)) |
77 | 2534 |
f = ZF_EQUAL; |
64 | 2535 |
else if (func == @symbol(LEQUAL)) |
77 | 2536 |
f = ZF_LEQUAL; |
64 | 2537 |
else if (func == @symbol(GREATER)) |
77 | 2538 |
f = ZF_GREATER; |
64 | 2539 |
else if (func == @symbol(NOTEQUAL)) |
77 | 2540 |
f = ZF_NOTEQUAL; |
64 | 2541 |
else if (func == @symbol(GEQUAL)) |
77 | 2542 |
f = ZF_GEQUAL; |
64 | 2543 |
else if (func == @symbol(ALWAYS)) |
77 | 2544 |
f = ZF_ALWAYS; |
64 | 2545 |
else |
77 | 2546 |
f = _longVal(func); |
64 | 2547 |
zfunction(f); |
2548 |
RETURN (true); |
|
2549 |
#endif |
|
2550 |
%} |
|
2551 |
. |
|
2552 |
^ false |
|
2553 |
! |
|
2554 |
||
2555 |
glxZsource: src in: aGLXWindowId |
|
2556 |
||
2557 |
%{ /* NOCONTEXT */ |
|
2558 |
#ifdef GLX |
|
2559 |
SETWIN(aGLXWindowId) |
|
2560 |
zsource(_longVal(src)); |
|
2561 |
RETURN (true); |
|
2562 |
#endif |
|
2563 |
%} |
|
2564 |
. |
|
2565 |
^ false |
|
2566 |
! |
|
2567 |
||
2568 |
glxZwritemask: mask in: aGLXWindowId |
|
2569 |
||
2570 |
%{ /* NOCONTEXT */ |
|
2571 |
#ifdef GLX |
|
2572 |
SETWIN(aGLXWindowId) |
|
185 | 2573 |
zwritemask((ulong)__intVal(mask)); |
64 | 2574 |
RETURN (true); |
2575 |
#endif |
|
2576 |
%} |
|
2577 |
. |
|
2578 |
^ false |
|
2579 |
! ! |
|
2580 |
||
2581 |
!GLXWorkstation methodsFor:'misc'! |
|
2582 |
||
12 | 2583 |
glxRGBmodeIn:aGLXWindowId |
0 | 2584 |
"set true color mode (no colormap)" |
2585 |
||
2586 |
%{ /* NOCONTEXT */ |
|
2587 |
#ifdef GLX |
|
12 | 2588 |
SETWIN(aGLXWindowId) |
0 | 2589 |
RGBmode(); |
2590 |
RETURN (true); |
|
2591 |
#endif |
|
2592 |
%} |
|
2593 |
. |
|
2594 |
^ false |
|
2595 |
! |
|
2596 |
||
12 | 2597 |
glxGconfigIn:aGLXWindowId |
0 | 2598 |
"must be sent after RGBmode, doubleBuffer etc. to have these |
29 | 2599 |
changes really take effect. See GLX manual. |
2600 |
(Actually, it seems to be not allowed - I dont really know)" |
|
0 | 2601 |
|
2602 |
%{ /* NOCONTEXT */ |
|
12 | 2603 |
SETWIN(aGLXWindowId) |
0 | 2604 |
gconfig(); |
2605 |
RETURN (true); |
|
2606 |
%} |
|
2607 |
! |
|
2608 |
||
12 | 2609 |
glxNmode:aSymbol in:aGLXWindowId |
2610 |
"set normalize mode: #auto, #normalize" |
|
2611 |
||
46 | 2612 |
%{ /* NOCONTEXT */ |
2613 |
#ifdef GLX |
|
2614 |
if (aSymbol == @symbol(auto)) { |
|
77 | 2615 |
nmode(NAUTO); |
2616 |
RETURN (true); |
|
12 | 2617 |
} |
46 | 2618 |
if (aSymbol == @symbol(normalize)) { |
77 | 2619 |
nmode(NNORMALIZE); |
2620 |
RETURN (true); |
|
12 | 2621 |
} |
2622 |
#endif |
|
2623 |
%} |
|
2624 |
. |
|
2625 |
^ false |
|
2626 |
! |
|
2627 |
||
2628 |
glxMmode:aSymbol in:aGLXWindowId |
|
0 | 2629 |
"set matrix mode: #single, #viewing, #projection or #texture" |
2630 |
||
46 | 2631 |
%{ /* NOCONTEXT */ |
2632 |
#ifdef GLX |
|
2633 |
if (aSymbol == @symbol(single)) { |
|
77 | 2634 |
mmode(MSINGLE); |
2635 |
RETURN (true); |
|
0 | 2636 |
} |
46 | 2637 |
if (aSymbol == @symbol(viewing)) { |
77 | 2638 |
mmode(MVIEWING); |
2639 |
RETURN (true); |
|
0 | 2640 |
} |
46 | 2641 |
if (aSymbol == @symbol(projection)) { |
77 | 2642 |
mmode(MPROJECTION); |
2643 |
RETURN (true); |
|
0 | 2644 |
} |
46 | 2645 |
if (aSymbol == @symbol(texture)) { |
77 | 2646 |
mmode(MTEXTURE); |
2647 |
RETURN (true); |
|
0 | 2648 |
} |
2649 |
#endif |
|
2650 |
%} |
|
2651 |
. |
|
2652 |
^ false |
|
64 | 2653 |
! ! |
2654 |
||
2655 |
!GLXWorkstation methodsFor:'flat drawing'! |
|
0 | 2656 |
|
12 | 2657 |
glxBeginPointIn:aGLXWindowId |
2658 |
"start a point-group" |
|
2659 |
||
2660 |
%{ /* NOCONTEXT */ |
|
2661 |
SETWIN(aGLXWindowId) |
|
2662 |
bgnpoint(); |
|
2663 |
RETURN (true); |
|
2664 |
%} |
|
2665 |
! |
|
2666 |
||
2667 |
glxEndPointIn:aGLXWindowId |
|
2668 |
"end a point group" |
|
2669 |
||
2670 |
%{ /* NOCONTEXT */ |
|
2671 |
SETWIN(aGLXWindowId) |
|
2672 |
endpoint(); |
|
2673 |
RETURN (true); |
|
2674 |
%} |
|
2675 |
! |
|
2676 |
||
24 | 2677 |
glxBeginClosedLineIn:aGLXWindowId |
12 | 2678 |
"start a closed line" |
2679 |
||
2680 |
%{ /* NOCONTEXT */ |
|
2681 |
SETWIN(aGLXWindowId) |
|
2682 |
bgnclosedline(); |
|
2683 |
RETURN (true); |
|
2684 |
%} |
|
2685 |
! |
|
2686 |
||
2687 |
glxEndClosedLineIn:aGLXWindowId |
|
2688 |
"end a closed line" |
|
2689 |
||
2690 |
%{ /* NOCONTEXT */ |
|
2691 |
SETWIN(aGLXWindowId) |
|
2692 |
endclosedline(); |
|
2693 |
RETURN (true); |
|
2694 |
%} |
|
2695 |
! |
|
2696 |
||
2697 |
glxBeginLineIn:aGLXWindowId |
|
2698 |
"start a line group" |
|
2699 |
||
2700 |
%{ /* NOCONTEXT */ |
|
2701 |
SETWIN(aGLXWindowId) |
|
2702 |
bgnline(); |
|
2703 |
RETURN (true); |
|
2704 |
%} |
|
2705 |
! |
|
2706 |
||
2707 |
glxEndLineIn:aGLXWindowId |
|
2708 |
"end a line group" |
|
2709 |
||
2710 |
%{ /* NOCONTEXT */ |
|
2711 |
SETWIN(aGLXWindowId) |
|
2712 |
endline(); |
|
2713 |
RETURN (true); |
|
2714 |
%} |
|
2715 |
! |
|
2716 |
||
64 | 2717 |
glxBeginPolygonIn:aGLXWindowId |
2718 |
"start a polygon" |
|
2719 |
||
2720 |
%{ /* NOCONTEXT */ |
|
2721 |
SETWIN(aGLXWindowId) |
|
2722 |
bgnpolygon(); |
|
2723 |
RETURN (true); |
|
2724 |
%} |
|
2725 |
! |
|
2726 |
||
2727 |
glxEndPolygonIn:aGLXWindowId |
|
2728 |
"end a polygon" |
|
2729 |
||
2730 |
%{ /* NOCONTEXT */ |
|
2731 |
SETWIN(aGLXWindowId) |
|
2732 |
endpolygon(); |
|
2733 |
RETURN (true); |
|
2734 |
%} |
|
2735 |
! |
|
2736 |
||
12 | 2737 |
glxBeginTriangleMeshIn:aGLXWindowId |
2738 |
"start a triangle mesh" |
|
0 | 2739 |
|
2740 |
%{ /* NOCONTEXT */ |
|
12 | 2741 |
SETWIN(aGLXWindowId) |
2742 |
bgntmesh(); |
|
2743 |
RETURN (true); |
|
2744 |
%} |
|
2745 |
! |
|
0 | 2746 |
|
12 | 2747 |
glxEndTriangleMeshIn:aGLXWindowId |
2748 |
"end a triangle mesh" |
|
0 | 2749 |
|
12 | 2750 |
%{ /* NOCONTEXT */ |
2751 |
SETWIN(aGLXWindowId) |
|
2752 |
endtmesh(); |
|
2753 |
RETURN (true); |
|
2754 |
%} |
|
2755 |
! |
|
0 | 2756 |
|
12 | 2757 |
glxBeginQuadrilateralStripIn:aGLXWindowId |
2758 |
"start a quadrilateral strip" |
|
2759 |
||
2760 |
%{ /* NOCONTEXT */ |
|
2761 |
SETWIN(aGLXWindowId) |
|
2762 |
bgnqstrip(); |
|
2763 |
RETURN (true); |
|
2764 |
%} |
|
2765 |
! |
|
2766 |
||
2767 |
glxEndQuadrilateralStripIn:aGLXWindowId |
|
2768 |
"end a quadrilateral strip" |
|
0 | 2769 |
|
12 | 2770 |
%{ /* NOCONTEXT */ |
2771 |
SETWIN(aGLXWindowId) |
|
2772 |
endqstrip(); |
|
2773 |
RETURN (true); |
|
2774 |
%} |
|
64 | 2775 |
! ! |
2776 |
||
2777 |
!GLXWorkstation methodsFor:'sphere drawing'! |
|
0 | 2778 |
|
12 | 2779 |
glxSphDraw:arrayOf4Floats in:aGLXWindowId |
2780 |
"argument must be an array(a matrix) of 4 floats containing the |
|
29 | 2781 |
sphere - in real GL only" |
0 | 2782 |
|
2783 |
%{ /* NOCONTEXT */ |
|
2784 |
#ifdef GLX |
|
12 | 2785 |
float vec[4], *v; |
2786 |
||
2787 |
if (! (v = getFloatsFromInto(arrayOf4Floats, vec, 4))) RETURN(false); |
|
2788 |
SETWIN(aGLXWindowId) |
|
2789 |
sphdraw(v); |
|
2790 |
RETURN (true); |
|
2791 |
#endif |
|
2792 |
%} |
|
2793 |
. |
|
2794 |
^ false |
|
64 | 2795 |
! |
2796 |
||
2797 |
glxSphDrawX:x y:y z:z radius:r in:aGLXWindowId |
|
2798 |
"arguments must be convertable to floats - in real GL only" |
|
2799 |
||
2800 |
%{ /* NOCONTEXT */ |
|
2801 |
#ifdef GLX |
|
2802 |
float vec[4]; |
|
2803 |
||
2804 |
_FLOAT_(x, vec[0]) |
|
2805 |
_FLOAT_(y, vec[1]) |
|
2806 |
_FLOAT_(z, vec[2]) |
|
2807 |
_FLOAT_(r, vec[3]) |
|
2808 |
SETWIN(aGLXWindowId) |
|
2809 |
sphdraw(vec); |
|
2810 |
RETURN (true); |
|
2811 |
#endif |
|
2812 |
%} |
|
2813 |
. |
|
2814 |
^ false |
|
127 | 2815 |
! |
2816 |
||
2817 |
glxSphfreeIn: aGLXWindowId |
|
2818 |
||
2819 |
%{ /* NOCONTEXT */ |
|
2820 |
#ifdef GLX |
|
2821 |
SETWIN(aGLXWindowId) |
|
2822 |
sphfree(); |
|
2823 |
RETURN (true); |
|
2824 |
#endif |
|
2825 |
%} |
|
2826 |
. |
|
2827 |
^ false |
|
2828 |
! |
|
2829 |
||
2830 |
glxSphgnpolysIn: aGLXWindowId |
|
2831 |
||
2832 |
%{ /* NOCONTEXT */ |
|
2833 |
#ifdef GLX |
|
2834 |
SETWIN(aGLXWindowId) |
|
2835 |
RETURN (_MKSMALLINT(sphgnpolys())); |
|
2836 |
#endif |
|
2837 |
%} |
|
2838 |
. |
|
2839 |
^ false |
|
2840 |
! |
|
2841 |
||
2842 |
glxSphmode: attribute value: value in: aGLXWindowId |
|
2843 |
||
2844 |
%{ /* NOCONTEXT */ |
|
2845 |
#ifdef GLX |
|
2846 |
SETWIN(aGLXWindowId) |
|
185 | 2847 |
sphmode(__intVal(attribute), __intVal(value)); |
127 | 2848 |
RETURN (true); |
2849 |
#endif |
|
2850 |
%} |
|
2851 |
. |
|
2852 |
^ false |
|
2853 |
! |
|
2854 |
||
2855 |
glxSphobj: objid in: aGLXWindowId |
|
2856 |
||
2857 |
%{ /* NOCONTEXT */ |
|
2858 |
#ifdef GLX |
|
2859 |
SETWIN(aGLXWindowId) |
|
2860 |
sphobj(_objectVal(objid)); |
|
2861 |
RETURN (true); |
|
2862 |
#endif |
|
2863 |
%} |
|
2864 |
. |
|
2865 |
^ false |
|
2866 |
! |
|
2867 |
||
2868 |
glxSphrotmatrix: mat in: aGLXWindowId |
|
2869 |
||
2870 |
%{ /* NOCONTEXT */ |
|
2871 |
#ifdef GLX |
|
2872 |
Matrix matrix, *m; |
|
2873 |
||
2874 |
if (! (m = getFloatsFromMatrixInto(mat, &matrix))) RETURN (false); |
|
2875 |
SETWIN(aGLXWindowId) |
|
2876 |
sphrotmatrix(*m); |
|
2877 |
RETURN (true); |
|
2878 |
#endif |
|
2879 |
%} |
|
2880 |
. |
|
2881 |
^ false |
|
64 | 2882 |
! ! |
2883 |
||
2884 |
!GLXWorkstation methodsFor:'patches & surfaces'! |
|
0 | 2885 |
|
12 | 2886 |
glxDefBasis:id mat:aMatrix in:aGLXWindowId |
2887 |
"define the basis" |
|
24 | 2888 |
|
12 | 2889 |
%{ /* NOCONTEXT */ |
2890 |
Matrix matrix; |
|
2891 |
Matrix *m; |
|
2892 |
||
2893 |
if (! (m = getFloatsFromMatrixInto(aMatrix, &matrix))) RETURN (false); |
|
97 | 2894 |
if (__isSmallInteger(id)) { |
77 | 2895 |
SETWIN(aGLXWindowId) |
185 | 2896 |
defbasis((short)(__intVal(id)), *m); |
77 | 2897 |
RETURN (true); |
12 | 2898 |
} |
2899 |
%} |
|
2900 |
. |
|
2901 |
^ false |
|
2902 |
! |
|
0 | 2903 |
|
12 | 2904 |
glxPatchCurvesU:u v:v in:aGLXWindowId |
2905 |
"set the number of curves in a patch" |
|
24 | 2906 |
|
12 | 2907 |
%{ /* NOCONTEXT */ |
97 | 2908 |
if (__bothSmallInteger(u, v)) { |
77 | 2909 |
SETWIN(aGLXWindowId) |
185 | 2910 |
patchcurves((long)__intVal(u), (long)__intVal(v)); |
77 | 2911 |
RETURN (true); |
12 | 2912 |
} |
2913 |
%} |
|
2914 |
. |
|
2915 |
^ false |
|
2916 |
! |
|
2917 |
||
2918 |
glxPatchPrecisionU:u v:v in:aGLXWindowId |
|
2919 |
"set the patch precision" |
|
24 | 2920 |
|
12 | 2921 |
%{ /* NOCONTEXT */ |
97 | 2922 |
if (__bothSmallInteger(u, v)) { |
77 | 2923 |
SETWIN(aGLXWindowId) |
185 | 2924 |
patchprecision((long)__intVal(u), (long)__intVal(v)); |
77 | 2925 |
RETURN (true); |
12 | 2926 |
} |
2927 |
%} |
|
2928 |
. |
|
2929 |
^ false |
|
2930 |
! |
|
2931 |
||
2932 |
glxPatchBasisU:u v:v in:aGLXWindowId |
|
2933 |
"set the current basis matrices" |
|
24 | 2934 |
|
12 | 2935 |
%{ /* NOCONTEXT */ |
97 | 2936 |
if (__bothSmallInteger(u, v)) { |
77 | 2937 |
SETWIN(aGLXWindowId) |
185 | 2938 |
patchbasis((long)__intVal(u), (long)__intVal(v)); |
77 | 2939 |
RETURN (true); |
12 | 2940 |
} |
2941 |
%} |
|
2942 |
. |
|
2943 |
^ false |
|
2944 |
! |
|
2945 |
||
2946 |
glxPatchX:arrayOf16XFloats y:arrayOf16YFloats z:arrayOf16ZFloats in:aGLXWindowId |
|
2947 |
"arguments must be arrays of 16 floats containing the patch" |
|
2948 |
||
2949 |
%{ /* NOCONTEXT */ |
|
2950 |
Matrix matrixX, matrixY, matrixZ; |
|
2951 |
Matrix *mX, *mY, *mZ; |
|
2952 |
||
2953 |
if (! (mX = getFloatsFromMatrixInto(arrayOf16XFloats, &matrixX))) RETURN (false); |
|
2954 |
if (! (mY = getFloatsFromMatrixInto(arrayOf16YFloats, &matrixY))) RETURN (false); |
|
2955 |
if (! (mZ = getFloatsFromMatrixInto(arrayOf16ZFloats, &matrixZ))) RETURN (false); |
|
2956 |
SETWIN(aGLXWindowId) |
|
2957 |
patch(*mX, *mY, *mZ); |
|
2958 |
RETURN (true); |
|
0 | 2959 |
%} |
2960 |
! |
|
2961 |
||
64 | 2962 |
glxBeginCurveIn:aGLXWindowId |
2963 |
"start a NURBS curve def - in real GL only" |
|
2964 |
||
2965 |
%{ /* NOCONTEXT */ |
|
2966 |
#ifdef GLX |
|
2967 |
SETWIN(aGLXWindowId) |
|
2968 |
bgncurve(); |
|
2969 |
RETURN (true); |
|
2970 |
#endif |
|
12 | 2971 |
%} |
2972 |
. |
|
2973 |
^ false |
|
2974 |
! |
|
0 | 2975 |
|
64 | 2976 |
glxEndCurveIn:aGLXWindowId |
2977 |
"end a NURBS curve def - in real GL only" |
|
2978 |
||
2979 |
%{ /* NOCONTEXT */ |
|
2980 |
#ifdef GLX |
|
2981 |
SETWIN(aGLXWindowId) |
|
2982 |
endcurve(); |
|
2983 |
RETURN (true); |
|
2984 |
#endif |
|
0 | 2985 |
%} |
2986 |
. |
|
2987 |
^ false |
|
2988 |
! |
|
2989 |
||
64 | 2990 |
glxBeginSurfaceIn:aGLXWindowId |
2991 |
"start a NURBS surface def - in real GL only" |
|
2992 |
||
2993 |
%{ /* NOCONTEXT */ |
|
2994 |
#ifdef GLX |
|
2995 |
SETWIN(aGLXWindowId) |
|
2996 |
bgnsurface(); |
|
2997 |
RETURN (true); |
|
2998 |
#endif |
|
24 | 2999 |
%} |
3000 |
. |
|
3001 |
^ false |
|
3002 |
! |
|
3003 |
||
64 | 3004 |
glxEndSurfaceIn:aGLXWindowId |
3005 |
"end a NURBS surface def - in real GL only" |
|
3006 |
||
3007 |
%{ /* NOCONTEXT */ |
|
3008 |
#ifdef GLX |
|
3009 |
SETWIN(aGLXWindowId) |
|
3010 |
endsurface(); |
|
12 | 3011 |
RETURN (true); |
3012 |
#endif |
|
3013 |
%} |
|
3014 |
. |
|
3015 |
^ false |
|
3016 |
! |
|
3017 |
||
29 | 3018 |
glxNurbsSurfaceUKnotCount: uKnotCount uKnot: uKnot |
3019 |
vKnotCount: vKnotCount vKnot: vKnot |
|
3020 |
uOffset: uOffset vOffset: vOffset |
|
3021 |
ctlArray: ctlArray |
|
3022 |
uOrder: uOrder vOrder: vOrder |
|
3023 |
type: type in: aGLXWindowId |
|
3024 |
||
3025 |
| ctlPoints i | |
|
3026 |
ctlPoints := DoubleArray new: ctlArray size * (ctlArray first size). |
|
3027 |
i := 1. |
|
3028 |
ctlArray do: [:point | |
|
77 | 3029 |
point do: [:coord | |
3030 |
ctlPoints at: i put: coord. |
|
3031 |
i := i + 1]]. |
|
29 | 3032 |
|
3033 |
%{ /* NOCONTEXT */ |
|
3034 |
#ifdef GLX |
|
3035 |
char *uKnotElements, *vKnotElements, *ctlElements; |
|
3036 |
OBJ cls; |
|
3037 |
int ninstVars, nInstBytes; |
|
3038 |
||
3039 |
SETWIN(aGLXWindowId) |
|
134 | 3040 |
cls = __qClass(ctlPoints); |
185 | 3041 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
29 | 3042 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
3043 |
||
3044 |
ctlElements = (char *)(_InstPtr(ctlPoints)) + nInstBytes; |
|
3045 |
uKnotElements = (char *)(_InstPtr(uKnot)) + nInstBytes; |
|
3046 |
vKnotElements = (char *)(_InstPtr(vKnot)) + nInstBytes; |
|
3047 |
||
3048 |
nurbssurface ( |
|
185 | 3049 |
__intVal(uKnotCount), (double *)uKnotElements, |
3050 |
__intVal(vKnotCount), (double *)vKnotElements, |
|
3051 |
__intVal(uOffset), __intVal(vOffset), |
|
77 | 3052 |
(double *)ctlElements, |
185 | 3053 |
__intVal(uOrder), __intVal(vOrder), __intVal(type)); |
29 | 3054 |
RETURN(true); |
3055 |
#endif |
|
3056 |
%} |
|
3057 |
. |
|
3058 |
^ false |
|
64 | 3059 |
! ! |
3060 |
||
89 | 3061 |
!GLXWorkstation methodsFor:'arcs and circles'! |
64 | 3062 |
|
3063 |
glxArcX: x y: y radius: radius startang: startang endang: endang in: aGLXWindowId |
|
3064 |
"draw an arc" |
|
3065 |
||
3066 |
%{ /* NOCONTEXT */ |
|
3067 |
Coord c_x, c_y, c_radius; |
|
3068 |
Angle a_startang, a_endang; |
|
3069 |
||
3070 |
_COORD_(x, c_x) |
|
3071 |
_COORD_(y, c_y) |
|
3072 |
_COORD_(radius, c_radius) |
|
3073 |
_ANGLE_(startang, a_startang) |
|
3074 |
_ANGLE_(endang, a_endang) |
|
3075 |
SETWIN(aGLXWindowId) |
|
3076 |
arc(c_x, c_y, c_radius, a_startang, a_endang); |
|
3077 |
RETURN (true); |
|
3078 |
%} |
|
3079 |
! |
|
3080 |
||
3081 |
glxArciX: x y: y radius: radius startang: startang endang: endang in: aGLXWindowId |
|
3082 |
"draw an arc" |
|
3083 |
||
3084 |
%{ /* NOCONTEXT */ |
|
3085 |
Icoord c_x, c_y, c_radius; |
|
3086 |
Angle a_startang, a_endang; |
|
3087 |
||
3088 |
_ICOORD_(x, c_x) |
|
3089 |
_ICOORD_(y, c_y) |
|
3090 |
_ICOORD_(radius, c_radius) |
|
3091 |
_ANGLE_(startang, a_startang) |
|
3092 |
_ANGLE_(endang, a_endang) |
|
3093 |
SETWIN(aGLXWindowId) |
|
3094 |
arci(c_x, c_y, c_radius, a_startang, a_endang); |
|
3095 |
RETURN (true); |
|
3096 |
%} |
|
3097 |
! |
|
3098 |
||
3099 |
glxArcsX: x y: y radius: radius startang: startang endang: endang in: aGLXWindowId |
|
3100 |
"draw an arc" |
|
3101 |
||
3102 |
%{ /* NOCONTEXT */ |
|
3103 |
Scoord c_x, c_y, c_radius; |
|
3104 |
Angle a_startang, a_endang; |
|
3105 |
||
3106 |
_SCOORD_(x, c_x) |
|
3107 |
_SCOORD_(y, c_y) |
|
3108 |
_SCOORD_(radius, c_radius) |
|
3109 |
_ANGLE_(startang, a_startang) |
|
3110 |
_ANGLE_(endang, a_endang) |
|
3111 |
SETWIN(aGLXWindowId) |
|
3112 |
arcs(c_x, c_y, c_radius, a_startang, a_endang); |
|
3113 |
RETURN (true); |
|
3114 |
%} |
|
3115 |
! |
|
3116 |
||
3117 |
glxArcfX: x y: y radius: radius startang: startang endang: endang in: aGLXWindowId |
|
3118 |
"draw a filled arc" |
|
3119 |
||
3120 |
%{ /* NOCONTEXT */ |
|
3121 |
Coord c_x, c_y, c_radius; |
|
3122 |
Angle a_startang, a_endang; |
|
3123 |
||
3124 |
_COORD_(x, c_x) |
|
3125 |
_COORD_(y, c_y) |
|
3126 |
_COORD_(radius, c_radius) |
|
3127 |
_ANGLE_(startang, a_startang) |
|
3128 |
_ANGLE_(endang, a_endang) |
|
3129 |
SETWIN(aGLXWindowId) |
|
3130 |
arcf(c_x, c_y, c_radius, a_startang, a_endang); |
|
3131 |
RETURN (true); |
|
3132 |
%} |
|
3133 |
! |
|
3134 |
||
3135 |
glxArcfiX: x y: y radius: radius startang: startang endang: endang in: aGLXWindowId |
|
3136 |
"draw a filled arc" |
|
3137 |
||
3138 |
%{ /* NOCONTEXT */ |
|
3139 |
Icoord c_x, c_y, c_radius; |
|
3140 |
Angle a_startang, a_endang; |
|
3141 |
||
3142 |
_ICOORD_(x, c_x) |
|
3143 |
_ICOORD_(y, c_y) |
|
3144 |
_ICOORD_(radius, c_radius) |
|
3145 |
_ANGLE_(startang, a_startang); |
|
3146 |
_ANGLE_(endang, a_endang) |
|
3147 |
SETWIN(aGLXWindowId) |
|
3148 |
arcfi(c_x, c_y, c_radius, a_startang, a_endang); |
|
3149 |
RETURN (true); |
|
3150 |
%} |
|
3151 |
! |
|
3152 |
||
3153 |
glxArcfsX: x y: y radius: radius startang: startang endang: endang in: aGLXWindowId |
|
3154 |
"draw a filled arc" |
|
3155 |
||
3156 |
%{ /* NOCONTEXT */ |
|
3157 |
Scoord c_x, c_y, c_radius; |
|
3158 |
Angle a_startang, a_endang; |
|
3159 |
||
3160 |
_SCOORD_(x, c_x) |
|
3161 |
_SCOORD_(y, c_y) |
|
3162 |
_SCOORD_(radius, c_radius) |
|
3163 |
_ANGLE_(startang, a_startang) |
|
3164 |
_ANGLE_(endang, a_endang) |
|
3165 |
SETWIN(aGLXWindowId) |
|
3166 |
arcfs(c_x, c_y, c_radius, a_startang, a_endang); |
|
3167 |
RETURN (true); |
|
3168 |
%} |
|
29 | 3169 |
! |
3170 |
||
64 | 3171 |
glxCircX: x y: y radius: radius in: aGLXWindowId |
3172 |
"draw a circle" |
|
3173 |
||
3174 |
%{ /* NOCONTEXT */ |
|
3175 |
Coord c_x, c_y, c_radius; |
|
3176 |
||
3177 |
_COORD_ (x, c_x) |
|
3178 |
_COORD_ (y, c_y) |
|
3179 |
_COORD_ (radius, c_radius) |
|
3180 |
SETWIN(aGLXWindowId) |
|
3181 |
circ(c_x, c_y, c_radius); |
|
3182 |
RETURN (true); |
|
3183 |
%} |
|
3184 |
! |
|
3185 |
||
3186 |
glxCirciX: x y: y radius: radius in: aGLXWindowId |
|
3187 |
"draw a circle" |
|
3188 |
||
3189 |
%{ /* NOCONTEXT */ |
|
3190 |
Icoord c_x, c_y, c_radius; |
|
3191 |
||
3192 |
_ICOORD_ (x, c_x) |
|
3193 |
_ICOORD_ (y, c_y) |
|
3194 |
_ICOORD_ (radius, c_radius) |
|
3195 |
SETWIN(aGLXWindowId) |
|
3196 |
circi(c_x, c_y, c_radius); |
|
3197 |
RETURN (true); |
|
3198 |
%} |
|
3199 |
! |
|
3200 |
||
3201 |
glxCircsX: x y: y radius: radius in: aGLXWindowId |
|
3202 |
"draw a circle" |
|
3203 |
||
3204 |
%{ /* NOCONTEXT */ |
|
3205 |
Scoord c_x, c_y, c_radius; |
|
3206 |
||
3207 |
_SCOORD_ (x, c_x) |
|
3208 |
_SCOORD_ (y, c_y) |
|
3209 |
_SCOORD_ (radius, c_radius) |
|
3210 |
SETWIN(aGLXWindowId) |
|
3211 |
circs(c_x, c_y, c_radius); |
|
3212 |
RETURN (true); |
|
3213 |
%} |
|
3214 |
! |
|
3215 |
||
3216 |
glxCircfX: x y: y radius: radius in: aGLXWindowId |
|
3217 |
"draw a filled circle" |
|
3218 |
||
3219 |
%{ /* NOCONTEXT */ |
|
3220 |
Coord c_x, c_y, c_radius; |
|
3221 |
||
3222 |
_COORD_ (x, c_x) |
|
3223 |
_COORD_ (y, c_y) |
|
3224 |
_COORD_ (radius, c_radius) |
|
3225 |
SETWIN(aGLXWindowId) |
|
3226 |
circf(c_x, c_y, c_radius); |
|
3227 |
RETURN (true); |
|
3228 |
%} |
|
3229 |
! |
|
3230 |
||
3231 |
glxCircfiX: x y: y radius: radius in: aGLXWindowId |
|
3232 |
"draw a filled circle" |
|
3233 |
||
3234 |
%{ /* NOCONTEXT */ |
|
3235 |
Icoord c_x, c_y, c_radius; |
|
3236 |
||
3237 |
_ICOORD_ (x, c_x) |
|
3238 |
_ICOORD_ (y, c_y) |
|
3239 |
_ICOORD_ (radius, c_radius) |
|
3240 |
SETWIN(aGLXWindowId) |
|
3241 |
circfi(c_x, c_y, c_radius); |
|
3242 |
RETURN (true); |
|
3243 |
%} |
|
3244 |
! |
|
3245 |
||
3246 |
glxCircfsX: x y: y radius: radius in: aGLXWindowId |
|
3247 |
"draw a filled circle" |
|
3248 |
||
3249 |
%{ /* NOCONTEXT */ |
|
3250 |
Scoord c_x, c_y, c_radius; |
|
3251 |
||
3252 |
_SCOORD_ (x, c_x) |
|
3253 |
_SCOORD_ (y, c_y) |
|
3254 |
_SCOORD_ (radius, c_radius) |
|
3255 |
SETWIN(aGLXWindowId) |
|
3256 |
circfs(c_x, c_y, c_radius); |
|
29 | 3257 |
RETURN (true); |
3258 |
%} |
|
3259 |
! ! |
|
3260 |
||
89 | 3261 |
!GLXWorkstation methodsFor:'objects'! |
3262 |
||
3263 |
glxCallObject:obj in:aGLXWindowId |
|
3264 |
"perform the commands of an object (macro)." |
|
3265 |
||
3266 |
%{ /* NOCONTEXT */ |
|
97 | 3267 |
if (__isSmallInteger(obj)) { |
89 | 3268 |
SETWIN(aGLXWindowId) |
3269 |
callobj(_objectVal(obj)); |
|
3270 |
RETURN (true); |
|
3271 |
} |
|
3272 |
%} |
|
3273 |
. |
|
3274 |
^ false |
|
3275 |
! |
|
3276 |
||
3277 |
glxCallobj: obj in: aGLXWindowId |
|
3278 |
"OBSOLETE; use glxCallObject:in: |
|
3279 |
This one will be removed soon." |
|
3280 |
||
3281 |
%{ /* NOCONTEXT */ |
|
97 | 3282 |
if (__isSmallInteger(obj)) { |
89 | 3283 |
SETWIN(aGLXWindowId) |
3284 |
callobj(_objectVal(obj)); |
|
3285 |
RETURN (true); |
|
3286 |
} |
|
3287 |
%} |
|
3288 |
. |
|
3289 |
^ false |
|
3290 |
! |
|
3291 |
||
3292 |
glxCloseObjectIn:aGLXWindowId |
|
3293 |
"end object defnition" |
|
3294 |
||
3295 |
%{ /* NOCONTEXT */ |
|
3296 |
SETWIN(aGLXWindowId) |
|
3297 |
closeobj(); |
|
3298 |
RETURN (true); |
|
3299 |
%} |
|
3300 |
! |
|
3301 |
||
3302 |
glxCloseobjIn:aGLXWindowId |
|
3303 |
"OBSOLETE: use glxCloseObjectIn: |
|
3304 |
This one will be removed." |
|
3305 |
||
3306 |
%{ /* NOCONTEXT */ |
|
3307 |
SETWIN(aGLXWindowId) |
|
3308 |
closeobj(); |
|
3309 |
RETURN (true); |
|
3310 |
%} |
|
3311 |
! |
|
3312 |
||
3313 |
glxDeleteObject:obj in:aGLXWindowId |
|
3314 |
||
3315 |
%{ /* NOCONTEXT */ |
|
3316 |
SETWIN(aGLXWindowId) |
|
3317 |
delobj(_objectVal(obj)); |
|
3318 |
RETURN (true); |
|
3319 |
%} |
|
3320 |
! |
|
3321 |
||
3322 |
glxDelobj:obj in:aGLXWindowId |
|
3323 |
"OBSOLETE: use glxDeleteObject:in: |
|
3324 |
This one will be removed." |
|
3325 |
||
3326 |
%{ /* NOCONTEXT */ |
|
3327 |
SETWIN(aGLXWindowId) |
|
3328 |
delobj(_objectVal(obj)); |
|
3329 |
RETURN (true); |
|
3330 |
%} |
|
3331 |
! |
|
3332 |
||
3333 |
glxGenObjectIn:aGLXWindowId |
|
3334 |
"return a new (free & unused) object id for use |
|
3335 |
with makeObj" |
|
3336 |
||
3337 |
%{ /* NOCONTEXT */ |
|
3338 |
SETWIN(aGLXWindowId) |
|
3339 |
RETURN (_MKSMALLINT(genobj())); |
|
3340 |
%} |
|
3341 |
! |
|
3342 |
||
3343 |
glxGenobjIn:aGLXWindowId |
|
3344 |
"OBSOLETE: use glxGenObject:in: |
|
3345 |
This one will be removed." |
|
3346 |
||
3347 |
%{ /* NOCONTEXT */ |
|
3348 |
SETWIN(aGLXWindowId) |
|
3349 |
RETURN (_MKSMALLINT(genobj())); |
|
3350 |
%} |
|
3351 |
! |
|
3352 |
||
3353 |
glxMakeObject:id in:aGLXWindowId |
|
3354 |
"start object definition - |
|
3355 |
another name conflict" |
|
3356 |
||
3357 |
%{ /* NOCONTEXT */ |
|
97 | 3358 |
if (__isSmallInteger(id)) { |
89 | 3359 |
SETWIN(aGLXWindowId) |
3360 |
makeobj(_objectVal(id)); |
|
3361 |
RETURN (true); |
|
3362 |
} |
|
3363 |
%} |
|
3364 |
. |
|
3365 |
^ false |
|
3366 |
! |
|
3367 |
||
3368 |
glxMakeobj:obj in:aGLXWindowId |
|
3369 |
"OBSOLETE; use glxMakeObject:in: |
|
3370 |
This one will be removed soon." |
|
3371 |
||
3372 |
%{ /* NOCONTEXT */ |
|
97 | 3373 |
if (__isSmallInteger(obj)) { |
89 | 3374 |
SETWIN(aGLXWindowId) |
3375 |
makeobj(_objectVal(obj)); |
|
3376 |
RETURN (true); |
|
3377 |
} |
|
3378 |
%} |
|
3379 |
. |
|
3380 |
^ false |
|
3381 |
! |
|
3382 |
||
3383 |
glxIsobj:obj in:aGLXWindowId |
|
3384 |
"return true, if obj is a valid object id" |
|
3385 |
||
3386 |
%{ /* NOCONTEXT */ |
|
3387 |
SETWIN(aGLXWindowId) |
|
3388 |
RETURN (_MKBOOLEAN(isobj(_objectVal(obj)))); |
|
3389 |
%} |
|
3390 |
! |
|
3391 |
||
3392 |
glxGetopenobjIn:aGLXWindowId |
|
3393 |
"return the currently open objects id; -1 if none is open" |
|
3394 |
||
3395 |
%{ /* NOCONTEXT */ |
|
3396 |
SETWIN(aGLXWindowId) |
|
3397 |
RETURN (_MKSMALLINT(getopenobj())); |
|
3398 |
%} |
|
3399 |
! ! |
|
3400 |
||
3401 |
!GLXWorkstation methodsFor:'unspecified rest'! |
|
3402 |
||
3403 |
glxAcbufOp:op value:value in:aGLXWindowId |
|
29 | 3404 |
|
3405 |
%{ /* NOCONTEXT */ |
|
3406 |
#ifdef GLX |
|
3407 |
SETWIN(aGLXWindowId) |
|
185 | 3408 |
acbuf(__intVal(op), _floatVal(value)); |
29 | 3409 |
RETURN (true); |
3410 |
#endif |
|
3411 |
%} |
|
3412 |
. |
|
3413 |
^ false |
|
3414 |
! |
|
3415 |
||
3416 |
glxAcsizePlanes: planes in: aGLXWindowId |
|
3417 |
||
3418 |
%{ /* NOCONTEXT */ |
|
3419 |
#ifdef GLX |
|
3420 |
SETWIN(aGLXWindowId) |
|
185 | 3421 |
acsize(__intVal(planes)); |
29 | 3422 |
RETURN (true); |
3423 |
#endif |
|
3424 |
%} |
|
3425 |
. |
|
3426 |
^ false |
|
3427 |
! |
|
3428 |
||
3429 |
glxAfunctionRef: ref func: func in: aGLXWindowId |
|
3430 |
||
3431 |
%{ /* NOCONTEXT */ |
|
3432 |
#ifdef GLX |
|
3433 |
SETWIN(aGLXWindowId) |
|
185 | 3434 |
afunction(__intVal(ref), __intVal(func)); |
29 | 3435 |
RETURN (true); |
3436 |
#endif |
|
3437 |
%} |
|
3438 |
. |
|
3439 |
^ false |
|
3440 |
! |
|
3441 |
||
3442 |
glxBackface: b in: aGLXWindowId |
|
157 | 3443 |
"enable/disable backface culling" |
29 | 3444 |
|
3445 |
%{ /* NOCONTEXT */ |
|
3446 |
SETWIN(aGLXWindowId) |
|
3447 |
backface(_booleanVal(b)); |
|
3448 |
RETURN (true); |
|
3449 |
%} |
|
3450 |
! |
|
3451 |
||
3452 |
glxBbox2Xmin: xmin ymin: ymin x1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
3453 |
||
3454 |
%{ /* NOCONTEXT */ |
|
3455 |
#ifdef GLX |
|
3456 |
Screencoord c_xmin, c_ymin; |
|
3457 |
Coord c_x1, c_y1, c_x2, c_y2; |
|
3458 |
||
3459 |
_SCREENCOORD_ (xmin, c_xmin) |
|
3460 |
_SCREENCOORD_ (ymin, c_ymin) |
|
3461 |
_COORD_ (x1, c_x1) |
|
3462 |
_COORD_ (y1, c_y1) |
|
3463 |
_COORD_ (x2, c_x2) |
|
3464 |
_COORD_ (y2, c_y2) |
|
3465 |
SETWIN(aGLXWindowId) |
|
3466 |
bbox2(c_xmin, c_ymin, c_x1, c_y1, c_x2, c_y2); |
|
3467 |
RETURN (true); |
|
3468 |
#endif |
|
3469 |
%} |
|
3470 |
. |
|
3471 |
^ false |
|
3472 |
! |
|
3473 |
||
3474 |
glxBbox2iXmin: xmin ymin: ymin x1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
3475 |
||
3476 |
%{ /* NOCONTEXT */ |
|
3477 |
#ifdef GLX |
|
3478 |
Screencoord c_xmin, c_ymin; |
|
3479 |
Icoord c_x1, c_y1, c_x2, c_y2; |
|
3480 |
||
3481 |
_SCREENCOORD_ (xmin, c_xmin) |
|
3482 |
_SCREENCOORD_ (ymin, c_ymin) |
|
3483 |
_ICOORD_ (x1, c_x1) |
|
3484 |
_ICOORD_ (y1, c_y1) |
|
3485 |
_ICOORD_ (x2, c_x2) |
|
3486 |
_ICOORD_ (y2, c_y2) |
|
3487 |
SETWIN(aGLXWindowId) |
|
3488 |
bbox2i(c_xmin, c_ymin, c_x1, c_y1, c_x2, c_y2); |
|
3489 |
RETURN (true); |
|
3490 |
#endif |
|
3491 |
%} |
|
3492 |
. |
|
3493 |
^ false |
|
3494 |
! |
|
3495 |
||
3496 |
glxBbox2sXmin: xmin ymin: ymin x1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
3497 |
||
3498 |
%{ /* NOCONTEXT */ |
|
3499 |
#ifdef GLX |
|
3500 |
Screencoord c_xmin, c_ymin; |
|
3501 |
Scoord c_x1, c_y1, c_x2, c_y2; |
|
3502 |
||
3503 |
_SCREENCOORD_ (xmin, c_xmin) |
|
3504 |
_SCREENCOORD_ (ymin, c_ymin) |
|
3505 |
_SCOORD_ (x1, c_x1) |
|
3506 |
_SCOORD_ (y1, c_y1) |
|
3507 |
_SCOORD_ (x2, c_x2) |
|
3508 |
_SCOORD_ (y2, c_y2) |
|
3509 |
SETWIN(aGLXWindowId) |
|
3510 |
bbox2s(c_xmin, c_ymin, c_x1, c_y1, c_x2, c_y2); |
|
3511 |
RETURN (true); |
|
3512 |
#endif |
|
3513 |
%} |
|
3514 |
. |
|
3515 |
^ false |
|
3516 |
! |
|
3517 |
||
3518 |
glxBeginTrimIn: aGLXWindowId |
|
3519 |
||
3520 |
%{ /* NOCONTEXT */ |
|
3521 |
#ifdef GLX |
|
3522 |
SETWIN(aGLXWindowId) |
|
3523 |
bgntrim(); |
|
3524 |
RETURN (true); |
|
3525 |
#endif |
|
3526 |
%} |
|
3527 |
. |
|
3528 |
^ false |
|
3529 |
! |
|
3530 |
||
3531 |
glxEndTrimIn: aGLXWindowId |
|
3532 |
||
3533 |
%{ /* NOCONTEXT */ |
|
3534 |
#ifdef GLX |
|
3535 |
SETWIN(aGLXWindowId) |
|
3536 |
endtrim(); |
|
3537 |
RETURN (true); |
|
3538 |
#endif |
|
3539 |
%} |
|
3540 |
. |
|
3541 |
^ false |
|
3542 |
! |
|
3543 |
||
3544 |
glxBlankscreen: b in: aGLXWindowId |
|
3545 |
||
3546 |
%{ /* NOCONTEXT */ |
|
3547 |
#ifdef GLX |
|
3548 |
SETWIN(aGLXWindowId) |
|
3549 |
blankscreen(_booleanVal(b)); |
|
3550 |
RETURN (true); |
|
3551 |
#endif |
|
3552 |
%} |
|
3553 |
. |
|
3554 |
^ false |
|
3555 |
! |
|
3556 |
||
3557 |
glxBlanktime: count in: aGLXWindowId |
|
3558 |
||
3559 |
%{ /* NOCONTEXT */ |
|
3560 |
#ifdef GLX |
|
3561 |
SETWIN(aGLXWindowId) |
|
185 | 3562 |
blanktime(__intVal(count)); |
29 | 3563 |
RETURN (true); |
3564 |
#endif |
|
3565 |
%} |
|
3566 |
. |
|
3567 |
^ false |
|
3568 |
! |
|
3569 |
||
3570 |
glxBlendcolorRed: red green: green blue: blue alpha: alpha in: aGLXWindowId |
|
3571 |
||
3572 |
%{ /* NOCONTEXT */ |
|
46 | 3573 |
#ifdef FULL_GLX |
29 | 3574 |
SETWIN(aGLXWindowId) |
3575 |
blendcolor(_floatVal(red), _floatVal(green), _floatVal(blue), _floatVal(alpha)); |
|
3576 |
RETURN (true); |
|
3577 |
#endif |
|
3578 |
%} |
|
3579 |
. |
|
3580 |
^ false |
|
3581 |
! |
|
3582 |
||
3583 |
glxBlendfunctionSfactr: sfactr dfactr: dfactr in: aGLXWindowId |
|
3584 |
||
3585 |
%{ /* NOCONTEXT */ |
|
3586 |
#ifdef GLX |
|
3587 |
SETWIN(aGLXWindowId) |
|
185 | 3588 |
blendfunction(__intVal(sfactr), __intVal(dfactr)); |
29 | 3589 |
RETURN (true); |
3590 |
#endif |
|
3591 |
%} |
|
3592 |
. |
|
3593 |
^ false |
|
3594 |
! |
|
3595 |
||
3596 |
glxBlinkRate: rate i: i red: red green: green blue: blue in: aGLXWindowId |
|
3597 |
||
3598 |
%{ /* NOCONTEXT */ |
|
3599 |
#ifdef GLX |
|
3600 |
SETWIN(aGLXWindowId) |
|
3601 |
blink(_shortVal(rate), _colorindexVal(i), |
|
77 | 3602 |
_shortVal(red), _shortVal(green), _shortVal(blue)); |
29 | 3603 |
RETURN (true); |
3604 |
#endif |
|
3605 |
%} |
|
3606 |
. |
|
3607 |
^ false |
|
3608 |
! |
|
3609 |
||
3610 |
glxBlkqreadData: data n: n in: aGLXWindowId |
|
3611 |
||
3612 |
%{ /* NOCONTEXT */ |
|
3613 |
#ifdef GLX |
|
3614 |
SETWIN(aGLXWindowId) |
|
185 | 3615 |
RETURN (_MKSMALLINT(blkqread((short *)_indexedArea(data), __intVal(n)))); |
29 | 3616 |
#endif |
3617 |
%} |
|
3618 |
. |
|
3619 |
^ false |
|
3620 |
! |
|
3621 |
||
3622 |
glxC3s: v in: aGLXWindowId |
|
3623 |
||
3624 |
%{ /* NOCONTEXT */ |
|
3625 |
#ifdef GLX |
|
3626 |
short vec[3], *c_v; |
|
3627 |
||
3628 |
if (! (c_v = getShortsFromInto(v, vec, 3))) RETURN(false); |
|
3629 |
SETWIN(aGLXWindowId) |
|
3630 |
c3s(c_v); |
|
3631 |
RETURN (true); |
|
3632 |
#endif |
|
3633 |
%} |
|
3634 |
. |
|
3635 |
^ false |
|
3636 |
! |
|
3637 |
||
3638 |
glxC3i: v in: aGLXWindowId |
|
3639 |
||
3640 |
%{ /* NOCONTEXT */ |
|
3641 |
#ifdef GLX |
|
3642 |
long vec[3], *c_v; |
|
3643 |
||
3644 |
if (! (c_v = getLongsFromInto(v, vec, 3))) RETURN(false); |
|
3645 |
SETWIN(aGLXWindowId) |
|
3646 |
c3i(c_v); |
|
3647 |
RETURN (true); |
|
3648 |
#endif |
|
3649 |
%} |
|
3650 |
. |
|
3651 |
^ false |
|
3652 |
! |
|
3653 |
||
3654 |
glxC3f: v in: aGLXWindowId |
|
3655 |
||
3656 |
%{ /* NOCONTEXT */ |
|
3657 |
#ifdef GLX |
|
3658 |
float vec[3], *c_v; |
|
3659 |
||
3660 |
if (! (c_v = getFloatsFromInto(v, vec, 3))) RETURN(false); |
|
3661 |
SETWIN(aGLXWindowId) |
|
3662 |
c3f(c_v); |
|
3663 |
RETURN (true); |
|
3664 |
#endif |
|
3665 |
%} |
|
3666 |
. |
|
3667 |
^ false |
|
3668 |
! |
|
3669 |
||
3670 |
glxC4s: v in: aGLXWindowId |
|
3671 |
||
3672 |
%{ /* NOCONTEXT */ |
|
3673 |
#ifdef GLX |
|
3674 |
short vec[4], *c_v; |
|
3675 |
||
3676 |
if (! (c_v = getShortsFromInto(v, vec, 4))) RETURN(false); |
|
3677 |
SETWIN(aGLXWindowId) |
|
3678 |
c4s(c_v); |
|
3679 |
RETURN (true); |
|
3680 |
#endif |
|
3681 |
%} |
|
3682 |
. |
|
3683 |
^ false |
|
3684 |
! |
|
3685 |
||
3686 |
glxC4i: v in: aGLXWindowId |
|
3687 |
||
3688 |
%{ /* NOCONTEXT */ |
|
3689 |
#ifdef GLX |
|
3690 |
long vec[4], *c_v; |
|
3691 |
||
3692 |
if (! (c_v = getLongsFromInto(v, vec, 4))) RETURN(false); |
|
3693 |
SETWIN(aGLXWindowId) |
|
3694 |
c4i(c_v); |
|
3695 |
RETURN (true); |
|
3696 |
#endif |
|
3697 |
%} |
|
3698 |
. |
|
3699 |
^ false |
|
3700 |
! |
|
3701 |
||
3702 |
glxC4f: v in: aGLXWindowId |
|
3703 |
||
3704 |
%{ /* NOCONTEXT */ |
|
3705 |
#ifdef GLX |
|
3706 |
float vec[4], *c_v; |
|
3707 |
||
3708 |
if (! (c_v = getFloatsFromInto(v, vec, 4))) RETURN(false); |
|
3709 |
SETWIN(aGLXWindowId) |
|
3710 |
c4f(c_v); |
|
3711 |
RETURN (true); |
|
3712 |
#endif |
|
3713 |
%} |
|
3714 |
. |
|
3715 |
^ false |
|
3716 |
! |
|
3717 |
||
3718 |
glxClearhitcodeIn: aGLXWindowId |
|
3719 |
||
3720 |
%{ /* NOCONTEXT */ |
|
3721 |
#ifdef GLX |
|
3722 |
SETWIN(aGLXWindowId) |
|
3723 |
clearhitcode(); |
|
3724 |
RETURN (true); |
|
3725 |
#endif |
|
3726 |
%} |
|
3727 |
. |
|
3728 |
^ false |
|
3729 |
! |
|
3730 |
||
3731 |
glxClipplaneIndex: index mode: mode params: params in: aGLXWindowId |
|
3732 |
||
3733 |
%{ /* NOCONTEXT */ |
|
3734 |
#ifdef GLX |
|
3735 |
float vec[4], *v; |
|
3736 |
||
3737 |
if (! (v = getFloatsFromInto(params, vec, 4))) RETURN(false); |
|
3738 |
SETWIN(aGLXWindowId) |
|
185 | 3739 |
clipplane(__intVal(index), __intVal(mode), v); |
29 | 3740 |
RETURN (true); |
3741 |
#endif |
|
3742 |
%} |
|
3743 |
. |
|
3744 |
^ false |
|
3745 |
! |
|
3746 |
||
3747 |
glxCmodeIn: aGLXWindowId |
|
3748 |
||
3749 |
%{ /* NOCONTEXT */ |
|
3750 |
#ifdef GLX |
|
3751 |
SETWIN(aGLXWindowId) |
|
3752 |
cmode(); |
|
3753 |
RETURN (true); |
|
3754 |
#endif |
|
3755 |
%} |
|
3756 |
. |
|
3757 |
^ false |
|
3758 |
! |
|
3759 |
||
3760 |
glxCmovX: x y: y z: z in: aGLXWindowId |
|
3761 |
||
3762 |
%{ /* NOCONTEXT */ |
|
3763 |
Coord c_x, c_y, c_z; |
|
3764 |
||
3765 |
_COORD_ (x, c_x) |
|
3766 |
_COORD_ (y, c_y) |
|
3767 |
_COORD_ (z, c_z) |
|
3768 |
SETWIN(aGLXWindowId) |
|
3769 |
cmov(c_x, c_y, c_z); |
|
3770 |
RETURN (true); |
|
3771 |
%} |
|
3772 |
! |
|
3773 |
||
3774 |
glxCmoviX: x y: y z: z in: aGLXWindowId |
|
3775 |
||
3776 |
%{ /* NOCONTEXT */ |
|
3777 |
Icoord c_x, c_y, c_z; |
|
3778 |
||
3779 |
_ICOORD_ (x, c_x) |
|
3780 |
_ICOORD_ (y, c_y) |
|
3781 |
_ICOORD_ (z, c_z) |
|
3782 |
SETWIN(aGLXWindowId) |
|
3783 |
cmovi(c_x, c_y, c_z); |
|
3784 |
RETURN (true); |
|
3785 |
%} |
|
3786 |
! |
|
3787 |
||
3788 |
glxCmovsX: x y: y z: z in: aGLXWindowId |
|
3789 |
||
3790 |
%{ /* NOCONTEXT */ |
|
3791 |
Scoord c_x, c_y, c_z; |
|
3792 |
||
3793 |
_SCOORD_ (x, c_x) |
|
3794 |
_SCOORD_ (y, c_y) |
|
3795 |
_SCOORD_ (z, c_z) |
|
3796 |
SETWIN(aGLXWindowId) |
|
3797 |
cmovs(c_x, c_y, c_z); |
|
3798 |
RETURN (true); |
|
3799 |
%} |
|
3800 |
! |
|
3801 |
||
3802 |
glxCmov2X: x y: y in: aGLXWindowId |
|
3803 |
||
3804 |
%{ /* NOCONTEXT */ |
|
3805 |
Coord c_x, c_y; |
|
3806 |
||
3807 |
_COORD_ (x, c_x) |
|
3808 |
_COORD_ (y, c_y) |
|
3809 |
SETWIN(aGLXWindowId) |
|
3810 |
cmov2(c_x, c_y); |
|
3811 |
RETURN (true); |
|
3812 |
%} |
|
3813 |
! |
|
3814 |
||
3815 |
glxCmov2iX: x y: y in: aGLXWindowId |
|
3816 |
||
3817 |
%{ /* NOCONTEXT */ |
|
3818 |
Icoord c_x, c_y; |
|
3819 |
||
3820 |
_ICOORD_ (x, c_x) |
|
3821 |
_ICOORD_ (y, c_y) |
|
3822 |
SETWIN(aGLXWindowId) |
|
3823 |
cmov2i(c_x, c_y); |
|
3824 |
RETURN (true); |
|
3825 |
%} |
|
3826 |
! |
|
3827 |
||
3828 |
glxCmov2sX: x y: y in: aGLXWindowId |
|
3829 |
||
3830 |
%{ /* NOCONTEXT */ |
|
3831 |
Scoord c_x, c_y; |
|
3832 |
||
3833 |
_SCOORD_ (x, c_x) |
|
3834 |
_SCOORD_ (y, c_y) |
|
3835 |
SETWIN(aGLXWindowId) |
|
3836 |
cmov2s(c_x, c_y); |
|
3837 |
RETURN (true); |
|
3838 |
%} |
|
3839 |
! |
|
3840 |
||
3841 |
glxColorfIndex: index in: aGLXWindowId |
|
3842 |
||
3843 |
^self glxColor: index in: aGLXWindowId |
|
3844 |
! |
|
3845 |
||
3846 |
glxConcave: b in: aGLXWindowId |
|
3847 |
||
3848 |
%{ /* NOCONTEXT */ |
|
3849 |
SETWIN(aGLXWindowId) |
|
3850 |
concave(_booleanVal(b)); |
|
3851 |
RETURN (true); |
|
3852 |
%} |
|
3853 |
! |
|
3854 |
||
3855 |
glxCuroriginN: n xorigin: xorigin yorigin: yorigin in: aGLXWindowId |
|
3856 |
||
3857 |
%{ /* NOCONTEXT */ |
|
3858 |
#ifdef GLX |
|
3859 |
SETWIN(aGLXWindowId) |
|
3860 |
curorigin(_shortVal(n), _shortVal(xorigin), _shortVal(yorigin)); |
|
3861 |
RETURN (true); |
|
3862 |
#endif |
|
3863 |
%} |
|
3864 |
. |
|
3865 |
^ false |
|
3866 |
! |
|
3867 |
||
3868 |
glxCursoffIn: aGLXWindowId |
|
3869 |
||
3870 |
%{ /* NOCONTEXT */ |
|
3871 |
#ifdef GLX |
|
3872 |
SETWIN(aGLXWindowId) |
|
3873 |
cursoff(); |
|
3874 |
RETURN (true); |
|
3875 |
#endif |
|
3876 |
%} |
|
3877 |
. |
|
3878 |
^ false |
|
3879 |
! |
|
3880 |
||
3881 |
glxCursonIn: aGLXWindowId |
|
3882 |
||
3883 |
%{ /* NOCONTEXT */ |
|
3884 |
#ifdef GLX |
|
3885 |
SETWIN(aGLXWindowId) |
|
3886 |
curson(); |
|
3887 |
RETURN (true); |
|
3888 |
#endif |
|
3889 |
%} |
|
3890 |
. |
|
3891 |
^ false |
|
3892 |
! |
|
3893 |
||
3894 |
glxCurstype: type in: aGLXWindowId |
|
3895 |
||
3896 |
%{ /* NOCONTEXT */ |
|
3897 |
#ifdef GLX |
|
3898 |
SETWIN(aGLXWindowId) |
|
185 | 3899 |
curstype(__intVal(type)); |
29 | 3900 |
RETURN (true); |
3901 |
#endif |
|
3902 |
%} |
|
3903 |
. |
|
3904 |
^ false |
|
3905 |
! |
|
3906 |
||
3907 |
glxCurvebasis: basid in: aGLXWindowId |
|
3908 |
||
3909 |
%{ /* NOCONTEXT */ |
|
3910 |
SETWIN(aGLXWindowId) |
|
3911 |
curvebasis(_shortVal(basid)); |
|
3912 |
RETURN (true); |
|
3913 |
%} |
|
3914 |
! |
|
3915 |
||
3916 |
glxCurveit: iterationcount in: aGLXWindowId |
|
3917 |
||
3918 |
%{ /* NOCONTEXT */ |
|
3919 |
SETWIN(aGLXWindowId) |
|
3920 |
curveit(_shortVal(iterationcount)); |
|
3921 |
RETURN (true); |
|
3922 |
%} |
|
3923 |
! |
|
3924 |
||
3925 |
glxCurveprecision: nsegments in: aGLXWindowId |
|
3926 |
||
3927 |
%{ /* NOCONTEXT */ |
|
3928 |
SETWIN(aGLXWindowId) |
|
3929 |
curveprecision(_shortVal(nsegments)); |
|
3930 |
RETURN (true); |
|
3931 |
%} |
|
3932 |
! |
|
3933 |
||
3934 |
glxCyclemapDuration: duration map: map nxtmap: nxtmap in: aGLXWindowId |
|
3935 |
||
3936 |
%{ /* NOCONTEXT */ |
|
3937 |
#ifdef GLX |
|
3938 |
SETWIN(aGLXWindowId) |
|
3939 |
cyclemap(_shortVal(duration), _shortVal(map), _shortVal(nxtmap)); |
|
3940 |
RETURN (true); |
|
3941 |
#endif |
|
3942 |
%} |
|
3943 |
. |
|
3944 |
^ false |
|
3945 |
! |
|
3946 |
||
3947 |
glxDeflinestyleN: n ls: ls in: aGLXWindowId |
|
71 | 3948 |
"define a line style" |
3949 |
||
3950 |
%{ /* NOCONTEXT */ |
|
29 | 3951 |
SETWIN(aGLXWindowId) |
3952 |
deflinestyle(_shortVal(n), _linestyleVal(ls)); |
|
3953 |
RETURN (true); |
|
3954 |
%} |
|
3955 |
! |
|
3956 |
||
3957 |
glxDefpatternN: n size: size mask: mask in: aGLXWindowId |
|
3958 |
||
3959 |
%{ /* NOCONTEXT */ |
|
3960 |
#ifdef GLX |
|
3961 |
SETWIN(aGLXWindowId) |
|
3962 |
defpattern(_shortVal(n), _shortVal(size), (unsigned short *)_indexedArea(mask)); |
|
3963 |
RETURN (true); |
|
3964 |
#endif |
|
3965 |
%} |
|
3966 |
. |
|
3967 |
^ false |
|
3968 |
! |
|
3969 |
||
3970 |
glxDeltag: t in: aGLXWindowId |
|
3971 |
||
3972 |
%{ /* NOCONTEXT */ |
|
3973 |
#ifdef GLX |
|
3974 |
SETWIN(aGLXWindowId) |
|
3975 |
deltag(_tagVal(t)); |
|
3976 |
RETURN (true); |
|
3977 |
#endif |
|
3978 |
%} |
|
3979 |
. |
|
3980 |
^ false |
|
3981 |
! |
|
3982 |
||
3983 |
glxDepthcueMode: mode in: aGLXWindowId |
|
3984 |
||
3985 |
%{ /* NOCONTEXT */ |
|
3986 |
#ifdef GLX |
|
3987 |
SETWIN(aGLXWindowId) |
|
3988 |
depthcue(_booleanVal(mode)); |
|
3989 |
RETURN (true); |
|
3990 |
#endif |
|
3991 |
%} |
|
3992 |
. |
|
3993 |
^ false |
|
3994 |
! |
|
3995 |
||
3996 |
glxDitherMode: mode in: aGLXWindowId |
|
3997 |
||
3998 |
%{ /* NOCONTEXT */ |
|
3999 |
#ifdef GLX |
|
4000 |
SETWIN(aGLXWindowId) |
|
4001 |
dither(_longVal(mode)); |
|
4002 |
RETURN (true); |
|
4003 |
#endif |
|
4004 |
%} |
|
4005 |
. |
|
4006 |
^ false |
|
4007 |
! |
|
4008 |
||
4009 |
glxDopup: pup in: aGLXWindowId |
|
4010 |
||
4011 |
%{ /* NOCONTEXT */ |
|
4012 |
#ifdef GLX |
|
4013 |
SETWIN(aGLXWindowId) |
|
4014 |
dopup(_longVal(pup)); |
|
4015 |
RETURN (true); |
|
4016 |
#endif |
|
4017 |
%} |
|
4018 |
. |
|
4019 |
^ false |
|
4020 |
! |
|
4021 |
||
157 | 4022 |
glxDraw:v in: aGLXWindowId |
4023 |
||
4024 |
%{ /* NOCONTEXT */ |
|
4025 |
float vec[3], *c_v; |
|
4026 |
||
4027 |
if (! (c_v = getFloatsFromInto(v, vec, 3))) RETURN(false); |
|
4028 |
SETWIN(aGLXWindowId) |
|
4029 |
draw((Coord)(c_v[0]), (Coord)(c_v[1]), (Coord)(c_v[2])); |
|
4030 |
RETURN (true); |
|
4031 |
%} |
|
4032 |
! |
|
4033 |
||
29 | 4034 |
glxDrawX: x y: y z: z in: aGLXWindowId |
4035 |
||
4036 |
%{ /* NOCONTEXT */ |
|
4037 |
Coord c_x, c_y, c_z; |
|
4038 |
||
4039 |
_COORD_ (x, c_x) |
|
4040 |
_COORD_ (y, c_y) |
|
4041 |
_COORD_ (z, c_z) |
|
4042 |
SETWIN(aGLXWindowId) |
|
4043 |
draw(c_x, c_y, c_z); |
|
4044 |
RETURN (true); |
|
4045 |
%} |
|
4046 |
! |
|
4047 |
||
4048 |
glxDrawiX: x y: y z: z in: aGLXWindowId |
|
4049 |
||
4050 |
%{ /* NOCONTEXT */ |
|
4051 |
Icoord c_x, c_y, c_z; |
|
4052 |
||
4053 |
_ICOORD_ (x, c_x) |
|
4054 |
_ICOORD_ (y, c_y) |
|
4055 |
_ICOORD_ (z, c_z) |
|
4056 |
SETWIN(aGLXWindowId) |
|
4057 |
drawi(c_x, c_y, c_z); |
|
4058 |
RETURN (true); |
|
4059 |
%} |
|
4060 |
! |
|
4061 |
||
4062 |
glxDrawsX: x y: y z: z in: aGLXWindowId |
|
4063 |
||
4064 |
%{ /* NOCONTEXT */ |
|
4065 |
Scoord c_x, c_y, c_z; |
|
4066 |
||
4067 |
_SCOORD_ (x, c_x) |
|
4068 |
_SCOORD_ (y, c_y) |
|
4069 |
_SCOORD_ (z, c_z) |
|
4070 |
SETWIN(aGLXWindowId) |
|
4071 |
draws(c_x, c_y, c_z); |
|
4072 |
RETURN (true); |
|
4073 |
%} |
|
4074 |
! |
|
4075 |
||
157 | 4076 |
glxDraw2:v in: aGLXWindowId |
4077 |
||
4078 |
%{ /* NOCONTEXT */ |
|
4079 |
float vec[2], *c_v; |
|
4080 |
||
4081 |
if (! (c_v = getFloatsFromInto(v, vec, 2))) RETURN(false); |
|
4082 |
SETWIN(aGLXWindowId) |
|
4083 |
draw2((Coord)(c_v[0]), (Coord)(c_v[1])); |
|
4084 |
RETURN (true); |
|
4085 |
%} |
|
4086 |
! |
|
4087 |
||
29 | 4088 |
glxDraw2X: x y: y in: aGLXWindowId |
4089 |
||
4090 |
%{ /* NOCONTEXT */ |
|
4091 |
Coord c_x, c_y; |
|
4092 |
||
4093 |
_COORD_ (x, c_x) |
|
4094 |
_COORD_ (y, c_y) |
|
4095 |
SETWIN(aGLXWindowId) |
|
4096 |
draw2(c_x, c_y); |
|
4097 |
RETURN (true); |
|
4098 |
%} |
|
4099 |
! |
|
4100 |
||
4101 |
glxDraw2iX: x y: y in: aGLXWindowId |
|
4102 |
||
4103 |
%{ /* NOCONTEXT */ |
|
4104 |
Icoord c_x, c_y; |
|
4105 |
||
4106 |
_ICOORD_ (x, c_x) |
|
4107 |
_ICOORD_ (y, c_y) |
|
4108 |
SETWIN(aGLXWindowId) |
|
4109 |
draw2i(c_x, c_y); |
|
4110 |
RETURN (true); |
|
4111 |
%} |
|
4112 |
! |
|
4113 |
||
4114 |
glxDraw2sX: x y: y in: aGLXWindowId |
|
4115 |
||
4116 |
%{ /* NOCONTEXT */ |
|
4117 |
Scoord c_x, c_y; |
|
4118 |
||
4119 |
_SCOORD_ (x, c_x) |
|
4120 |
_SCOORD_ (y, c_y) |
|
4121 |
SETWIN(aGLXWindowId) |
|
4122 |
draw2s(c_x, c_y); |
|
4123 |
RETURN (true); |
|
4124 |
%} |
|
4125 |
! |
|
4126 |
||
4127 |
glxDrawmode: mode in: aGLXWindowId |
|
4128 |
||
4129 |
%{ /* NOCONTEXT */ |
|
4130 |
#ifdef GLX |
|
4131 |
SETWIN(aGLXWindowId) |
|
4132 |
drawmode(_longVal(mode)); |
|
4133 |
RETURN (true); |
|
4134 |
#endif |
|
4135 |
%} |
|
4136 |
. |
|
4137 |
^ false |
|
4138 |
! |
|
4139 |
||
4140 |
glxEditobj: obj in: aGLXWindowId |
|
4141 |
||
4142 |
%{ /* NOCONTEXT */ |
|
4143 |
#ifdef GLX |
|
4144 |
SETWIN(aGLXWindowId) |
|
4145 |
editobj(_objectVal(obj)); |
|
12 | 4146 |
RETURN (true); |
4147 |
#endif |
|
4148 |
%} |
|
4149 |
. |
|
4150 |
^ false |
|
4151 |
! |
|
4152 |
||
29 | 4153 |
glxEndfullscrnIn: aGLXWindowId |
4154 |
||
4155 |
%{ /* NOCONTEXT */ |
|
4156 |
#ifdef GLX |
|
4157 |
SETWIN(aGLXWindowId) |
|
4158 |
endfullscrn(); |
|
4159 |
RETURN (true); |
|
4160 |
#endif |
|
4161 |
%} |
|
4162 |
. |
|
4163 |
^ false |
|
4164 |
! |
|
4165 |
||
4166 |
glxFullscrnIn: aGLXWindowId |
|
4167 |
||
4168 |
%{ /* NOCONTEXT */ |
|
4169 |
#ifdef GLX |
|
4170 |
SETWIN(aGLXWindowId) |
|
4171 |
fullscrn(); |
|
4172 |
RETURN (true); |
|
4173 |
#endif |
|
4174 |
%} |
|
4175 |
. |
|
4176 |
^ false |
|
4177 |
! |
|
4178 |
||
4179 |
glxEndpupmodeIn: aGLXWindowId |
|
4180 |
||
4181 |
%{ /* NOCONTEXT */ |
|
4182 |
#ifdef GLX |
|
4183 |
SETWIN(aGLXWindowId) |
|
4184 |
endpupmode(); |
|
4185 |
RETURN (true); |
|
4186 |
#endif |
|
4187 |
%} |
|
4188 |
. |
|
4189 |
^ false |
|
4190 |
! |
|
4191 |
||
4192 |
glxPupmodeIn: aGLXWindowId |
|
4193 |
||
4194 |
%{ /* NOCONTEXT */ |
|
4195 |
#ifdef GLX |
|
4196 |
SETWIN(aGLXWindowId) |
|
4197 |
pupmode(); |
|
4198 |
RETURN (true); |
|
4199 |
#endif |
|
4200 |
%} |
|
4201 |
. |
|
4202 |
^ false |
|
4203 |
! |
|
4204 |
||
4205 |
glxFinishIn: aGLXWindowId |
|
4206 |
||
4207 |
%{ /* NOCONTEXT */ |
|
4208 |
#ifdef GLX |
|
4209 |
SETWIN(aGLXWindowId) |
|
4210 |
finish(); |
|
4211 |
RETURN (true); |
|
4212 |
#endif |
|
4213 |
%} |
|
4214 |
. |
|
4215 |
^ false |
|
4216 |
! |
|
4217 |
||
4218 |
glxFont: fntnum in: aGLXWindowId |
|
4219 |
||
4220 |
%{ /* NOCONTEXT */ |
|
4221 |
SETWIN(aGLXWindowId) |
|
4222 |
font(_shortVal(fntnum)); |
|
4223 |
RETURN (true); |
|
4224 |
%} |
|
4225 |
! |
|
4226 |
||
4227 |
glxForegroundIn: aGLXWindowId |
|
4228 |
||
4229 |
%{ /* NOCONTEXT */ |
|
4230 |
SETWIN(aGLXWindowId) |
|
4231 |
foreground(); |
|
4232 |
RETURN (true); |
|
4233 |
%} |
|
4234 |
! |
|
4235 |
||
4236 |
glxFreepup: pup in: aGLXWindowId |
|
4237 |
||
4238 |
%{ /* NOCONTEXT */ |
|
4239 |
#ifdef GLX |
|
4240 |
SETWIN(aGLXWindowId) |
|
4241 |
freepup(_longVal(pup)); |
|
4242 |
RETURN (true); |
|
4243 |
#endif |
|
4244 |
%} |
|
4245 |
. |
|
4246 |
^ false |
|
4247 |
! |
|
4248 |
||
4249 |
glxFrontface: b in: aGLXWindowId |
|
4250 |
||
4251 |
%{ /* NOCONTEXT */ |
|
4252 |
SETWIN(aGLXWindowId) |
|
4253 |
frontface(_booleanVal(b)); |
|
4254 |
RETURN (true); |
|
4255 |
%} |
|
4256 |
. |
|
4257 |
^ false |
|
4258 |
! |
|
4259 |
||
4260 |
glxFudgeXfudge: xfudge yfudge: yfudge in: aGLXWindowId |
|
4261 |
||
4262 |
%{ /* NOCONTEXT */ |
|
4263 |
#ifdef GLX |
|
4264 |
SETWIN(aGLXWindowId) |
|
4265 |
fudge(_longVal(xfudge), _longVal(yfudge)); |
|
4266 |
RETURN (true); |
|
4267 |
#endif |
|
4268 |
%} |
|
4269 |
. |
|
4270 |
^ false |
|
4271 |
! |
|
4272 |
||
4273 |
glxGbeginIn: aGLXWindowId |
|
4274 |
||
4275 |
%{ /* NOCONTEXT */ |
|
4276 |
#ifdef GLX |
|
4277 |
SETWIN(aGLXWindowId) |
|
4278 |
gbegin(); |
|
4279 |
RETURN (true); |
|
4280 |
#endif |
|
4281 |
%} |
|
4282 |
. |
|
4283 |
^ false |
|
4284 |
! |
|
4285 |
||
4286 |
glxGetbackfaceIn: aGLXWindowId |
|
4287 |
||
4288 |
%{ /* NOCONTEXT */ |
|
4289 |
#ifdef GLX |
|
4290 |
SETWIN(aGLXWindowId) |
|
4291 |
RETURN (_MKSMALLINT(getbackface())); |
|
4292 |
#endif |
|
4293 |
%} |
|
4294 |
. |
|
4295 |
^ false |
|
4296 |
! |
|
4297 |
||
4298 |
glxGentagIn: aGLXWindowId |
|
4299 |
||
4300 |
%{ /* NOCONTEXT */ |
|
4301 |
#ifdef GLX |
|
4302 |
SETWIN(aGLXWindowId) |
|
4303 |
RETURN (_MKSMALLINT(gentag())); |
|
4304 |
#endif |
|
4305 |
%} |
|
4306 |
. |
|
4307 |
^ false |
|
4308 |
! |
|
4309 |
||
4310 |
glxGetbufferIn: aGLXWindowId |
|
4311 |
||
4312 |
%{ /* NOCONTEXT */ |
|
4313 |
#ifdef GLX |
|
4314 |
SETWIN(aGLXWindowId) |
|
4315 |
RETURN (_MKSMALLINT(getbuffer())); |
|
4316 |
#endif |
|
4317 |
%} |
|
4318 |
. |
|
4319 |
^ false |
|
4320 |
! |
|
4321 |
||
4322 |
glxGetbutton: num in: aGLXWindowId |
|
4323 |
||
4324 |
%{ /* NOCONTEXT */ |
|
4325 |
SETWIN(aGLXWindowId) |
|
4326 |
RETURN (_MKSMALLINT(getbutton(_deviceVal(num)))); |
|
4327 |
%} |
|
4328 |
! |
|
4329 |
||
4330 |
glxGetcmmodeIn: aGLXWindowId |
|
4331 |
||
4332 |
%{ /* NOCONTEXT */ |
|
4333 |
#ifdef GLX |
|
4334 |
SETWIN(aGLXWindowId) |
|
4335 |
RETURN (_MKBOOLEAN(getcmmode())); |
|
4336 |
#endif |
|
4337 |
%} |
|
4338 |
. |
|
4339 |
^ false |
|
4340 |
! |
|
4341 |
||
4342 |
glxGetcolorIn: aGLXWindowId |
|
71 | 4343 |
"return the current drawing color" |
4344 |
||
4345 |
%{ /* NOCONTEXT */ |
|
29 | 4346 |
SETWIN(aGLXWindowId) |
4347 |
RETURN (_MKSMALLINT(getcolor())); |
|
4348 |
%} |
|
4349 |
! |
|
4350 |
||
4351 |
glxGetcposIn: aGLXWindowId |
|
4352 |
||
4353 |
| x y | |
|
4354 |
%{ |
|
4355 |
#ifdef GLX |
|
4356 |
short s_x, s_y; |
|
4357 |
SETWIN(aGLXWindowId) |
|
4358 |
getcpos(&s_x, &s_y); |
|
4359 |
x = _MKSMALLINT(s_x); |
|
4360 |
y = _MKSMALLINT(s_y); |
|
4361 |
#endif |
|
4362 |
%} |
|
4363 |
. |
|
4364 |
^x @ y |
|
4365 |
! |
|
4366 |
||
4367 |
glxGetdcmIn: aGLXWindowId |
|
4368 |
||
4369 |
%{ /* NOCONTEXT */ |
|
4370 |
#ifdef GLX |
|
4371 |
SETWIN(aGLXWindowId) |
|
4372 |
RETURN (_MKBOOLEAN(getdcm())); |
|
4373 |
#endif |
|
4374 |
%} |
|
4375 |
. |
|
4376 |
^ false |
|
4377 |
! |
|
4378 |
||
4379 |
glxGetdescenderIn: aGLXWindowId |
|
4380 |
||
4381 |
%{ /* NOCONTEXT */ |
|
4382 |
#ifdef GLX |
|
4383 |
SETWIN(aGLXWindowId) |
|
4384 |
RETURN (_MKSMALLINT(getdescender())); |
|
4385 |
#endif |
|
4386 |
%} |
|
4387 |
. |
|
4388 |
^ false |
|
4389 |
! |
|
4390 |
||
4391 |
glxGetdisplaymodeIn: aGLXWindowId |
|
4392 |
||
4393 |
%{ /* NOCONTEXT */ |
|
4394 |
#ifdef GLX |
|
4395 |
SETWIN(aGLXWindowId) |
|
4396 |
RETURN (_MKSMALLINT(getdisplaymode())); |
|
4397 |
#endif |
|
4398 |
%} |
|
4399 |
. |
|
4400 |
^ false |
|
4401 |
! |
|
4402 |
||
4403 |
glxGetdrawmodeIn: aGLXWindowId |
|
4404 |
||
4405 |
%{ /* NOCONTEXT */ |
|
4406 |
#ifdef GLX |
|
4407 |
SETWIN(aGLXWindowId) |
|
4408 |
RETURN (_MKSMALLINT(getdrawmode())); |
|
4409 |
#endif |
|
4410 |
%} |
|
4411 |
. |
|
4412 |
^ false |
|
4413 |
! |
|
4414 |
||
4415 |
glxGetfontIn: aGLXWindowId |
|
4416 |
||
4417 |
%{ /* NOCONTEXT */ |
|
4418 |
#ifdef GLX |
|
4419 |
SETWIN(aGLXWindowId) |
|
4420 |
RETURN (_MKSMALLINT(getfont())); |
|
4421 |
#endif |
|
4422 |
%} |
|
4423 |
. |
|
4424 |
^ false |
|
4425 |
! |
|
4426 |
||
4427 |
glxGetgconfigBuffer: buffer in: aGLXWindowId |
|
4428 |
||
4429 |
%{ /* NOCONTEXT */ |
|
46 | 4430 |
#ifdef FULL_GLX |
29 | 4431 |
SETWIN(aGLXWindowId) |
4432 |
RETURN (_MKSMALLINT(getgconfig(_longVal(buffer)))); |
|
4433 |
#endif |
|
4434 |
%} |
|
4435 |
. |
|
4436 |
^ false |
|
4437 |
! |
|
4438 |
||
4439 |
glxGetgdescInquiry: inquiry in: aGLXWindowId |
|
4440 |
||
4441 |
%{ /* NOCONTEXT */ |
|
4442 |
SETWIN(aGLXWindowId) |
|
4443 |
RETURN (_MKSMALLINT(getgdesc(_longVal(inquiry)))); |
|
4444 |
%} |
|
4445 |
! |
|
4446 |
||
4447 |
glxGetheightIn: aGLXWindowId |
|
4448 |
||
4449 |
%{ /* NOCONTEXT */ |
|
4450 |
SETWIN(aGLXWindowId) |
|
4451 |
RETURN (_MKSMALLINT(getheight())); |
|
4452 |
%} |
|
4453 |
! |
|
4454 |
||
4455 |
glxGethitcodeIn: aGLXWindowId |
|
4456 |
||
4457 |
%{ /* NOCONTEXT */ |
|
4458 |
#ifdef GLX |
|
4459 |
SETWIN(aGLXWindowId) |
|
4460 |
RETURN (_MKSMALLINT(gethitcode())); |
|
4461 |
#endif |
|
4462 |
%} |
|
4463 |
. |
|
4464 |
^ false |
|
4465 |
! |
|
4466 |
||
4467 |
glxGetlsbackupIn: aGLXWindowId |
|
4468 |
||
4469 |
%{ /* NOCONTEXT */ |
|
4470 |
#ifdef GLX |
|
4471 |
SETWIN(aGLXWindowId) |
|
4472 |
RETURN (_MKBOOLEAN(getlsbackup())); |
|
4473 |
#endif |
|
4474 |
%} |
|
4475 |
. |
|
4476 |
^ false |
|
4477 |
! |
|
4478 |
||
4479 |
glxGetlsrepeatIn: aGLXWindowId |
|
4480 |
||
4481 |
%{ /* NOCONTEXT */ |
|
4482 |
#ifdef GLX |
|
4483 |
SETWIN(aGLXWindowId) |
|
4484 |
RETURN (_MKSMALLINT(getlsrepeat())); |
|
4485 |
#endif |
|
4486 |
%} |
|
4487 |
. |
|
4488 |
^ false |
|
4489 |
! |
|
4490 |
||
4491 |
glxGetlstyleIn: aGLXWindowId |
|
4492 |
||
4493 |
%{ /* NOCONTEXT */ |
|
4494 |
#ifdef GLX |
|
4495 |
SETWIN(aGLXWindowId) |
|
4496 |
RETURN (_MKSMALLINT(getlstyle())); |
|
4497 |
#endif |
|
4498 |
%} |
|
4499 |
. |
|
4500 |
^ false |
|
4501 |
! |
|
4502 |
||
4503 |
glxGetlwidthIn: aGLXWindowId |
|
4504 |
||
4505 |
%{ /* NOCONTEXT */ |
|
4506 |
#ifdef GLX |
|
4507 |
SETWIN(aGLXWindowId) |
|
4508 |
RETURN (_MKSMALLINT(getlwidth())); |
|
4509 |
#endif |
|
4510 |
%} |
|
4511 |
. |
|
4512 |
^ false |
|
4513 |
! |
|
4514 |
||
4515 |
glxGetmapIn: aGLXWindowId |
|
4516 |
||
4517 |
%{ /* NOCONTEXT */ |
|
4518 |
#ifdef GLX |
|
4519 |
SETWIN(aGLXWindowId) |
|
4520 |
RETURN (_MKSMALLINT(getmap())); |
|
4521 |
#endif |
|
4522 |
%} |
|
4523 |
. |
|
4524 |
^ false |
|
4525 |
! |
|
4526 |
||
4527 |
glxGetmmodeIn: aGLXWindowId |
|
4528 |
||
4529 |
%{ /* NOCONTEXT */ |
|
4530 |
#ifdef GLX |
|
4531 |
SETWIN(aGLXWindowId) |
|
4532 |
RETURN (_MKSMALLINT(getmmode())); |
|
4533 |
#endif |
|
4534 |
%} |
|
4535 |
. |
|
4536 |
^ false |
|
4537 |
! |
|
4538 |
||
4539 |
glxGetmonitorIn: aGLXWindowId |
|
4540 |
||
4541 |
%{ /* NOCONTEXT */ |
|
4542 |
#ifdef GLX |
|
4543 |
SETWIN(aGLXWindowId) |
|
4544 |
RETURN (_MKSMALLINT(getmonitor())); |
|
4545 |
#endif |
|
4546 |
%} |
|
4547 |
. |
|
4548 |
^ false |
|
4549 |
! |
|
4550 |
||
4551 |
glxGetmultisampleIn: aGLXWindowId |
|
4552 |
||
4553 |
%{ /* NOCONTEXT */ |
|
46 | 4554 |
#ifdef FULL_GLX |
29 | 4555 |
SETWIN(aGLXWindowId) |
4556 |
RETURN (_MKBOOLEAN(getmultisample())); |
|
4557 |
#endif |
|
4558 |
%} |
|
4559 |
. |
|
4560 |
^ false |
|
4561 |
! |
|
4562 |
||
4563 |
glxGetothermonitorIn: aGLXWindowId |
|
4564 |
||
4565 |
%{ /* NOCONTEXT */ |
|
4566 |
#ifdef GLX |
|
4567 |
SETWIN(aGLXWindowId) |
|
4568 |
RETURN (_MKSMALLINT(getothermonitor())); |
|
4569 |
#endif |
|
4570 |
%} |
|
4571 |
. |
|
4572 |
^ false |
|
4573 |
! |
|
4574 |
||
4575 |
glxGetpatternIn: aGLXWindowId |
|
4576 |
||
4577 |
%{ /* NOCONTEXT */ |
|
4578 |
#ifdef GLX |
|
4579 |
SETWIN(aGLXWindowId) |
|
4580 |
RETURN (_MKSMALLINT(getpattern())); |
|
4581 |
#endif |
|
4582 |
%} |
|
4583 |
. |
|
4584 |
^ false |
|
4585 |
! |
|
4586 |
||
4587 |
glxGetplanesIn: aGLXWindowId |
|
4588 |
||
4589 |
%{ /* NOCONTEXT */ |
|
4590 |
#ifdef GLX |
|
4591 |
SETWIN(aGLXWindowId) |
|
4592 |
RETURN (_MKSMALLINT(getplanes())); |
|
4593 |
#endif |
|
4594 |
%} |
|
4595 |
. |
|
4596 |
^ false |
|
4597 |
! |
|
4598 |
||
4599 |
glxGetresetlsIn: aGLXWindowId |
|
4600 |
||
4601 |
%{ /* NOCONTEXT */ |
|
4602 |
#ifdef GLX |
|
4603 |
SETWIN(aGLXWindowId) |
|
4604 |
RETURN (_MKBOOLEAN(getresetls())); |
|
4605 |
#endif |
|
4606 |
%} |
|
4607 |
. |
|
4608 |
^ false |
|
4609 |
! |
|
4610 |
||
4611 |
glxGetshadeIn: aGLXWindowId |
|
4612 |
||
4613 |
%{ /* NOCONTEXT */ |
|
4614 |
#ifdef GLX |
|
4615 |
SETWIN(aGLXWindowId) |
|
4616 |
RETURN (_MKSMALLINT(getshade())); |
|
4617 |
#endif |
|
4618 |
%} |
|
4619 |
. |
|
4620 |
^ false |
|
4621 |
! |
|
4622 |
||
4623 |
glxGetsmIn: aGLXWindowId |
|
4624 |
||
4625 |
%{ /* NOCONTEXT */ |
|
4626 |
#ifdef GLX |
|
4627 |
SETWIN(aGLXWindowId) |
|
4628 |
RETURN (_MKSMALLINT(getsm())); |
|
4629 |
#endif |
|
4630 |
%} |
|
4631 |
. |
|
4632 |
^ false |
|
4633 |
! |
|
4634 |
||
4635 |
glxGetvaluator: dev in: aGLXWindowId |
|
4636 |
||
4637 |
%{ /* NOCONTEXT */ |
|
4638 |
SETWIN(aGLXWindowId) |
|
4639 |
RETURN (_MKSMALLINT(getvaluator(_deviceVal(dev)))); |
|
4640 |
%} |
|
4641 |
. |
|
4642 |
^ false |
|
4643 |
! |
|
4644 |
||
4645 |
glxGetvideo: reg in: aGLXWindowId |
|
4646 |
||
4647 |
%{ /* NOCONTEXT */ |
|
4648 |
#ifdef GLX |
|
4649 |
SETWIN(aGLXWindowId) |
|
4650 |
RETURN (_MKSMALLINT(getvideo(_longVal(reg)))); |
|
4651 |
#endif |
|
4652 |
%} |
|
4653 |
. |
|
4654 |
^ false |
|
4655 |
! |
|
4656 |
||
4657 |
glxGetwritemaskIn: aGLXWindowId |
|
4658 |
||
4659 |
%{ /* NOCONTEXT */ |
|
4660 |
#ifdef GLX |
|
4661 |
SETWIN(aGLXWindowId) |
|
4662 |
RETURN (_MKSMALLINT(getwritemask())); |
|
4663 |
#endif |
|
4664 |
%} |
|
4665 |
. |
|
4666 |
^ false |
|
4667 |
! |
|
4668 |
||
4669 |
glxGetwscrnIn: aGLXWindowId |
|
4670 |
||
4671 |
%{ /* NOCONTEXT */ |
|
4672 |
#ifdef GLX |
|
4673 |
SETWIN(aGLXWindowId) |
|
4674 |
RETURN (_MKSMALLINT(getwscrn())); |
|
4675 |
#endif |
|
4676 |
%} |
|
4677 |
. |
|
4678 |
^ false |
|
4679 |
! |
|
4680 |
||
4681 |
glxGetzbufferIn: aGLXWindowId |
|
4682 |
||
4683 |
%{ /* NOCONTEXT */ |
|
4684 |
#ifdef GLX |
|
4685 |
SETWIN(aGLXWindowId) |
|
4686 |
RETURN (_MKBOOLEAN(getzbuffer())); |
|
4687 |
#endif |
|
4688 |
%} |
|
4689 |
. |
|
4690 |
^ false |
|
4691 |
! |
|
4692 |
||
4693 |
glxGexitIn: aGLXWindowId |
|
4694 |
||
4695 |
%{ /* NOCONTEXT */ |
|
4696 |
#ifdef GLX |
|
4697 |
SETWIN(aGLXWindowId) |
|
4698 |
gexit(); |
|
4699 |
RETURN (true); |
|
4700 |
#endif |
|
4701 |
%} |
|
4702 |
. |
|
4703 |
^ false |
|
4704 |
! |
|
4705 |
||
4706 |
glxGflushIn: aGLXWindowId |
|
4707 |
||
4708 |
%{ /* NOCONTEXT */ |
|
4709 |
#ifdef GLX |
|
4710 |
SETWIN(aGLXWindowId) |
|
4711 |
gflush(); |
|
4712 |
RETURN (true); |
|
4713 |
#endif |
|
4714 |
%} |
|
4715 |
. |
|
4716 |
^ false |
|
4717 |
! |
|
4718 |
||
4719 |
glxGinitIn: aGLXWindowId |
|
4720 |
||
4721 |
%{ /* NOCONTEXT */ |
|
4722 |
#ifdef GLX |
|
4723 |
SETWIN(aGLXWindowId) |
|
4724 |
ginit(); |
|
4725 |
RETURN (true); |
|
4726 |
#endif |
|
4727 |
%} |
|
4728 |
. |
|
4729 |
^ false |
|
4730 |
! |
|
4731 |
||
4732 |
glxGlcompatMode: mode value: value in: aGLXWindowId |
|
4733 |
||
4734 |
%{ /* NOCONTEXT */ |
|
4735 |
#ifdef GLX |
|
4736 |
SETWIN(aGLXWindowId) |
|
4737 |
glcompat(_longVal(mode), _longVal(value)); |
|
4738 |
RETURN (true); |
|
4739 |
#endif |
|
4740 |
%} |
|
4741 |
. |
|
4742 |
^ false |
|
4743 |
! |
|
4744 |
||
4745 |
glxGresetIn: aGLXWindowId |
|
4746 |
||
4747 |
%{ /* NOCONTEXT */ |
|
4748 |
#ifdef GLX |
|
4749 |
SETWIN(aGLXWindowId) |
|
4750 |
greset(); |
|
4751 |
RETURN (true); |
|
4752 |
#endif |
|
4753 |
%} |
|
4754 |
. |
|
4755 |
^ false |
|
4756 |
! |
|
4757 |
||
4758 |
glxGsyncIn: aGLXWindowId |
|
4759 |
||
4760 |
%{ /* NOCONTEXT */ |
|
4761 |
#ifdef GLX |
|
4762 |
SETWIN(aGLXWindowId) |
|
4763 |
gsync(); |
|
4764 |
RETURN (true); |
|
4765 |
#endif |
|
4766 |
%} |
|
4767 |
. |
|
4768 |
^ false |
|
4769 |
! |
|
4770 |
||
4771 |
glxIconsizeX: x y: y in: aGLXWindowId |
|
4772 |
||
4773 |
%{ /* NOCONTEXT */ |
|
4774 |
#ifdef GLX |
|
4775 |
SETWIN(aGLXWindowId) |
|
4776 |
iconsize(_longVal(x), _longVal(y)); |
|
4777 |
RETURN (true); |
|
4778 |
#endif |
|
4779 |
%} |
|
4780 |
. |
|
4781 |
^ false |
|
4782 |
! |
|
4783 |
||
4784 |
glxImakebackgroundIn: aGLXWindowId |
|
4785 |
||
4786 |
%{ /* NOCONTEXT */ |
|
4787 |
#ifdef GLX |
|
4788 |
SETWIN(aGLXWindowId) |
|
4789 |
imakebackground(); |
|
4790 |
RETURN (true); |
|
4791 |
#endif |
|
4792 |
%} |
|
4793 |
. |
|
4794 |
^ false |
|
4795 |
! |
|
4796 |
||
4797 |
glxInitnamesIn: aGLXWindowId |
|
4798 |
||
4799 |
%{ /* NOCONTEXT */ |
|
4800 |
#ifdef GLX |
|
4801 |
SETWIN(aGLXWindowId) |
|
4802 |
initnames(); |
|
4803 |
RETURN (true); |
|
4804 |
#endif |
|
4805 |
%} |
|
4806 |
. |
|
4807 |
^ false |
|
4808 |
! |
|
4809 |
||
4810 |
glxIsqueued: dev in: aGLXWindowId |
|
4811 |
||
4812 |
%{ /* NOCONTEXT */ |
|
4813 |
#ifdef GLX |
|
4814 |
SETWIN(aGLXWindowId) |
|
4815 |
RETURN (_MKBOOLEAN(isqueued(_deviceVal(dev)))); |
|
4816 |
#endif |
|
4817 |
%} |
|
4818 |
. |
|
4819 |
^ false |
|
4820 |
! |
|
4821 |
||
4822 |
glxIstag: t in: aGLXWindowId |
|
4823 |
||
4824 |
%{ /* NOCONTEXT */ |
|
4825 |
#ifdef GLX |
|
4826 |
SETWIN(aGLXWindowId) |
|
4827 |
RETURN (_MKBOOLEAN(istag(_tagVal(t)))); |
|
4828 |
#endif |
|
4829 |
%} |
|
4830 |
. |
|
4831 |
^ false |
|
4832 |
! |
|
4833 |
||
4834 |
glxKeepaspectX: x y: y in: aGLXWindowId |
|
4835 |
||
4836 |
%{ /* NOCONTEXT */ |
|
4837 |
#ifdef GLX |
|
4838 |
SETWIN(aGLXWindowId) |
|
4839 |
keepaspect(_longVal(x), _longVal(y)); |
|
4840 |
RETURN (true); |
|
4841 |
#endif |
|
4842 |
%} |
|
4843 |
. |
|
4844 |
^ false |
|
4845 |
! |
|
4846 |
||
4847 |
glxLeftbuffer: bool in: aGLXWindowId |
|
4848 |
||
4849 |
%{ /* NOCONTEXT */ |
|
46 | 4850 |
#ifdef FULL_GLX |
29 | 4851 |
SETWIN(aGLXWindowId) |
4852 |
leftbuffer(_booleanVal(bool)); |
|
4853 |
RETURN (true); |
|
4854 |
#endif |
|
4855 |
%} |
|
4856 |
. |
|
4857 |
^ false |
|
4858 |
! |
|
4859 |
||
4860 |
glxRightbuffer: bool in: aGLXWindowId |
|
4861 |
||
4862 |
%{ /* NOCONTEXT */ |
|
46 | 4863 |
#ifdef FULL_GLX |
29 | 4864 |
SETWIN(aGLXWindowId) |
4865 |
rightbuffer(_booleanVal(bool)); |
|
4866 |
RETURN (true); |
|
4867 |
#endif |
|
4868 |
%} |
|
4869 |
. |
|
4870 |
^ false |
|
4871 |
! |
|
4872 |
||
4873 |
glxLinesmoothMode: mode in: aGLXWindowId |
|
4874 |
||
4875 |
%{ /* NOCONTEXT */ |
|
4876 |
#ifdef GLX |
|
4877 |
SETWIN(aGLXWindowId) |
|
185 | 4878 |
linesmooth((ulong)__intVal(mode)); |
29 | 4879 |
RETURN (true); |
4880 |
#endif |
|
4881 |
%} |
|
4882 |
. |
|
4883 |
^ false |
|
4884 |
! |
|
4885 |
||
4886 |
glxLinewidth: n in: aGLXWindowId |
|
71 | 4887 |
"set the linewidth" |
4888 |
||
4889 |
%{ /* NOCONTEXT */ |
|
29 | 4890 |
SETWIN(aGLXWindowId) |
4891 |
linewidth(_shortVal(n)); |
|
4892 |
RETURN (true); |
|
4893 |
%} |
|
4894 |
! |
|
4895 |
||
4896 |
glxLinewidthf: n in: aGLXWindowId |
|
71 | 4897 |
"set the linewidth" |
4898 |
||
4899 |
%{ /* NOCONTEXT */ |
|
29 | 4900 |
SETWIN(aGLXWindowId) |
4901 |
linewidthf(_floatVal(n)); |
|
4902 |
RETURN (true); |
|
4903 |
%} |
|
4904 |
! |
|
4905 |
||
4906 |
glxLmcolorMode: mode in: aGLXWindowId |
|
4907 |
||
4908 |
%{ /* NOCONTEXT */ |
|
4909 |
#ifdef GLX |
|
4910 |
SETWIN(aGLXWindowId) |
|
4911 |
lmcolor(_longVal(mode)); |
|
4912 |
RETURN (true); |
|
4913 |
#endif |
|
4914 |
%} |
|
4915 |
. |
|
4916 |
^ false |
|
4917 |
! |
|
4918 |
||
4919 |
glxLoadname: name in: aGLXWindowId |
|
4920 |
||
4921 |
%{ /* NOCONTEXT */ |
|
4922 |
#ifdef GLX |
|
4923 |
SETWIN(aGLXWindowId) |
|
4924 |
loadname(_shortVal(name)); |
|
4925 |
RETURN (true); |
|
4926 |
#endif |
|
4927 |
%} |
|
4928 |
. |
|
4929 |
^ false |
|
4930 |
! |
|
4931 |
||
4932 |
glxLogicop: opcode in: aGLXWindowId |
|
4933 |
||
4934 |
%{ /* NOCONTEXT */ |
|
4935 |
#ifdef GLX |
|
4936 |
SETWIN(aGLXWindowId) |
|
4937 |
logicop(_longVal(opcode)); |
|
4938 |
RETURN (true); |
|
4939 |
#endif |
|
4940 |
%} |
|
4941 |
. |
|
4942 |
^ false |
|
4943 |
! |
|
4944 |
||
4945 |
glxLrgbrangeRmin: rmin gmin: gmin bmin: bmin rmax: rmax gmax: gmax bmax: bmax |
|
4946 |
znear: znear zfar: zfar in: aGLXWindowId |
|
4947 |
||
4948 |
%{ /* NOCONTEXT */ |
|
4949 |
#ifdef GLX |
|
4950 |
SETWIN(aGLXWindowId) |
|
4951 |
lRGBrange(_shortVal(rmin), _shortVal(gmin), _shortVal(bmin), |
|
77 | 4952 |
_shortVal(rmax), _shortVal(gmax), _shortVal(bmax), |
4953 |
_longVal(znear), _longVal(zfar)); |
|
29 | 4954 |
RETURN (true); |
4955 |
#endif |
|
4956 |
%} |
|
4957 |
. |
|
4958 |
^ false |
|
4959 |
! |
|
4960 |
||
4961 |
glxLsbackup: b in: aGLXWindowId |
|
4962 |
||
4963 |
%{ /* NOCONTEXT */ |
|
4964 |
#ifdef GLX |
|
4965 |
SETWIN(aGLXWindowId) |
|
4966 |
lsbackup(_booleanVal(b)); |
|
4967 |
RETURN (true); |
|
4968 |
#endif |
|
4969 |
%} |
|
4970 |
. |
|
4971 |
^ false |
|
4972 |
! |
|
4973 |
||
4974 |
glxLsetdepthNear: near far: far in: aGLXWindowId |
|
4975 |
||
4976 |
%{ /* NOCONTEXT */ |
|
4977 |
#ifdef GLX |
|
4978 |
SETWIN(aGLXWindowId) |
|
4979 |
lsetdepth(_longVal(near), _longVal(far)); |
|
4980 |
RETURN (true); |
|
4981 |
#endif |
|
4982 |
%} |
|
4983 |
. |
|
4984 |
^ false |
|
4985 |
! |
|
4986 |
||
4987 |
glxLshaderangeLowin: lowin hiwin: hiwin znear: znear zfar: zfar in: aGLXWindowId |
|
4988 |
||
4989 |
%{ /* NOCONTEXT */ |
|
4990 |
#ifdef GLX |
|
4991 |
SETWIN(aGLXWindowId) |
|
4992 |
lshaderange(_colorindexVal(lowin), _colorindexVal(hiwin), |
|
77 | 4993 |
_longVal(znear), _longVal(zfar)); |
29 | 4994 |
RETURN (true); |
4995 |
#endif |
|
4996 |
%} |
|
4997 |
. |
|
4998 |
^ false |
|
4999 |
! |
|
5000 |
||
5001 |
glxLsrepeatFactor: factor in: aGLXWindowId |
|
5002 |
||
5003 |
%{ /* NOCONTEXT */ |
|
5004 |
#ifdef GLX |
|
5005 |
SETWIN(aGLXWindowId) |
|
5006 |
lsrepeat(_longVal(factor)); |
|
5007 |
RETURN (true); |
|
5008 |
#endif |
|
5009 |
%} |
|
5010 |
. |
|
5011 |
^ false |
|
5012 |
! |
|
5013 |
||
5014 |
glxMaketag: t in: aGLXWindowId |
|
5015 |
||
5016 |
%{ /* NOCONTEXT */ |
|
5017 |
#ifdef GLX |
|
5018 |
SETWIN(aGLXWindowId) |
|
5019 |
maketag(_tagVal(t)); |
|
5020 |
RETURN (true); |
|
5021 |
#endif |
|
5022 |
%} |
|
5023 |
. |
|
5024 |
^ false |
|
5025 |
! |
|
5026 |
||
5027 |
glxMapcolorI: i red: red green: green blue: blue in: aGLXWindowId |
|
5028 |
||
5029 |
%{ /* NOCONTEXT */ |
|
5030 |
SETWIN(aGLXWindowId) |
|
5031 |
mapcolor(_colorindexVal(i), _shortVal(red), _shortVal(green), _shortVal(blue)); |
|
5032 |
RETURN (true); |
|
5033 |
%} |
|
5034 |
! |
|
5035 |
||
5036 |
glxMaxsizeX: x y: y in: aGLXWindowId |
|
5037 |
||
5038 |
%{ /* NOCONTEXT */ |
|
5039 |
#ifdef GLX |
|
5040 |
SETWIN(aGLXWindowId) |
|
5041 |
maxsize(_longVal(x), _longVal(y)); |
|
5042 |
RETURN (true); |
|
5043 |
#endif |
|
5044 |
%} |
|
5045 |
. |
|
5046 |
^ false |
|
5047 |
! |
|
5048 |
||
5049 |
glxMinsizeX: x y: y in: aGLXWindowId |
|
5050 |
||
5051 |
%{ /* NOCONTEXT */ |
|
5052 |
#ifdef GLX |
|
5053 |
SETWIN(aGLXWindowId) |
|
5054 |
minsize(_longVal(x), _longVal(y)); |
|
5055 |
RETURN (true); |
|
5056 |
#endif |
|
5057 |
%} |
|
5058 |
. |
|
5059 |
^ false |
|
5060 |
! |
|
5061 |
||
5062 |
glxMonobufferIn: aGLXWindowId |
|
5063 |
||
5064 |
%{ /* NOCONTEXT */ |
|
46 | 5065 |
#ifdef FULL_GLX |
29 | 5066 |
SETWIN(aGLXWindowId) |
5067 |
monobuffer(); |
|
5068 |
RETURN (true); |
|
5069 |
#endif |
|
5070 |
%} |
|
5071 |
. |
|
5072 |
^ false |
|
5073 |
! |
|
5074 |
||
157 | 5075 |
glxMove:v in: aGLXWindowId |
5076 |
||
5077 |
%{ /* NOCONTEXT */ |
|
5078 |
float vec[3], *c_v; |
|
5079 |
||
5080 |
if (! (c_v = getFloatsFromInto(v, vec, 3))) RETURN(false); |
|
5081 |
SETWIN(aGLXWindowId) |
|
5082 |
move((Coord)(c_v[0]), (Coord)(c_v[1]), (Coord)(c_v[2])); |
|
5083 |
RETURN (true); |
|
5084 |
%} |
|
5085 |
! |
|
5086 |
||
29 | 5087 |
glxMoveX: x y: y z: z in: aGLXWindowId |
5088 |
||
5089 |
%{ /* NOCONTEXT */ |
|
5090 |
Coord c_x, c_y, c_z; |
|
5091 |
||
5092 |
_COORD_ (x, c_x) |
|
5093 |
_COORD_ (y, c_y) |
|
5094 |
_COORD_ (z, c_z) |
|
5095 |
SETWIN(aGLXWindowId) |
|
5096 |
move(c_x, c_y, c_z); |
|
5097 |
RETURN (true); |
|
5098 |
%} |
|
5099 |
! |
|
5100 |
||
5101 |
glxMoveiX: x y: y z: z in: aGLXWindowId |
|
5102 |
||
5103 |
%{ /* NOCONTEXT */ |
|
5104 |
Icoord c_x, c_y, c_z; |
|
5105 |
||
5106 |
_ICOORD_ (x, c_x) |
|
5107 |
_ICOORD_ (y, c_y) |
|
5108 |
_ICOORD_ (z, c_z) |
|
5109 |
SETWIN(aGLXWindowId) |
|
5110 |
movei(c_x, c_y, c_z); |
|
5111 |
RETURN (true); |
|
5112 |
%} |
|
5113 |
! |
|
5114 |
||
5115 |
glxMovesX: x y: y z: z in: aGLXWindowId |
|
5116 |
||
5117 |
%{ /* NOCONTEXT */ |
|
5118 |
Scoord c_x, c_y, c_z; |
|
5119 |
||
5120 |
_SCOORD_ (x, c_x) |
|
5121 |
_SCOORD_ (y, c_y) |
|
5122 |
_SCOORD_ (z, c_z) |
|
5123 |
SETWIN(aGLXWindowId) |
|
5124 |
moves(c_x, c_y, c_z); |
|
5125 |
RETURN (true); |
|
5126 |
%} |
|
5127 |
! |
|
5128 |
||
157 | 5129 |
glxMove2:v in: aGLXWindowId |
5130 |
||
5131 |
%{ /* NOCONTEXT */ |
|
5132 |
float vec[2], *c_v; |
|
5133 |
||
5134 |
if (! (c_v = getFloatsFromInto(v, vec, 2))) RETURN(false); |
|
5135 |
SETWIN(aGLXWindowId) |
|
5136 |
move2((Coord)(c_v[0]), (Coord)(c_v[1])); |
|
5137 |
RETURN (true); |
|
5138 |
%} |
|
5139 |
! |
|
5140 |
||
29 | 5141 |
glxMove2X: x y: y in: aGLXWindowId |
5142 |
||
5143 |
%{ /* NOCONTEXT */ |
|
5144 |
Coord c_x, c_y; |
|
5145 |
||
5146 |
_COORD_ (x, c_x) |
|
5147 |
_COORD_ (y, c_y) |
|
5148 |
SETWIN(aGLXWindowId) |
|
5149 |
move2(c_x, c_y); |
|
5150 |
RETURN (true); |
|
5151 |
%} |
|
5152 |
! |
|
5153 |
||
5154 |
glxMove2iX: x y: y in: aGLXWindowId |
|
5155 |
||
5156 |
%{ /* NOCONTEXT */ |
|
5157 |
Icoord c_x, c_y; |
|
5158 |
||
5159 |
_ICOORD_ (x, c_x) |
|
5160 |
_ICOORD_ (y, c_y) |
|
5161 |
SETWIN(aGLXWindowId) |
|
5162 |
move2i(c_x, c_y); |
|
5163 |
RETURN (true); |
|
5164 |
%} |
|
5165 |
! |
|
5166 |
||
5167 |
glxMove2sX: x y: y in: aGLXWindowId |
|
5168 |
||
5169 |
%{ /* NOCONTEXT */ |
|
5170 |
Scoord c_x, c_y; |
|
5171 |
||
5172 |
_SCOORD_ (x, c_x) |
|
5173 |
_SCOORD_ (y, c_y) |
|
5174 |
SETWIN(aGLXWindowId) |
|
5175 |
move2s(c_x, c_y); |
|
5176 |
RETURN (true); |
|
5177 |
%} |
|
5178 |
! |
|
5179 |
||
5180 |
glxMsalphaMode: mode in: aGLXWindowId |
|
5181 |
||
5182 |
%{ /* NOCONTEXT */ |
|
46 | 5183 |
#ifdef FULL_GLX |
29 | 5184 |
SETWIN(aGLXWindowId) |
5185 |
msalpha(_longVal(mode)); |
|
5186 |
RETURN (true); |
|
5187 |
#endif |
|
5188 |
%} |
|
5189 |
. |
|
5190 |
^ false |
|
5191 |
! |
|
5192 |
||
5193 |
glxMsmask: mask inverse: inverse in: aGLXWindowId |
|
5194 |
||
5195 |
%{ /* NOCONTEXT */ |
|
46 | 5196 |
#ifdef FULL_GLX |
29 | 5197 |
SETWIN(aGLXWindowId) |
5198 |
msmask(_floatVal(mask), _booleanVal(inverse)); |
|
5199 |
RETURN (true); |
|
5200 |
#endif |
|
5201 |
%} |
|
5202 |
. |
|
5203 |
^ false |
|
5204 |
! |
|
5205 |
||
5206 |
glxMspattern: pattern in: aGLXWindowId |
|
5207 |
||
5208 |
%{ /* NOCONTEXT */ |
|
46 | 5209 |
#ifdef FULL_GLX |
29 | 5210 |
SETWIN(aGLXWindowId) |
5211 |
mspattern(_longVal(pattern)); |
|
5212 |
RETURN (true); |
|
5213 |
#endif |
|
5214 |
%} |
|
5215 |
. |
|
5216 |
^ false |
|
5217 |
! |
|
5218 |
||
5219 |
glxMssizeSamples: samples zsize: zsize ssize: ssize in: aGLXWindowId |
|
5220 |
||
5221 |
%{ /* NOCONTEXT */ |
|
46 | 5222 |
#ifdef FULL_GLX |
29 | 5223 |
SETWIN(aGLXWindowId) |
5224 |
mssize(_longVal(samples), _longVal(zsize), _longVal(ssize)); |
|
5225 |
RETURN (true); |
|
5226 |
#endif |
|
5227 |
%} |
|
5228 |
. |
|
5229 |
^ false |
|
5230 |
! |
|
5231 |
||
5232 |
glxMswapbuffers: fbuf in: aGLXWindowId |
|
5233 |
||
5234 |
%{ /* NOCONTEXT */ |
|
5235 |
#ifdef GLX |
|
5236 |
SETWIN(aGLXWindowId) |
|
5237 |
mswapbuffers(_longVal(fbuf)); |
|
5238 |
RETURN (true); |
|
5239 |
#endif |
|
5240 |
%} |
|
5241 |
. |
|
5242 |
^ false |
|
5243 |
! |
|
5244 |
||
5245 |
glxMultimapIn: aGLXWindowId |
|
5246 |
||
5247 |
%{ /* NOCONTEXT */ |
|
5248 |
#ifdef GLX |
|
5249 |
SETWIN(aGLXWindowId) |
|
5250 |
multimap(); |
|
5251 |
RETURN (true); |
|
5252 |
#endif |
|
5253 |
%} |
|
5254 |
. |
|
5255 |
^ false |
|
5256 |
! |
|
5257 |
||
5258 |
glxMultisample: bool in: aGLXWindowId |
|
5259 |
||
5260 |
%{ /* NOCONTEXT */ |
|
46 | 5261 |
#ifdef FULL_GLX |
29 | 5262 |
SETWIN(aGLXWindowId) |
5263 |
multisample(_booleanVal(bool)); |
|
5264 |
RETURN (true); |
|
5265 |
#endif |
|
5266 |
%} |
|
5267 |
. |
|
5268 |
^ false |
|
5269 |
! |
|
5270 |
||
5271 |
glxNewpupIn: aGLXWindowId |
|
5272 |
||
5273 |
%{ /* NOCONTEXT */ |
|
5274 |
#ifdef GLX |
|
5275 |
SETWIN(aGLXWindowId) |
|
5276 |
RETURN (_MKSMALLINT(newpup())); |
|
5277 |
#endif |
|
5278 |
%} |
|
5279 |
. |
|
5280 |
^ false |
|
5281 |
! |
|
5282 |
||
5283 |
glxNewtag: newtg oldtg: oldtg offst: offst in: aGLXWindowId |
|
5284 |
||
5285 |
%{ /* NOCONTEXT */ |
|
5286 |
#ifdef GLX |
|
5287 |
SETWIN(aGLXWindowId) |
|
5288 |
newtag(_tagVal(newtg), _tagVal(oldtg), _offsetVal(offst)); |
|
5289 |
RETURN (true); |
|
5290 |
#endif |
|
5291 |
%} |
|
5292 |
. |
|
5293 |
^ false |
|
5294 |
! |
|
5295 |
||
5296 |
glxNoborderIn: aGLXWindowId |
|
5297 |
||
5298 |
%{ /* NOCONTEXT */ |
|
5299 |
#ifdef GLX |
|
5300 |
SETWIN(aGLXWindowId) |
|
5301 |
noborder(); |
|
5302 |
RETURN (true); |
|
5303 |
#endif |
|
5304 |
%} |
|
5305 |
. |
|
5306 |
^ false |
|
5307 |
! |
|
5308 |
||
5309 |
glxNoise: v delta: delta in: aGLXWindowId |
|
5310 |
||
5311 |
%{ /* NOCONTEXT */ |
|
5312 |
#ifdef GLX |
|
5313 |
SETWIN(aGLXWindowId) |
|
5314 |
noise(_deviceVal(v), _shortVal(delta)); |
|
5315 |
RETURN (true); |
|
5316 |
#endif |
|
5317 |
%} |
|
5318 |
. |
|
5319 |
^ false |
|
5320 |
! |
|
5321 |
||
5322 |
glxNoportIn: aGLXWindowId |
|
5323 |
||
5324 |
%{ /* NOCONTEXT */ |
|
5325 |
#ifdef GLX |
|
5326 |
SETWIN(aGLXWindowId) |
|
5327 |
noport(); |
|
5328 |
RETURN (true); |
|
5329 |
#endif |
|
5330 |
%} |
|
5331 |
. |
|
5332 |
^ false |
|
5333 |
! |
|
5334 |
||
5335 |
glxNurbscurveKnotCount: knotCount knotList: knotList |
|
5336 |
offset: offset ctlArray: ctlArray |
|
5337 |
order: order type: type in: aGLXWindowId |
|
5338 |
||
5339 |
| ctlPoints i | |
|
5340 |
ctlPoints := DoubleArray new: ctlArray size * (ctlArray first size). |
|
5341 |
i := 1. |
|
5342 |
ctlArray do: [:point | |
|
77 | 5343 |
point do: [:coord | |
5344 |
ctlPoints at: i put: coord. |
|
5345 |
i := i + 1]]. |
|
29 | 5346 |
|
5347 |
%{ /* NOCONTEXT */ |
|
5348 |
#ifdef GLX |
|
5349 |
char *knotElements, *ctlElements; |
|
5350 |
OBJ cls; |
|
5351 |
int ninstVars, nInstBytes; |
|
5352 |
||
5353 |
SETWIN(aGLXWindowId) |
|
134 | 5354 |
cls = __qClass(ctlPoints); |
185 | 5355 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
29 | 5356 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
5357 |
||
5358 |
ctlElements = (char *)(_InstPtr(ctlPoints)) + nInstBytes; |
|
5359 |
knotElements = (char *)(_InstPtr(knotList)) + nInstBytes; |
|
5360 |
||
5361 |
nurbscurve ( |
|
77 | 5362 |
_longVal(knotCount), (double *)knotElements, |
5363 |
_longVal(offset), (double *)ctlElements, |
|
5364 |
_longVal(order), _longVal(type)); |
|
29 | 5365 |
RETURN(true); |
5366 |
#endif |
|
5367 |
%} |
|
5368 |
. |
|
5369 |
^ false |
|
5370 |
! |
|
5371 |
||
5372 |
glxObjdeleteTag1: tag1 tag2: tag2 in: aGLXWindowId |
|
5373 |
||
5374 |
%{ /* NOCONTEXT */ |
|
5375 |
#ifdef GLX |
|
5376 |
SETWIN(aGLXWindowId) |
|
5377 |
objdelete(_tagVal(tag1), _tagVal(tag2)); |
|
5378 |
RETURN (true); |
|
5379 |
#endif |
|
5380 |
%} |
|
5381 |
. |
|
5382 |
^ false |
|
5383 |
! |
|
5384 |
||
5385 |
glxObjinsert: t in: aGLXWindowId |
|
5386 |
||
5387 |
%{ /* NOCONTEXT */ |
|
5388 |
#ifdef GLX |
|
5389 |
SETWIN(aGLXWindowId) |
|
5390 |
objinsert(_tagVal(t)); |
|
5391 |
RETURN (true); |
|
5392 |
#endif |
|
5393 |
%} |
|
5394 |
. |
|
5395 |
^ false |
|
5396 |
! |
|
5397 |
||
5398 |
glxObjreplace: t in: aGLXWindowId |
|
5399 |
||
5400 |
%{ /* NOCONTEXT */ |
|
5401 |
#ifdef GLX |
|
5402 |
SETWIN(aGLXWindowId) |
|
5403 |
objreplace(_tagVal(t)); |
|
5404 |
RETURN (true); |
|
5405 |
#endif |
|
5406 |
%} |
|
5407 |
. |
|
5408 |
^ false |
|
5409 |
! |
|
5410 |
||
5411 |
glxOnemapIn: aGLXWindowId |
|
5412 |
||
5413 |
%{ /* NOCONTEXT */ |
|
5414 |
#ifdef GLX |
|
5415 |
SETWIN(aGLXWindowId) |
|
5416 |
onemap(); |
|
5417 |
RETURN (true); |
|
5418 |
#endif |
|
5419 |
%} |
|
5420 |
. |
|
5421 |
^ false |
|
5422 |
! |
|
5423 |
||
5424 |
glxPagecolor: pcolor in: aGLXWindowId |
|
5425 |
||
5426 |
%{ /* NOCONTEXT */ |
|
5427 |
#ifdef GLX |
|
5428 |
SETWIN(aGLXWindowId) |
|
5429 |
pagecolor(_colorindexVal(pcolor)); |
|
5430 |
RETURN (true); |
|
5431 |
#endif |
|
5432 |
%} |
|
5433 |
. |
|
5434 |
^ false |
|
5435 |
! |
|
5436 |
||
5437 |
glxPassthroughToken: token in: aGLXWindowId |
|
5438 |
||
5439 |
%{ /* NOCONTEXT */ |
|
5440 |
#ifdef GLX |
|
5441 |
SETWIN(aGLXWindowId) |
|
5442 |
passthrough(_shortVal(token)); |
|
5443 |
RETURN (true); |
|
5444 |
#endif |
|
5445 |
%} |
|
5446 |
. |
|
5447 |
^ false |
|
5448 |
! |
|
5449 |
||
5450 |
glxPclosIn: aGLXWindowId |
|
5451 |
||
5452 |
%{ /* NOCONTEXT */ |
|
5453 |
#ifdef GLX |
|
5454 |
SETWIN(aGLXWindowId) |
|
5455 |
pclos(); |
|
5456 |
RETURN (true); |
|
5457 |
#endif |
|
5458 |
%} |
|
5459 |
. |
|
5460 |
^ false |
|
5461 |
! |
|
5462 |
||
5463 |
glxPdrX: x y: y z: z in: aGLXWindowId |
|
5464 |
||
5465 |
%{ /* NOCONTEXT */ |
|
5466 |
Coord c_x, c_y, c_z; |
|
5467 |
||
5468 |
_COORD_ (x, c_x) |
|
5469 |
_COORD_ (y, c_y) |
|
5470 |
_COORD_ (z, c_z) |
|
5471 |
SETWIN(aGLXWindowId) |
|
5472 |
pdr(c_x, c_y, c_z); |
|
5473 |
RETURN (true); |
|
5474 |
%} |
|
5475 |
! |
|
5476 |
||
5477 |
glxPdriX: x y: y z: z in: aGLXWindowId |
|
5478 |
||
5479 |
%{ /* NOCONTEXT */ |
|
5480 |
Icoord c_x, c_y, c_z; |
|
5481 |
||
5482 |
_ICOORD_ (x, c_x) |
|
5483 |
_ICOORD_ (y, c_y) |
|
5484 |
_ICOORD_ (z, c_z) |
|
5485 |
SETWIN(aGLXWindowId) |
|
5486 |
pdri(c_x, c_y, c_z); |
|
5487 |
RETURN (true); |
|
5488 |
%} |
|
5489 |
! |
|
5490 |
||
5491 |
glxPdrsX: x y: y z: z in: aGLXWindowId |
|
5492 |
||
5493 |
%{ /* NOCONTEXT */ |
|
5494 |
Scoord c_x, c_y, c_z; |
|
5495 |
||
5496 |
_SCOORD_ (x, c_x) |
|
5497 |
_SCOORD_ (y, c_y) |
|
5498 |
_SCOORD_ (z, c_z) |
|
5499 |
SETWIN(aGLXWindowId) |
|
5500 |
pdrs(c_x, c_y, c_z); |
|
5501 |
RETURN (true); |
|
5502 |
%} |
|
5503 |
! |
|
5504 |
||
5505 |
glxPdr2X: x y: y in: aGLXWindowId |
|
5506 |
||
5507 |
%{ /* NOCONTEXT */ |
|
5508 |
Coord c_x, c_y; |
|
5509 |
||
5510 |
_COORD_ (x, c_x) |
|
5511 |
_COORD_ (y, c_y) |
|
5512 |
SETWIN(aGLXWindowId) |
|
5513 |
pdr2(c_x, c_y); |
|
5514 |
RETURN (true); |
|
5515 |
%} |
|
5516 |
! |
|
5517 |
||
5518 |
glxPdr2iX: x y: y in: aGLXWindowId |
|
5519 |
||
5520 |
%{ /* NOCONTEXT */ |
|
5521 |
Icoord c_x, c_y; |
|
5522 |
||
5523 |
_ICOORD_ (x, c_x) |
|
5524 |
_ICOORD_ (y, c_y) |
|
5525 |
SETWIN(aGLXWindowId) |
|
5526 |
pdr2i(c_x, c_y); |
|
5527 |
RETURN (true); |
|
5528 |
%} |
|
5529 |
! |
|
5530 |
||
5531 |
glxPdr2sX: x y: y in: aGLXWindowId |
|
5532 |
||
5533 |
%{ /* NOCONTEXT */ |
|
5534 |
Scoord c_x, c_y; |
|
5535 |
||
5536 |
_SCOORD_ (x, c_x) |
|
5537 |
_SCOORD_ (y, c_y) |
|
5538 |
SETWIN(aGLXWindowId) |
|
5539 |
pdr2s(c_x, c_y); |
|
5540 |
RETURN (true); |
|
5541 |
%} |
|
5542 |
! |
|
5543 |
||
5544 |
glxPicksizeX: x y: y in: aGLXWindowId |
|
5545 |
||
5546 |
%{ /* NOCONTEXT */ |
|
5547 |
#ifdef GLX |
|
5548 |
SETWIN(aGLXWindowId) |
|
5549 |
picksize(_shortVal(x), _shortVal(y)); |
|
5550 |
RETURN (true); |
|
5551 |
#endif |
|
5552 |
%} |
|
5553 |
. |
|
5554 |
^ false |
|
5555 |
! |
|
5556 |
||
5557 |
glxPixmode: mode value: value in: aGLXWindowId |
|
5558 |
||
5559 |
%{ /* NOCONTEXT */ |
|
5560 |
#ifdef GLX |
|
5561 |
SETWIN(aGLXWindowId) |
|
5562 |
pixmode(_longVal(mode), _longVal(value)); |
|
5563 |
RETURN (true); |
|
5564 |
#endif |
|
5565 |
%} |
|
5566 |
. |
|
5567 |
^ false |
|
5568 |
! |
|
5569 |
||
5570 |
glxPmvX: x y: y z: z in: aGLXWindowId |
|
5571 |
||
5572 |
%{ /* NOCONTEXT */ |
|
5573 |
Coord c_x, c_y, c_z; |
|
5574 |
||
5575 |
_COORD_ (x, c_x) |
|
5576 |
_COORD_ (y, c_y) |
|
5577 |
_COORD_ (z, c_z) |
|
5578 |
SETWIN(aGLXWindowId) |
|
5579 |
pmv(c_x, c_y, c_z); |
|
5580 |
RETURN (true); |
|
5581 |
%} |
|
5582 |
! |
|
5583 |
||
5584 |
glxPmviX: x y: y z: z in: aGLXWindowId |
|
5585 |
||
5586 |
%{ /* NOCONTEXT */ |
|
5587 |
Icoord c_x, c_y, c_z; |
|
5588 |
||
5589 |
_ICOORD_ (x, c_x) |
|
5590 |
_ICOORD_ (y, c_y) |
|
5591 |
_ICOORD_ (z, c_z) |
|
5592 |
SETWIN(aGLXWindowId) |
|
5593 |
pmvi(c_x, c_y, c_z); |
|
5594 |
RETURN (true); |
|
5595 |
%} |
|
5596 |
! |
|
5597 |
||
5598 |
glxPmvsX: x y: y z: z in: aGLXWindowId |
|
5599 |
||
5600 |
%{ /* NOCONTEXT */ |
|
5601 |
Scoord c_x, c_y, c_z; |
|
5602 |
||
5603 |
_SCOORD_ (x, c_x) |
|
5604 |
_SCOORD_ (y, c_y) |
|
5605 |
_SCOORD_ (z, c_z) |
|
5606 |
SETWIN(aGLXWindowId) |
|
5607 |
pmvs(c_x, c_y, c_z); |
|
5608 |
RETURN (true); |
|
5609 |
%} |
|
5610 |
! |
|
5611 |
||
5612 |
glxPmv2X: x y: y in: aGLXWindowId |
|
5613 |
||
5614 |
%{ /* NOCONTEXT */ |
|
5615 |
Coord c_x, c_y; |
|
5616 |
||
5617 |
_COORD_ (x, c_x) |
|
5618 |
_COORD_ (y, c_y) |
|
5619 |
SETWIN(aGLXWindowId) |
|
5620 |
pmv2(c_x, c_y); |
|
5621 |
RETURN (true); |
|
5622 |
%} |
|
5623 |
! |
|
5624 |
||
5625 |
glxPmv2iX: x y: y in: aGLXWindowId |
|
5626 |
||
5627 |
%{ /* NOCONTEXT */ |
|
5628 |
Icoord c_x, c_y; |
|
5629 |
||
5630 |
_ICOORD_ (x, c_x) |
|
5631 |
_ICOORD_ (y, c_y) |
|
5632 |
SETWIN(aGLXWindowId) |
|
5633 |
pmv2i(c_x, c_y); |
|
5634 |
RETURN (true); |
|
5635 |
%} |
|
5636 |
! |
|
5637 |
||
5638 |
glxPmv2sX: x y: y in: aGLXWindowId |
|
5639 |
||
5640 |
%{ /* NOCONTEXT */ |
|
5641 |
Scoord c_x, c_y; |
|
5642 |
||
5643 |
_SCOORD_ (x, c_x) |
|
5644 |
_SCOORD_ (y, c_y) |
|
5645 |
SETWIN(aGLXWindowId) |
|
5646 |
pmv2s(c_x, c_y); |
|
5647 |
RETURN (true); |
|
5648 |
%} |
|
5649 |
! |
|
5650 |
||
5651 |
glxPntX: x y: y z: z in: aGLXWindowId |
|
5652 |
||
5653 |
%{ /* NOCONTEXT */ |
|
5654 |
Coord c_x, c_y, c_z; |
|
5655 |
||
5656 |
_COORD_ (x, c_x) |
|
5657 |
_COORD_ (y, c_y) |
|
5658 |
_COORD_ (z, c_z) |
|
5659 |
SETWIN(aGLXWindowId) |
|
5660 |
pnt(c_x, c_y, c_z); |
|
5661 |
RETURN (true); |
|
5662 |
%} |
|
5663 |
! |
|
5664 |
||
5665 |
glxPntiX: x y: y z: z in: aGLXWindowId |
|
5666 |
||
5667 |
%{ /* NOCONTEXT */ |
|
5668 |
Icoord c_x, c_y, c_z; |
|
5669 |
||
5670 |
_ICOORD_ (x, c_x) |
|
5671 |
_ICOORD_ (y, c_y) |
|
5672 |
_ICOORD_ (z, c_z) |
|
5673 |
SETWIN(aGLXWindowId) |
|
5674 |
pnti(c_x, c_y, c_z); |
|
5675 |
RETURN (true); |
|
5676 |
%} |
|
5677 |
! |
|
5678 |
||
5679 |
glxPntsX: x y: y z: z in: aGLXWindowId |
|
5680 |
||
5681 |
%{ /* NOCONTEXT */ |
|
5682 |
Scoord c_x, c_y, c_z; |
|
5683 |
||
5684 |
_SCOORD_ (x, c_x) |
|
5685 |
_SCOORD_ (y, c_y) |
|
5686 |
_SCOORD_ (z, c_z) |
|
5687 |
SETWIN(aGLXWindowId) |
|
5688 |
pnts(c_x, c_y, c_z); |
|
5689 |
RETURN (true); |
|
5690 |
%} |
|
5691 |
! |
|
5692 |
||
5693 |
glxPnt2X: x y: y in: aGLXWindowId |
|
5694 |
||
5695 |
%{ /* NOCONTEXT */ |
|
5696 |
Coord c_x, c_y; |
|
5697 |
||
5698 |
_COORD_ (x, c_x) |
|
5699 |
_COORD_ (y, c_y) |
|
5700 |
SETWIN(aGLXWindowId) |
|
5701 |
pnt2(c_x, c_y); |
|
5702 |
RETURN (true); |
|
5703 |
%} |
|
5704 |
! |
|
5705 |
||
5706 |
glxPnt2iX: x y: y in: aGLXWindowId |
|
5707 |
||
5708 |
%{ /* NOCONTEXT */ |
|
5709 |
Icoord c_x, c_y; |
|
5710 |
||
5711 |
_ICOORD_ (x, c_x) |
|
5712 |
_ICOORD_ (y, c_y) |
|
5713 |
SETWIN(aGLXWindowId) |
|
5714 |
pnt2i(c_x, c_y); |
|
5715 |
RETURN (true); |
|
5716 |
%} |
|
5717 |
! |
|
5718 |
||
5719 |
glxPnt2sX: x y: y in: aGLXWindowId |
|
5720 |
||
5721 |
%{ /* NOCONTEXT */ |
|
5722 |
Scoord c_x, c_y; |
|
5723 |
||
5724 |
_SCOORD_ (x, c_x) |
|
5725 |
_SCOORD_ (y, c_y) |
|
5726 |
SETWIN(aGLXWindowId) |
|
5727 |
pnt2s(c_x, c_y); |
|
5728 |
RETURN (true); |
|
5729 |
%} |
|
5730 |
! |
|
5731 |
||
5732 |
glxPntsize: n in: aGLXWindowId |
|
5733 |
||
5734 |
%{ /* NOCONTEXT */ |
|
5735 |
#ifdef GLX |
|
5736 |
SETWIN(aGLXWindowId) |
|
5737 |
pntsize(_shortVal(n)); |
|
5738 |
RETURN (true); |
|
5739 |
#endif |
|
5740 |
%} |
|
5741 |
. |
|
5742 |
^ false |
|
5743 |
! |
|
5744 |
||
5745 |
glxPntsizef: n in: aGLXWindowId |
|
5746 |
||
5747 |
%{ /* NOCONTEXT */ |
|
5748 |
#ifdef GLX |
|
5749 |
SETWIN(aGLXWindowId) |
|
5750 |
pntsizef(_floatVal(n)); |
|
5751 |
RETURN (true); |
|
5752 |
#endif |
|
5753 |
%} |
|
5754 |
. |
|
5755 |
^ false |
|
5756 |
! |
|
5757 |
||
5758 |
glxPntsmoothMode: mode in: aGLXWindowId |
|
5759 |
||
5760 |
%{ /* NOCONTEXT */ |
|
5761 |
#ifdef GLX |
|
5762 |
SETWIN(aGLXWindowId) |
|
185 | 5763 |
pntsmooth((ulong)__intVal(mode)); |
29 | 5764 |
RETURN (true); |
5765 |
#endif |
|
5766 |
%} |
|
5767 |
. |
|
5768 |
^ false |
|
5769 |
! |
|
5770 |
||
5771 |
glxPolymode: mode in: aGLXWindowId |
|
5772 |
||
5773 |
%{ /* NOCONTEXT */ |
|
5774 |
SETWIN(aGLXWindowId) |
|
5775 |
polymode(_longVal(mode)); |
|
5776 |
RETURN (true); |
|
5777 |
%} |
|
5778 |
! |
|
5779 |
||
5780 |
glxPolysmoothMode: mode in: aGLXWindowId |
|
5781 |
||
5782 |
%{ /* NOCONTEXT */ |
|
5783 |
#ifdef GLX |
|
5784 |
SETWIN(aGLXWindowId) |
|
5785 |
polysmooth(_longVal(mode)); |
|
5786 |
RETURN (true); |
|
5787 |
#endif |
|
5788 |
%} |
|
5789 |
. |
|
5790 |
^ false |
|
5791 |
! |
|
5792 |
||
5793 |
glxPopattributesIn: aGLXWindowId |
|
5794 |
||
5795 |
%{ /* NOCONTEXT */ |
|
5796 |
SETWIN(aGLXWindowId) |
|
5797 |
popattributes(); |
|
5798 |
RETURN (true); |
|
5799 |
%} |
|
5800 |
! |
|
5801 |
||
5802 |
glxPopnameIn: aGLXWindowId |
|
5803 |
||
5804 |
%{ /* NOCONTEXT */ |
|
5805 |
#ifdef GLX |
|
5806 |
SETWIN(aGLXWindowId) |
|
5807 |
popname(); |
|
5808 |
RETURN (true); |
|
5809 |
#endif |
|
5810 |
%} |
|
5811 |
. |
|
5812 |
^ false |
|
5813 |
! |
|
5814 |
||
5815 |
glxPopviewportIn: aGLXWindowId |
|
5816 |
||
5817 |
%{ /* NOCONTEXT */ |
|
5818 |
SETWIN(aGLXWindowId) |
|
5819 |
popviewport(); |
|
5820 |
RETURN (true); |
|
5821 |
%} |
|
5822 |
! |
|
5823 |
||
5824 |
glxPrefpositionX1: x1 x2: x2 y1: y1 y2: y2 in: aGLXWindowId |
|
5825 |
||
5826 |
%{ /* NOCONTEXT */ |
|
5827 |
SETWIN(aGLXWindowId) |
|
5828 |
prefposition(_longVal(x1), _longVal(x2), _longVal(y1), _longVal(y2)); |
|
5829 |
RETURN (true); |
|
5830 |
%} |
|
5831 |
! |
|
5832 |
||
5833 |
glxPrefsizeX: x y: y in: aGLXWindowId |
|
5834 |
||
5835 |
%{ /* NOCONTEXT */ |
|
5836 |
SETWIN(aGLXWindowId) |
|
5837 |
prefsize(_longVal(x), _longVal(y)); |
|
5838 |
RETURN (true); |
|
5839 |
%} |
|
5840 |
! |
|
5841 |
||
5842 |
glxPushattributesIn: aGLXWindowId |
|
5843 |
||
5844 |
%{ /* NOCONTEXT */ |
|
5845 |
SETWIN(aGLXWindowId) |
|
5846 |
pushattributes(); |
|
5847 |
RETURN (true); |
|
5848 |
%} |
|
5849 |
! |
|
5850 |
||
5851 |
glxPushname: name In: aGLXWindowId |
|
5852 |
||
5853 |
%{ /* NOCONTEXT */ |
|
5854 |
#ifdef GLX |
|
5855 |
SETWIN(aGLXWindowId) |
|
5856 |
pushname(_shortVal(name)); |
|
5857 |
RETURN (true); |
|
5858 |
#endif |
|
5859 |
%} |
|
5860 |
. |
|
5861 |
^ false |
|
5862 |
! |
|
5863 |
||
5864 |
glxPushviewportIn: aGLXWindowId |
|
5865 |
||
5866 |
%{ /* NOCONTEXT */ |
|
5867 |
SETWIN(aGLXWindowId) |
|
5868 |
pushviewport(); |
|
5869 |
RETURN (true); |
|
5870 |
%} |
|
5871 |
! |
|
5872 |
||
5873 |
glxQdevice: dev in: aGLXWindowId |
|
5874 |
||
5875 |
%{ /* NOCONTEXT */ |
|
5876 |
SETWIN(aGLXWindowId) |
|
5877 |
qdevice(_deviceVal(dev)); |
|
5878 |
RETURN (true); |
|
5879 |
%} |
|
5880 |
! |
|
5881 |
||
5882 |
glxQenterDev: dev val: val in: aGLXWindowId |
|
5883 |
||
5884 |
%{ /* NOCONTEXT */ |
|
5885 |
SETWIN(aGLXWindowId) |
|
5886 |
qenter(_deviceVal(dev), _shortVal(val)); |
|
5887 |
RETURN (true); |
|
5888 |
%} |
|
5889 |
! |
|
5890 |
||
5891 |
glxQgetfdIn: aGLXWindowId |
|
5892 |
||
5893 |
%{ /* NOCONTEXT */ |
|
5894 |
#ifdef GLX |
|
5895 |
SETWIN(aGLXWindowId) |
|
5896 |
RETURN (_MKSMALLINT(qgetfd())); |
|
5897 |
#endif |
|
5898 |
%} |
|
5899 |
. |
|
5900 |
^ false |
|
5901 |
! |
|
5902 |
||
5903 |
glxQreadIn: aGLXWindowId |
|
5904 |
||
5905 |
| dev data | |
|
5906 |
%{ |
|
5907 |
short c_data; |
|
5908 |
||
5909 |
SETWIN(aGLXWindowId) |
|
5910 |
dev = _MKSMALLINT(qread(&c_data)); |
|
5911 |
data = _MKSMALLINT(c_data); |
|
5912 |
%} |
|
5913 |
. |
|
5914 |
^ Array with: dev with: data |
|
5915 |
! |
|
5916 |
||
5917 |
glxQresetIn: aGLXWindowId |
|
5918 |
||
5919 |
%{ /* NOCONTEXT */ |
|
5920 |
SETWIN(aGLXWindowId) |
|
5921 |
qreset(); |
|
5922 |
RETURN (true); |
|
5923 |
%} |
|
5924 |
! |
|
5925 |
||
5926 |
glxQtestIn: aGLXWindowId |
|
5927 |
||
5928 |
%{ /* NOCONTEXT */ |
|
5929 |
SETWIN(aGLXWindowId) |
|
5930 |
RETURN (_MKSMALLINT(qtest())); |
|
5931 |
%} |
|
5932 |
! |
|
5933 |
||
157 | 5934 |
glxRdr:v in: aGLXWindowId |
5935 |
||
5936 |
%{ /* NOCONTEXT */ |
|
5937 |
float vec[3], *c_v; |
|
5938 |
||
5939 |
if (! (c_v = getFloatsFromInto(v, vec, 3))) RETURN(false); |
|
5940 |
SETWIN(aGLXWindowId) |
|
5941 |
rdr((Coord)(c_v[0]), (Coord)(c_v[1]), (Coord)(c_v[2])); |
|
5942 |
RETURN (true); |
|
5943 |
%} |
|
5944 |
! |
|
5945 |
||
29 | 5946 |
glxRdrX: x y: y z: z in: aGLXWindowId |
5947 |
||
5948 |
%{ /* NOCONTEXT */ |
|
5949 |
Coord c_x, c_y, c_z; |
|
5950 |
||
5951 |
_COORD_ (x, c_x) |
|
5952 |
_COORD_ (y, c_y) |
|
5953 |
_COORD_ (z, c_z) |
|
5954 |
SETWIN(aGLXWindowId) |
|
5955 |
rdr(c_x, c_y, c_z); |
|
5956 |
RETURN (true); |
|
5957 |
%} |
|
5958 |
! |
|
5959 |
||
5960 |
glxRdriX: x y: y z: z in: aGLXWindowId |
|
5961 |
||
5962 |
%{ /* NOCONTEXT */ |
|
5963 |
Icoord c_x, c_y, c_z; |
|
5964 |
||
5965 |
_ICOORD_ (x, c_x) |
|
5966 |
_ICOORD_ (y, c_y) |
|
5967 |
_ICOORD_ (z, c_z) |
|
5968 |
SETWIN(aGLXWindowId) |
|
5969 |
rdri(c_x, c_y, c_z); |
|
5970 |
RETURN (true); |
|
5971 |
%} |
|
5972 |
! |
|
5973 |
||
5974 |
glxRdrsX: x y: y z: z in: aGLXWindowId |
|
5975 |
||
5976 |
%{ /* NOCONTEXT */ |
|
5977 |
Scoord c_x, c_y, c_z; |
|
5978 |
||
5979 |
_SCOORD_ (x, c_x) |
|
5980 |
_SCOORD_ (y, c_y) |
|
5981 |
_SCOORD_ (z, c_z) |
|
5982 |
SETWIN(aGLXWindowId) |
|
5983 |
rdrs(c_x, c_y, c_z); |
|
5984 |
RETURN (true); |
|
5985 |
%} |
|
5986 |
! |
|
5987 |
||
157 | 5988 |
glxRdr2:v in: aGLXWindowId |
5989 |
||
5990 |
%{ /* NOCONTEXT */ |
|
5991 |
float vec[2], *c_v; |
|
5992 |
||
5993 |
if (! (c_v = getFloatsFromInto(v, vec, 2))) RETURN(false); |
|
5994 |
SETWIN(aGLXWindowId) |
|
5995 |
rdr2((Coord)(c_v[0]), (Coord)(c_v[1])); |
|
5996 |
RETURN (true); |
|
5997 |
%} |
|
5998 |
! |
|
5999 |
||
29 | 6000 |
glxRdr2X: x y: y in: aGLXWindowId |
6001 |
||
6002 |
%{ /* NOCONTEXT */ |
|
6003 |
Coord c_x, c_y; |
|
6004 |
||
6005 |
_COORD_ (x, c_x) |
|
6006 |
_COORD_ (y, c_y) |
|
6007 |
SETWIN(aGLXWindowId) |
|
6008 |
rdr2(c_x, c_y); |
|
6009 |
RETURN (true); |
|
6010 |
%} |
|
6011 |
! |
|
6012 |
||
6013 |
glxRdr2iX: x y: y in: aGLXWindowId |
|
6014 |
||
6015 |
%{ /* NOCONTEXT */ |
|
6016 |
Icoord c_x, c_y; |
|
6017 |
||
6018 |
_ICOORD_ (x, c_x) |
|
6019 |
_ICOORD_ (y, c_y) |
|
6020 |
SETWIN(aGLXWindowId) |
|
6021 |
rdr2i(c_x, c_y); |
|
6022 |
RETURN (true); |
|
6023 |
%} |
|
6024 |
! |
|
6025 |
||
6026 |
glxRdr2sX: x y: y in: aGLXWindowId |
|
6027 |
||
6028 |
%{ /* NOCONTEXT */ |
|
6029 |
Scoord c_x, c_y; |
|
6030 |
||
6031 |
_SCOORD_ (x, c_x) |
|
6032 |
_SCOORD_ (y, c_y) |
|
6033 |
SETWIN(aGLXWindowId) |
|
6034 |
rdr2s(c_x, c_y); |
|
6035 |
RETURN (true); |
|
6036 |
%} |
|
6037 |
! |
|
6038 |
||
6039 |
glxReadsource: src in: aGLXWindowId |
|
6040 |
||
6041 |
%{ /* NOCONTEXT */ |
|
6042 |
#ifdef GLX |
|
6043 |
SETWIN(aGLXWindowId) |
|
6044 |
readsource(_longVal(src)); |
|
6045 |
RETURN (true); |
|
6046 |
#endif |
|
6047 |
%} |
|
6048 |
. |
|
6049 |
^ false |
|
6050 |
! |
|
6051 |
||
6052 |
glxRectX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
6053 |
||
6054 |
%{ /* NOCONTEXT */ |
|
6055 |
SETWIN(aGLXWindowId) |
|
6056 |
rect(_coordVal(x1), _coordVal(y1), _coordVal(x2), _coordVal(y2)); |
|
6057 |
RETURN (true); |
|
6058 |
%} |
|
6059 |
! |
|
6060 |
||
6061 |
glxRectiX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
6062 |
||
6063 |
%{ /* NOCONTEXT */ |
|
6064 |
SETWIN(aGLXWindowId) |
|
6065 |
recti(_icoordVal(x1), _icoordVal(y1), _icoordVal(x2), _icoordVal(y2)); |
|
6066 |
RETURN (true); |
|
6067 |
%} |
|
6068 |
! |
|
6069 |
||
6070 |
glxRectsX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
6071 |
||
6072 |
%{ /* NOCONTEXT */ |
|
6073 |
SETWIN(aGLXWindowId) |
|
6074 |
rects(_scoordVal(x1), _scoordVal(y1), _scoordVal(x2), _scoordVal(y2)); |
|
6075 |
RETURN (true); |
|
6076 |
%} |
|
6077 |
! |
|
6078 |
||
6079 |
glxRectfX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
6080 |
||
6081 |
%{ /* NOCONTEXT */ |
|
6082 |
SETWIN(aGLXWindowId) |
|
6083 |
rectf(_coordVal(x1), _coordVal(y1), _coordVal(x2), _coordVal(y2)); |
|
6084 |
RETURN (true); |
|
6085 |
%} |
|
6086 |
! |
|
6087 |
||
6088 |
glxRectfiX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
6089 |
||
6090 |
%{ /* NOCONTEXT */ |
|
6091 |
SETWIN(aGLXWindowId) |
|
6092 |
rectfi(_icoordVal(x1), _icoordVal(y1), _icoordVal(x2), _icoordVal(y2)); |
|
6093 |
RETURN (true); |
|
6094 |
%} |
|
6095 |
! |
|
6096 |
||
6097 |
glxRectfsX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
6098 |
||
6099 |
%{ /* NOCONTEXT */ |
|
6100 |
SETWIN(aGLXWindowId) |
|
6101 |
rectfs(_scoordVal(x1), _scoordVal(y1), _scoordVal(x2), _scoordVal(y2)); |
|
6102 |
RETURN (true); |
|
6103 |
%} |
|
6104 |
! |
|
6105 |
||
6106 |
glxRectcopyX1: x1 y1: y1 x2: x2 y2: y2 newx: newx newy: newy in: aGLXWindowId |
|
6107 |
||
6108 |
%{ /* NOCONTEXT */ |
|
6109 |
#ifdef GLX |
|
6110 |
SETWIN(aGLXWindowId) |
|
6111 |
rectcopy(_screencoordVal(x1), _screencoordVal(y1), |
|
77 | 6112 |
_screencoordVal(x2), _screencoordVal(y2), |
6113 |
_screencoordVal(newx), _screencoordVal(newy)); |
|
29 | 6114 |
RETURN (true); |
6115 |
#endif |
|
6116 |
%} |
|
6117 |
. |
|
6118 |
^ false |
|
6119 |
! |
|
6120 |
||
6121 |
glxRectzoomX: xfactor y: yfactor in: aGLXWindowId |
|
6122 |
||
6123 |
%{ /* NOCONTEXT */ |
|
6124 |
#ifdef GLX |
|
6125 |
SETWIN(aGLXWindowId) |
|
6126 |
rectzoom(_floatVal(xfactor), _floatVal(yfactor)); |
|
6127 |
RETURN (true); |
|
6128 |
#endif |
|
6129 |
%} |
|
6130 |
. |
|
6131 |
^ false |
|
6132 |
! |
|
6133 |
||
6134 |
glxResetls: b in: aGLXWindowId |
|
6135 |
||
6136 |
%{ /* NOCONTEXT */ |
|
6137 |
#ifdef GLX |
|
6138 |
SETWIN(aGLXWindowId) |
|
6139 |
resetls(_booleanVal(b)); |
|
6140 |
RETURN (true); |
|
6141 |
#endif |
|
6142 |
%} |
|
6143 |
. |
|
6144 |
^ false |
|
6145 |
! |
|
6146 |
||
6147 |
glxRGBcursorIndex: index red: red green: green blue: blue |
|
6148 |
redm: redm greenm: greenm bluem: bluem in: aGLXWindowId |
|
6149 |
||
6150 |
%{ /* NOCONTEXT */ |
|
6151 |
#ifdef GLX |
|
6152 |
SETWIN(aGLXWindowId) |
|
6153 |
RGBcursor(_shortVal(index), |
|
77 | 6154 |
_shortVal(red), _shortVal(green), _shortVal(blue), |
6155 |
_shortVal(redm), _shortVal(greenm), _shortVal(bluem)); |
|
29 | 6156 |
RETURN (true); |
6157 |
#endif |
|
6158 |
%} |
|
6159 |
. |
|
6160 |
^ false |
|
6161 |
! |
|
6162 |
||
6163 |
glxRGBwritemaskRed: red green: green blue: blue in: aGLXWindowId |
|
6164 |
||
6165 |
%{ /* NOCONTEXT */ |
|
6166 |
#ifdef GLX |
|
6167 |
SETWIN(aGLXWindowId) |
|
6168 |
RGBwritemask(_shortVal(red), _shortVal(green), _shortVal(blue)); |
|
6169 |
RETURN (true); |
|
6170 |
#endif |
|
6171 |
%} |
|
6172 |
. |
|
6173 |
^ false |
|
6174 |
! |
|
6175 |
||
6176 |
glxRingbellIn: aGLXWindowId |
|
6177 |
||
6178 |
%{ /* NOCONTEXT */ |
|
6179 |
#ifdef GLX |
|
6180 |
SETWIN(aGLXWindowId) |
|
6181 |
ringbell(); |
|
6182 |
RETURN (true); |
|
6183 |
#endif |
|
6184 |
%} |
|
6185 |
. |
|
6186 |
^ false |
|
6187 |
! |
|
6188 |
||
157 | 6189 |
glxRmv:v in: aGLXWindowId |
6190 |
||
6191 |
%{ /* NOCONTEXT */ |
|
6192 |
float vec[3], *c_v; |
|
6193 |
||
6194 |
if (! (c_v = getFloatsFromInto(v, vec, 3))) RETURN(false); |
|
6195 |
SETWIN(aGLXWindowId) |
|
6196 |
rmv((Coord)(c_v[0]), (Coord)(c_v[1]), (Coord)(c_v[2])); |
|
6197 |
RETURN (true); |
|
6198 |
%} |
|
6199 |
! |
|
6200 |
||
29 | 6201 |
glxRmvX: x y: y z: z in: aGLXWindowId |
6202 |
||
6203 |
%{ /* NOCONTEXT */ |
|
6204 |
Coord c_x, c_y, c_z; |
|
6205 |
||
6206 |
_COORD_ (x, c_x) |
|
6207 |
_COORD_ (y, c_y) |
|
6208 |
_COORD_ (z, c_z) |
|
6209 |
SETWIN(aGLXWindowId) |
|
6210 |
rmv(c_x, c_y, c_z); |
|
6211 |
RETURN (true); |
|
6212 |
%} |
|
6213 |
! |
|
6214 |
||
6215 |
glxRmviX: x y: y z: z in: aGLXWindowId |
|
6216 |
||
6217 |
%{ /* NOCONTEXT */ |
|
6218 |
Icoord c_x, c_y, c_z; |
|
6219 |
||
6220 |
_ICOORD_ (x, c_x) |
|
6221 |
_ICOORD_ (y, c_y) |
|
6222 |
_ICOORD_ (z, c_z) |
|
6223 |
SETWIN(aGLXWindowId) |
|
6224 |
rmvi(c_x, c_y, c_z); |
|
6225 |
RETURN (true); |
|
6226 |
%} |
|
6227 |
! |
|
6228 |
||
6229 |
glxRmvsX: x y: y z: z in: aGLXWindowId |
|
6230 |
||
6231 |
%{ /* NOCONTEXT */ |
|
6232 |
Scoord c_x, c_y, c_z; |
|
6233 |
||
6234 |
_SCOORD_ (x, c_x) |
|
6235 |
_SCOORD_ (y, c_y) |
|
6236 |
_SCOORD_ (z, c_z) |
|
6237 |
SETWIN(aGLXWindowId) |
|
6238 |
rmvs(c_x, c_y, c_z); |
|
6239 |
RETURN (true); |
|
6240 |
%} |
|
6241 |
! |
|
6242 |
||
157 | 6243 |
glxRmv2:v in: aGLXWindowId |
6244 |
||
6245 |
%{ /* NOCONTEXT */ |
|
6246 |
float vec[2], *c_v; |
|
6247 |
||
6248 |
if (! (c_v = getFloatsFromInto(v, vec, 2))) RETURN(false); |
|
6249 |
SETWIN(aGLXWindowId) |
|
6250 |
rmv2((Coord)(c_v[0]), (Coord)(c_v[1])); |
|
6251 |
RETURN (true); |
|
6252 |
%} |
|
6253 |
! |
|
6254 |
||
29 | 6255 |
glxRmv2X: x y: y in: aGLXWindowId |
6256 |
||
6257 |
%{ /* NOCONTEXT */ |
|
6258 |
Coord c_x, c_y; |
|
6259 |
||
6260 |
_COORD_ (x, c_x) |
|
6261 |
_COORD_ (y, c_y) |
|
6262 |
SETWIN(aGLXWindowId) |
|
6263 |
rmv2(c_x, c_y); |
|
6264 |
RETURN (true); |
|
6265 |
%} |
|
6266 |
! |
|
6267 |
||
6268 |
glxRmv2iX: x y: y in: aGLXWindowId |
|
6269 |
||
6270 |
%{ /* NOCONTEXT */ |
|
6271 |
Icoord c_x, c_y; |
|
6272 |
||
6273 |
_ICOORD_ (x, c_x) |
|
6274 |
_ICOORD_ (y, c_y) |
|
6275 |
SETWIN(aGLXWindowId) |
|
6276 |
rmv2i(c_x, c_y); |
|
6277 |
RETURN (true); |
|
6278 |
%} |
|
6279 |
! |
|
6280 |
||
6281 |
glxRmv2sX: x y: y in: aGLXWindowId |
|
6282 |
||
6283 |
%{ /* NOCONTEXT */ |
|
6284 |
Scoord c_x, c_y; |
|
6285 |
||
6286 |
_SCOORD_ (x, c_x) |
|
6287 |
_SCOORD_ (y, c_y) |
|
6288 |
SETWIN(aGLXWindowId) |
|
6289 |
rmv2s(c_x, c_y); |
|
6290 |
RETURN (true); |
|
6291 |
%} |
|
6292 |
! |
|
6293 |
||
6294 |
glxRpdrX: x y: y z: z in: aGLXWindowId |
|
6295 |
||
6296 |
%{ /* NOCONTEXT */ |
|
6297 |
Coord c_x, c_y, c_z; |
|
6298 |
||
6299 |
_COORD_ (x, c_x) |
|
6300 |
_COORD_ (y, c_y) |
|
6301 |
_COORD_ (z, c_z) |
|
6302 |
SETWIN(aGLXWindowId) |
|
6303 |
rpdr(c_x, c_y, c_z); |
|
6304 |
RETURN (true); |
|
6305 |
%} |
|
6306 |
! |
|
6307 |
||
6308 |
glxRpdriX: x y: y z: z in: aGLXWindowId |
|
6309 |
||
6310 |
%{ /* NOCONTEXT */ |
|
6311 |
Icoord c_x, c_y, c_z; |
|
6312 |
||
6313 |
_ICOORD_ (x, c_x) |
|
6314 |
_ICOORD_ (y, c_y) |
|
6315 |
_ICOORD_ (z, c_z) |
|
6316 |
SETWIN(aGLXWindowId) |
|
6317 |
rpdri(c_x, c_y, c_z); |
|
6318 |
RETURN (true); |
|
6319 |
%} |
|
6320 |
! |
|
6321 |
||
6322 |
glxRpdrsX: x y: y z: z in: aGLXWindowId |
|
6323 |
||
6324 |
%{ /* NOCONTEXT */ |
|
6325 |
Scoord c_x, c_y, c_z; |
|
6326 |
||
6327 |
_SCOORD_ (x, c_x) |
|
6328 |
_SCOORD_ (y, c_y) |
|
6329 |
_SCOORD_ (z, c_z) |
|
6330 |
SETWIN(aGLXWindowId) |
|
6331 |
rpdrs(c_x, c_y, c_z); |
|
6332 |
RETURN (true); |
|
6333 |
%} |
|
6334 |
! |
|
6335 |
||
6336 |
glxRpdr2X: x y: y in: aGLXWindowId |
|
6337 |
||
6338 |
%{ /* NOCONTEXT */ |
|
6339 |
Coord c_x, c_y; |
|
6340 |
||
6341 |
_COORD_ (x, c_x) |
|
6342 |
_COORD_ (y, c_y) |
|
6343 |
SETWIN(aGLXWindowId) |
|
6344 |
rpdr2(c_x, c_y); |
|
6345 |
RETURN (true); |
|
6346 |
%} |
|
6347 |
! |
|
6348 |
||
6349 |
glxRpdr2iX: x y: y in: aGLXWindowId |
|
6350 |
||
6351 |
%{ /* NOCONTEXT */ |
|
6352 |
Icoord c_x, c_y; |
|
6353 |
||
6354 |
_ICOORD_ (x, c_x) |
|
6355 |
_ICOORD_ (y, c_y) |
|
6356 |
SETWIN(aGLXWindowId) |
|
6357 |
rpdr2i(c_x, c_y); |
|
6358 |
RETURN (true); |
|
6359 |
%} |
|
6360 |
! |
|
6361 |
||
6362 |
glxRpdr2sX: x y: y in: aGLXWindowId |
|
6363 |
||
6364 |
%{ /* NOCONTEXT */ |
|
6365 |
Scoord c_x, c_y; |
|
6366 |
||
6367 |
_SCOORD_ (x, c_x) |
|
6368 |
_SCOORD_ (y, c_y) |
|
6369 |
SETWIN(aGLXWindowId) |
|
6370 |
rpdr2s(c_x, c_y); |
|
6371 |
RETURN (true); |
|
6372 |
%} |
|
6373 |
! |
|
6374 |
||
6375 |
glxRpmvX: x y: y z: z in: aGLXWindowId |
|
6376 |
||
6377 |
%{ /* NOCONTEXT */ |
|
6378 |
Coord c_x, c_y, c_z; |
|
6379 |
||
6380 |
_COORD_ (x, c_x) |
|
6381 |
_COORD_ (y, c_y) |
|
6382 |
_COORD_ (z, c_z) |
|
6383 |
SETWIN(aGLXWindowId) |
|
6384 |
rpmv(c_x, c_y, c_z); |
|
6385 |
RETURN (true); |
|
6386 |
%} |
|
6387 |
! |
|
6388 |
||
6389 |
glxRpmviX: x y: y z: z in: aGLXWindowId |
|
6390 |
||
6391 |
%{ /* NOCONTEXT */ |
|
6392 |
Icoord c_x, c_y, c_z; |
|
6393 |
||
6394 |
_ICOORD_ (x, c_x) |
|
6395 |
_ICOORD_ (y, c_y) |
|
6396 |
_ICOORD_ (z, c_z) |
|
6397 |
SETWIN(aGLXWindowId) |
|
6398 |
rpmvi(c_x, c_y, c_z); |
|
6399 |
RETURN (true); |
|
6400 |
%} |
|
6401 |
! |
|
6402 |
||
6403 |
glxRpmvsX: x y: y z: z in: aGLXWindowId |
|
6404 |
||
6405 |
%{ /* NOCONTEXT */ |
|
6406 |
Scoord c_x, c_y, c_z; |
|
6407 |
||
6408 |
_SCOORD_ (x, c_x) |
|
6409 |
_SCOORD_ (y, c_y) |
|
6410 |
_SCOORD_ (z, c_z) |
|
6411 |
SETWIN(aGLXWindowId) |
|
6412 |
rpmvs(c_x, c_y, c_z); |
|
6413 |
RETURN (true); |
|
6414 |
%} |
|
6415 |
! |
|
6416 |
||
6417 |
glxRpmv2X: x y: y in: aGLXWindowId |
|
6418 |
||
6419 |
%{ /* NOCONTEXT */ |
|
6420 |
Coord c_x, c_y; |
|
6421 |
||
6422 |
_COORD_ (x, c_x) |
|
6423 |
_COORD_ (y, c_y) |
|
6424 |
SETWIN(aGLXWindowId) |
|
6425 |
rpmv2(c_x, c_y); |
|
6426 |
RETURN (true); |
|
6427 |
%} |
|
6428 |
! |
|
6429 |
||
6430 |
glxRpmv2iX: x y: y in: aGLXWindowId |
|
6431 |
||
6432 |
%{ /* NOCONTEXT */ |
|
6433 |
Icoord c_x, c_y; |
|
6434 |
||
6435 |
_ICOORD_ (x, c_x) |
|
6436 |
_ICOORD_ (y, c_y) |
|
6437 |
SETWIN(aGLXWindowId) |
|
6438 |
rpmv2i(c_x, c_y); |
|
6439 |
RETURN (true); |
|
6440 |
%} |
|
6441 |
! |
|
6442 |
||
6443 |
glxRpmv2sX: x y: y in: aGLXWindowId |
|
6444 |
||
6445 |
%{ /* NOCONTEXT */ |
|
6446 |
Scoord c_x, c_y; |
|
6447 |
||
6448 |
_SCOORD_ (x, c_x) |
|
6449 |
_SCOORD_ (y, c_y) |
|
6450 |
SETWIN(aGLXWindowId) |
|
6451 |
rpmv2s(c_x, c_y); |
|
6452 |
RETURN (true); |
|
6453 |
%} |
|
6454 |
! |
|
6455 |
||
6456 |
glxSboxX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
6457 |
||
6458 |
%{ /* NOCONTEXT */ |
|
6459 |
#ifdef GLX |
|
6460 |
SETWIN(aGLXWindowId) |
|
6461 |
sbox(_coordVal(x1), _coordVal(y1), _coordVal(x2), _coordVal(y2)); |
|
6462 |
RETURN (true); |
|
6463 |
#endif |
|
6464 |
%} |
|
6465 |
. |
|
6466 |
^ false |
|
6467 |
! |
|
6468 |
||
6469 |
glxSboxiX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
6470 |
||
6471 |
%{ /* NOCONTEXT */ |
|
6472 |
#ifdef GLX |
|
6473 |
SETWIN(aGLXWindowId) |
|
6474 |
sboxi(_icoordVal(x1), _icoordVal(y1), _icoordVal(x2), _icoordVal(y2)); |
|
6475 |
RETURN (true); |
|
6476 |
#endif |
|
6477 |
%} |
|
6478 |
. |
|
6479 |
^ false |
|
6480 |
! |
|
6481 |
||
6482 |
glxSboxsX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
6483 |
||
6484 |
%{ /* NOCONTEXT */ |
|
6485 |
#ifdef GLX |
|
6486 |
SETWIN(aGLXWindowId) |
|
6487 |
sboxs(_scoordVal(x1), _scoordVal(y1), _scoordVal(x2), _scoordVal(y2)); |
|
6488 |
RETURN (true); |
|
6489 |
#endif |
|
6490 |
%} |
|
6491 |
. |
|
6492 |
^ false |
|
6493 |
! |
|
6494 |
||
6495 |
glxSboxfX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
6496 |
||
6497 |
%{ /* NOCONTEXT */ |
|
6498 |
#ifdef GLX |
|
6499 |
SETWIN(aGLXWindowId) |
|
6500 |
sboxf(_coordVal(x1), _coordVal(y1), _coordVal(x2), _coordVal(y2)); |
|
6501 |
RETURN (true); |
|
6502 |
#endif |
|
6503 |
%} |
|
6504 |
. |
|
6505 |
^ false |
|
6506 |
! |
|
6507 |
||
6508 |
glxSboxfiX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
6509 |
||
6510 |
%{ /* NOCONTEXT */ |
|
6511 |
#ifdef GLX |
|
6512 |
SETWIN(aGLXWindowId) |
|
6513 |
sboxfi(_icoordVal(x1), _icoordVal(y1), _icoordVal(x2), _icoordVal(y2)); |
|
6514 |
RETURN (true); |
|
6515 |
#endif |
|
6516 |
%} |
|
6517 |
. |
|
6518 |
^ false |
|
6519 |
! |
|
6520 |
||
6521 |
glxSboxfsX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
6522 |
||
6523 |
%{ /* NOCONTEXT */ |
|
6524 |
#ifdef GLX |
|
6525 |
SETWIN(aGLXWindowId) |
|
6526 |
sboxfs(_scoordVal(x1), _scoordVal(y1), _scoordVal(x2), _scoordVal(y2)); |
|
6527 |
RETURN (true); |
|
6528 |
#endif |
|
6529 |
%} |
|
6530 |
. |
|
6531 |
^ false |
|
6532 |
! |
|
6533 |
||
6534 |
glxSclearSval: sval in: aGLXWindowId |
|
6535 |
||
6536 |
%{ /* NOCONTEXT */ |
|
6537 |
#ifdef GLX |
|
6538 |
SETWIN(aGLXWindowId) |
|
185 | 6539 |
sclear((ulong)__intVal(sval)); |
29 | 6540 |
RETURN (true); |
6541 |
#endif |
|
6542 |
%} |
|
6543 |
. |
|
6544 |
^ false |
|
6545 |
! |
|
6546 |
||
6547 |
glxScrbox: arg in: aGLXWindowId |
|
6548 |
||
6549 |
%{ /* NOCONTEXT */ |
|
6550 |
#ifdef GLX |
|
6551 |
SETWIN(aGLXWindowId) |
|
6552 |
scrbox(_longVal(arg)); |
|
6553 |
RETURN (true); |
|
6554 |
#endif |
|
6555 |
%} |
|
6556 |
. |
|
6557 |
^ false |
|
6558 |
! |
|
6559 |
||
6560 |
glxScreenspaceIn: aGLXWindowId |
|
6561 |
||
6562 |
%{ /* NOCONTEXT */ |
|
6563 |
#ifdef GLX |
|
6564 |
SETWIN(aGLXWindowId) |
|
6565 |
screenspace(); |
|
6566 |
RETURN (true); |
|
6567 |
#endif |
|
6568 |
%} |
|
6569 |
. |
|
6570 |
^ false |
|
6571 |
! |
|
6572 |
||
6573 |
glxScrmaskLeft: left right: right bottom: bottom top: top in: aGLXWindowId |
|
6574 |
||
6575 |
%{ /* NOCONTEXT */ |
|
6576 |
#ifdef GLX |
|
6577 |
SETWIN(aGLXWindowId) |
|
6578 |
scrmask(_screencoordVal(left), _screencoordVal(right), |
|
77 | 6579 |
_screencoordVal(bottom), _screencoordVal(top)); |
29 | 6580 |
RETURN (true); |
6581 |
#endif |
|
6582 |
%} |
|
6583 |
. |
|
6584 |
^ false |
|
6585 |
! |
|
6586 |
||
6587 |
glxScrnattach: gsnr in: aGLXWindowId |
|
6588 |
||
6589 |
%{ /* NOCONTEXT */ |
|
6590 |
#ifdef GLX |
|
6591 |
SETWIN(aGLXWindowId) |
|
6592 |
scrnattach(_longVal(gsnr)); |
|
6593 |
RETURN (true); |
|
6594 |
#endif |
|
6595 |
%} |
|
6596 |
. |
|
6597 |
^ false |
|
6598 |
! |
|
6599 |
||
6600 |
glxScrnselect: gsnr in: aGLXWindowId |
|
6601 |
||
6602 |
%{ /* NOCONTEXT */ |
|
6603 |
#ifdef GLX |
|
6604 |
SETWIN(aGLXWindowId) |
|
6605 |
scrnselect(_longVal(gsnr)); |
|
6606 |
RETURN (true); |
|
6607 |
#endif |
|
6608 |
%} |
|
6609 |
. |
|
6610 |
^ false |
|
6611 |
! |
|
6612 |
||
6613 |
glxSetcursorIndex: index color: color wtn: wtn in: aGLXWindowId |
|
6614 |
||
6615 |
%{ /* NOCONTEXT */ |
|
6616 |
#ifdef GLX |
|
6617 |
SETWIN(aGLXWindowId) |
|
6618 |
setcursor(_shortVal(index), _colorindexVal(color), _colorindexVal(wtn)); |
|
6619 |
RETURN (true); |
|
6620 |
#endif |
|
6621 |
%} |
|
6622 |
. |
|
6623 |
^ false |
|
6624 |
! |
|
6625 |
||
6626 |
glxSetdblightsMask: mask in: aGLXWindowId |
|
6627 |
||
6628 |
%{ /* NOCONTEXT */ |
|
6629 |
#ifdef GLX |
|
6630 |
SETWIN(aGLXWindowId) |
|
185 | 6631 |
setdblights((ulong)__intVal(mask)); |
29 | 6632 |
RETURN (true); |
6633 |
#endif |
|
6634 |
%} |
|
6635 |
. |
|
6636 |
^ false |
|
6637 |
! |
|
6638 |
||
6639 |
glxSetdepthNear: near far: far in: aGLXWindowId |
|
6640 |
||
6641 |
%{ /* NOCONTEXT */ |
|
6642 |
#ifdef GLX |
|
6643 |
SETWIN(aGLXWindowId) |
|
6644 |
setdepth(_screencoordVal(near), _screencoordVal(far)); |
|
6645 |
RETURN (true); |
|
6646 |
#endif |
|
6647 |
%} |
|
6648 |
. |
|
6649 |
^ false |
|
6650 |
! |
|
6651 |
||
6652 |
glxSetlinestyle: index in: aGLXWindowId |
|
71 | 6653 |
"set the linestyle" |
6654 |
||
6655 |
%{ /* NOCONTEXT */ |
|
29 | 6656 |
SETWIN(aGLXWindowId) |
6657 |
setlinestyle(_shortVal(index)); |
|
6658 |
RETURN (true); |
|
6659 |
%} |
|
6660 |
. |
|
6661 |
^ false |
|
6662 |
! |
|
6663 |
||
6664 |
glxSetmap: mapnum in: aGLXWindowId |
|
6665 |
||
6666 |
%{ /* NOCONTEXT */ |
|
6667 |
#ifdef GLX |
|
6668 |
SETWIN(aGLXWindowId) |
|
6669 |
setmap(_shortVal(mapnum)); |
|
6670 |
RETURN (true); |
|
6671 |
#endif |
|
6672 |
%} |
|
6673 |
. |
|
6674 |
^ false |
|
6675 |
! |
|
6676 |
||
6677 |
glxSetmonitor: mtype in: aGLXWindowId |
|
6678 |
||
6679 |
%{ /* NOCONTEXT */ |
|
6680 |
#ifdef GLX |
|
6681 |
SETWIN(aGLXWindowId) |
|
6682 |
setmonitor(_shortVal(mtype)); |
|
6683 |
RETURN (true); |
|
6684 |
#endif |
|
6685 |
%} |
|
6686 |
. |
|
6687 |
^ false |
|
6688 |
! |
|
6689 |
||
6690 |
glxSetnurbsproperty: property value: value in: aGLXWindowId |
|
6691 |
||
6692 |
%{ /* NOCONTEXT */ |
|
6693 |
#ifdef GLX |
|
6694 |
SETWIN(aGLXWindowId) |
|
6695 |
setnurbsproperty(_longVal(property), _floatVal(value)); |
|
6696 |
RETURN (true); |
|
6697 |
#endif |
|
6698 |
%} |
|
6699 |
. |
|
6700 |
^ false |
|
6701 |
! |
|
6702 |
||
6703 |
glxSetpattern: index in: aGLXWindowId |
|
6704 |
||
6705 |
%{ /* NOCONTEXT */ |
|
6706 |
#ifdef GLX |
|
6707 |
SETWIN(aGLXWindowId) |
|
6708 |
setpattern(_shortVal(index)); |
|
6709 |
RETURN (true); |
|
6710 |
#endif |
|
6711 |
%} |
|
6712 |
. |
|
6713 |
^ false |
|
6714 |
! |
|
6715 |
||
6716 |
glxSetpup: pup entry: entry mode: mode in: aGLXWindowId |
|
6717 |
||
6718 |
%{ /* NOCONTEXT */ |
|
6719 |
#ifdef GLX |
|
6720 |
SETWIN(aGLXWindowId) |
|
185 | 6721 |
setpup(_longVal(pup), _longVal(entry), (ulong)__intVal(mode)); |
29 | 6722 |
RETURN (true); |
6723 |
#endif |
|
6724 |
%} |
|
6725 |
. |
|
6726 |
^ false |
|
6727 |
! |
|
6728 |
||
6729 |
glxSetvaluator: v init: init vmin: vmin vmax: vmax in: aGLXWindowId |
|
6730 |
||
6731 |
%{ /* NOCONTEXT */ |
|
6732 |
#ifdef GLX |
|
6733 |
SETWIN(aGLXWindowId) |
|
6734 |
setvaluator(_deviceVal(v), _shortVal(init), _shortVal(vmin), _shortVal(vmax)); |
|
6735 |
RETURN (true); |
|
6736 |
#endif |
|
6737 |
%} |
|
6738 |
. |
|
6739 |
^ false |
|
6740 |
! |
|
6741 |
||
6742 |
glxSetvideo: reg value: value in: aGLXWindowId |
|
6743 |
||
6744 |
%{ /* NOCONTEXT */ |
|
6745 |
#ifdef GLX |
|
6746 |
SETWIN(aGLXWindowId) |
|
6747 |
setvideo(_longVal(reg), _longVal(value)); |
|
6748 |
RETURN (true); |
|
6749 |
#endif |
|
6750 |
%} |
|
6751 |
. |
|
6752 |
^ false |
|
6753 |
! |
|
6754 |
||
6755 |
glxShademodel: model in: aGLXWindowId |
|
6756 |
||
6757 |
%{ /* NOCONTEXT */ |
|
6758 |
#ifdef GLX |
|
6759 |
SETWIN(aGLXWindowId) |
|
6760 |
shademodel(_longVal(model)); |
|
6761 |
RETURN (true); |
|
6762 |
#endif |
|
6763 |
%} |
|
6764 |
. |
|
6765 |
^ false |
|
6766 |
! |
|
6767 |
||
6768 |
glxShaderangeLowin: lowin hiwin: hiwin z1: z1 z2: z2 in: aGLXWindowId |
|
6769 |
||
6770 |
%{ /* NOCONTEXT */ |
|
6771 |
#ifdef GLX |
|
6772 |
SETWIN(aGLXWindowId) |
|
6773 |
shaderange(_colorindexVal(lowin), _colorindexVal(hiwin), |
|
77 | 6774 |
_screencoordVal(z1), _screencoordVal(z2)); |
29 | 6775 |
RETURN (true); |
6776 |
#endif |
|
6777 |
%} |
|
6778 |
. |
|
6779 |
^ false |
|
6780 |
! |
|
6781 |
||
6782 |
glxSmoothline: mode in: aGLXWindowId |
|
6783 |
||
6784 |
%{ /* NOCONTEXT */ |
|
6785 |
#ifdef GLX |
|
6786 |
SETWIN(aGLXWindowId) |
|
6787 |
smoothline(_longVal(mode)); |
|
6788 |
RETURN (true); |
|
6789 |
#endif |
|
6790 |
%} |
|
6791 |
. |
|
6792 |
^ false |
|
6793 |
! |
|
6794 |
||
6795 |
glxStencilEnable: enable ref: ref func: func mask: mask fail: fail |
|
6796 |
pass: pass zpass: zpass in: aGLXWindowId |
|
6797 |
||
6798 |
%{ /* NOCONTEXT */ |
|
6799 |
#ifdef GLX |
|
6800 |
SETWIN(aGLXWindowId) |
|
185 | 6801 |
stencil(_longVal(enable), (ulong)__intVal(ref), _longVal(func), |
6802 |
(ulong)__intVal(mask), _longVal(fail), _longVal(pass), _longVal(zpass)); |
|
29 | 6803 |
RETURN (true); |
6804 |
#endif |
|
6805 |
%} |
|
6806 |
. |
|
6807 |
^ false |
|
6808 |
! |
|
6809 |
||
6810 |
glxStensize: planes in: aGLXWindowId |
|
6811 |
||
6812 |
%{ /* NOCONTEXT */ |
|
6813 |
#ifdef GLX |
|
6814 |
SETWIN(aGLXWindowId) |
|
6815 |
stensize(_longVal(planes)); |
|
6816 |
RETURN (true); |
|
6817 |
#endif |
|
6818 |
%} |
|
6819 |
. |
|
6820 |
^ false |
|
6821 |
! |
|
6822 |
||
6823 |
glxStepunitX: x y: y in: aGLXWindowId |
|
6824 |
||
6825 |
%{ /* NOCONTEXT */ |
|
6826 |
#ifdef GLX |
|
6827 |
SETWIN(aGLXWindowId) |
|
6828 |
stepunit(_longVal(x), _longVal(y)); |
|
6829 |
RETURN (true); |
|
6830 |
#endif |
|
6831 |
%} |
|
6832 |
. |
|
6833 |
^ false |
|
6834 |
! |
|
6835 |
||
6836 |
glxSubpixel: b in: aGLXWindowId |
|
6837 |
||
6838 |
%{ /* NOCONTEXT */ |
|
6839 |
#ifdef GLX |
|
6840 |
SETWIN(aGLXWindowId) |
|
6841 |
subpixel(_booleanVal(b)); |
|
6842 |
RETURN (true); |
|
6843 |
#endif |
|
6844 |
%} |
|
6845 |
. |
|
6846 |
^ false |
|
6847 |
! |
|
6848 |
||
6849 |
glxSwapinterval: i in: aGLXWindowId |
|
6850 |
||
6851 |
%{ /* NOCONTEXT */ |
|
6852 |
#ifdef GLX |
|
6853 |
SETWIN(aGLXWindowId) |
|
6854 |
swapinterval(_shortVal(i)); |
|
6855 |
RETURN (true); |
|
6856 |
#endif |
|
6857 |
%} |
|
6858 |
. |
|
6859 |
^ false |
|
6860 |
! |
|
6861 |
||
6862 |
glxSwaptmeshIn: aGLXWindowId |
|
6863 |
||
6864 |
%{ /* NOCONTEXT */ |
|
6865 |
#ifdef GLX |
|
6866 |
SETWIN(aGLXWindowId) |
|
6867 |
swaptmesh(); |
|
6868 |
RETURN (true); |
|
6869 |
#endif |
|
6870 |
%} |
|
6871 |
. |
|
6872 |
^ false |
|
6873 |
! |
|
6874 |
||
6875 |
glxSwinopen: parent in: aGLXWindowId |
|
6876 |
||
6877 |
%{ /* NOCONTEXT */ |
|
6878 |
#ifdef GLX |
|
6879 |
SETWIN(aGLXWindowId) |
|
6880 |
swinopen(_longVal(parent)); |
|
6881 |
RETURN (true); |
|
6882 |
#endif |
|
6883 |
%} |
|
6884 |
. |
|
6885 |
^ false |
|
6886 |
! |
|
6887 |
||
6888 |
glxSwritemask: mask in: aGLXWindowId |
|
6889 |
||
6890 |
%{ /* NOCONTEXT */ |
|
6891 |
#ifdef GLX |
|
6892 |
SETWIN(aGLXWindowId) |
|
185 | 6893 |
swritemask((ulong)__intVal(mask)); |
29 | 6894 |
RETURN (true); |
6895 |
#endif |
|
6896 |
%} |
|
6897 |
. |
|
6898 |
^ false |
|
6899 |
! |
|
6900 |
||
6901 |
glxT2s: v in: aGLXWindowId |
|
6902 |
||
6903 |
%{ /* NOCONTEXT */ |
|
6904 |
#ifdef GLX |
|
6905 |
short vec[2], *c_v; |
|
6906 |
||
6907 |
if (! (c_v = getShortsFromInto(v, vec, 2))) RETURN(false); |
|
6908 |
SETWIN(aGLXWindowId) |
|
6909 |
t2s(c_v); |
|
6910 |
RETURN (true); |
|
6911 |
#endif |
|
6912 |
%} |
|
6913 |
. |
|
6914 |
^ false |
|
6915 |
! |
|
6916 |
||
6917 |
glxT2i: v in: aGLXWindowId |
|
6918 |
||
6919 |
%{ /* NOCONTEXT */ |
|
6920 |
#ifdef GLX |
|
6921 |
long vec[2], *c_v; |
|
6922 |
||
6923 |
if (! (c_v = getLongsFromInto(v, vec, 2))) RETURN(false); |
|
6924 |
SETWIN(aGLXWindowId) |
|
6925 |
t2i(c_v); |
|
6926 |
RETURN (true); |
|
6927 |
#endif |
|
6928 |
%} |
|
6929 |
. |
|
6930 |
^ false |
|
6931 |
! |
|
6932 |
||
6933 |
glxT2f: v in: aGLXWindowId |
|
6934 |
||
6935 |
%{ /* NOCONTEXT */ |
|
6936 |
#ifdef GLX |
|
6937 |
float vec[2], *c_v; |
|
6938 |
||
6939 |
if (! (c_v = getFloatsFromInto(v, vec, 2))) RETURN(false); |
|
6940 |
SETWIN(aGLXWindowId) |
|
6941 |
t2f(c_v); |
|
6942 |
RETURN (true); |
|
6943 |
#endif |
|
6944 |
%} |
|
6945 |
. |
|
6946 |
^ false |
|
6947 |
! |
|
6948 |
||
6949 |
glxT2d: v in: aGLXWindowId |
|
6950 |
||
6951 |
%{ /* NOCONTEXT */ |
|
6952 |
#ifdef GLX |
|
6953 |
double vec[2], *c_v; |
|
6954 |
||
6955 |
if (! (c_v = getDoublesFromInto(v, vec, 2))) RETURN(false); |
|
6956 |
SETWIN(aGLXWindowId) |
|
6957 |
t2d(c_v); |
|
6958 |
RETURN (true); |
|
6959 |
#endif |
|
6960 |
%} |
|
6961 |
. |
|
6962 |
^ false |
|
6963 |
! |
|
6964 |
||
89 | 6965 |
glxT3s:v in:aGLXWindowId |
29 | 6966 |
|
6967 |
%{ /* NOCONTEXT */ |
|
46 | 6968 |
#ifdef FULL_GLX |
29 | 6969 |
short vec[3], *c_v; |
6970 |
||
6971 |
if (! (c_v = getShortsFromInto(v, vec, 3))) RETURN(false); |
|
6972 |
SETWIN(aGLXWindowId) |
|
6973 |
t3s(c_v); |
|
6974 |
RETURN (true); |
|
6975 |
#endif |
|
6976 |
%} |
|
6977 |
. |
|
6978 |
^ false |
|
6979 |
! |
|
6980 |
||
89 | 6981 |
glxT3i:v in:aGLXWindowId |
29 | 6982 |
|
6983 |
%{ /* NOCONTEXT */ |
|
46 | 6984 |
#ifdef FULL_GLX |
29 | 6985 |
long vec[3], *c_v; |
6986 |
||
6987 |
if (! (c_v = getLongsFromInto(v, vec, 3))) RETURN(false); |
|
6988 |
SETWIN(aGLXWindowId) |
|
6989 |
t3i(c_v); |
|
6990 |
RETURN (true); |
|
6991 |
#endif |
|
6992 |
%} |
|
6993 |
. |
|
6994 |
^ false |
|
6995 |
! |
|
6996 |
||
89 | 6997 |
glxT3f:v in:aGLXWindowId |
29 | 6998 |
|
6999 |
%{ /* NOCONTEXT */ |
|
46 | 7000 |
#ifdef FULL_GLX |
29 | 7001 |
float vec[3], *c_v; |
7002 |
||
7003 |
if (! (c_v = getFloatsFromInto(v, vec, 3))) RETURN(false); |
|
7004 |
SETWIN(aGLXWindowId) |
|
7005 |
t3f(c_v); |
|
7006 |
RETURN (true); |
|
7007 |
#endif |
|
7008 |
%} |
|
7009 |
. |
|
7010 |
^ false |
|
7011 |
! |
|
7012 |
||
89 | 7013 |
glxT3d:v in:aGLXWindowId |
29 | 7014 |
|
7015 |
%{ /* NOCONTEXT */ |
|
46 | 7016 |
#ifdef FULL_GLX |
29 | 7017 |
double vec[3], *c_v; |
7018 |
||
7019 |
if (! (c_v = getDoublesFromInto(v, vec, 3))) RETURN(false); |
|
7020 |
SETWIN(aGLXWindowId) |
|
7021 |
t3d(c_v); |
|
7022 |
RETURN (true); |
|
7023 |
#endif |
|
7024 |
%} |
|
7025 |
. |
|
7026 |
^ false |
|
7027 |
! |
|
7028 |
||
7029 |
glxT4s: v in: aGLXWindowId |
|
7030 |
||
7031 |
%{ /* NOCONTEXT */ |
|
46 | 7032 |
#ifdef FULL_GLX |
29 | 7033 |
short vec[4], *c_v; |
7034 |
||
7035 |
if (! (c_v = getShortsFromInto(v, vec, 4))) RETURN(false); |
|
7036 |
SETWIN(aGLXWindowId) |
|
7037 |
t4s(c_v); |
|
7038 |
RETURN (true); |
|
7039 |
#endif |
|
7040 |
%} |
|
7041 |
. |
|
7042 |
^ false |
|
7043 |
! |
|
7044 |
||
7045 |
glxT4i: v in: aGLXWindowId |
|
7046 |
||
7047 |
%{ /* NOCONTEXT */ |
|
46 | 7048 |
#ifdef FULL_GLX |
29 | 7049 |
long vec[4], *c_v; |
7050 |
||
7051 |
if (! (c_v = getLongsFromInto(v, vec, 4))) RETURN(false); |
|
7052 |
SETWIN(aGLXWindowId) |
|
7053 |
t4i(c_v); |
|
7054 |
RETURN (true); |
|
7055 |
#endif |
|
7056 |
%} |
|
7057 |
. |
|
7058 |
^ false |
|
7059 |
! |
|
7060 |
||
7061 |
glxT4f: v in: aGLXWindowId |
|
7062 |
||
7063 |
%{ /* NOCONTEXT */ |
|
46 | 7064 |
#ifdef FULL_GLX |
29 | 7065 |
float vec[4], *c_v; |
7066 |
||
7067 |
if (! (c_v = getFloatsFromInto(v, vec, 4))) RETURN(false); |
|
7068 |
SETWIN(aGLXWindowId) |
|
7069 |
t4f(c_v); |
|
7070 |
RETURN (true); |
|
7071 |
#endif |
|
7072 |
%} |
|
7073 |
. |
|
7074 |
^ false |
|
7075 |
! |
|
7076 |
||
7077 |
glxT4d: v in: aGLXWindowId |
|
7078 |
||
7079 |
%{ /* NOCONTEXT */ |
|
46 | 7080 |
#ifdef FULL_GLX |
29 | 7081 |
double vec[4], *c_v; |
7082 |
||
7083 |
if (! (c_v = getDoublesFromInto(v, vec, 4))) RETURN(false); |
|
7084 |
SETWIN(aGLXWindowId) |
|
7085 |
t4d(c_v); |
|
7086 |
RETURN (true); |
|
7087 |
#endif |
|
7088 |
%} |
|
7089 |
. |
|
7090 |
^ false |
|
7091 |
! |
|
7092 |
||
7093 |
glxTextinitIn: aGLXWindowId |
|
7094 |
||
7095 |
%{ /* NOCONTEXT */ |
|
7096 |
#ifdef GLX |
|
7097 |
SETWIN(aGLXWindowId) |
|
7098 |
textinit(); |
|
7099 |
RETURN (true); |
|
7100 |
#endif |
|
7101 |
%} |
|
7102 |
. |
|
7103 |
^ false |
|
7104 |
! |
|
7105 |
||
7106 |
glxTextportLeft: left right: right bottom: bottom top: top in: aGLXWindowId |
|
7107 |
||
7108 |
%{ /* NOCONTEXT */ |
|
7109 |
#ifdef GLX |
|
7110 |
SETWIN(aGLXWindowId) |
|
7111 |
textport(_screencoordVal(left), _screencoordVal(right), |
|
77 | 7112 |
_screencoordVal(bottom), _screencoordVal(top)); |
29 | 7113 |
RETURN (true); |
7114 |
#endif |
|
7115 |
%} |
|
7116 |
. |
|
7117 |
^ false |
|
7118 |
! |
|
7119 |
||
7120 |
glxTieB: b v1: v1 v2: v2 in: aGLXWindowId |
|
7121 |
||
7122 |
%{ /* NOCONTEXT */ |
|
7123 |
#ifdef GLX |
|
7124 |
SETWIN(aGLXWindowId) |
|
7125 |
tie(_deviceVal(b), _deviceVal(v1), _deviceVal(v2)); |
|
7126 |
RETURN (true); |
|
7127 |
#endif |
|
7128 |
%} |
|
7129 |
. |
|
7130 |
^ false |
|
7131 |
! |
|
7132 |
||
7133 |
glxTlutbind: target index: index in: aGLXWindowId |
|
7134 |
||
7135 |
%{ /* NOCONTEXT */ |
|
46 | 7136 |
#ifdef FULL_GLX |
29 | 7137 |
SETWIN(aGLXWindowId) |
7138 |
tlutbind(_longVal(target), _longVal(index)); |
|
7139 |
RETURN (true); |
|
7140 |
#endif |
|
7141 |
%} |
|
7142 |
. |
|
7143 |
^ false |
|
7144 |
! |
|
7145 |
||
7146 |
glxTpoffIn: aGLXWindowId |
|
7147 |
||
7148 |
%{ /* NOCONTEXT */ |
|
7149 |
#ifdef GLX |
|
7150 |
SETWIN(aGLXWindowId) |
|
7151 |
tpoff(); |
|
7152 |
RETURN (true); |
|
7153 |
#endif |
|
7154 |
%} |
|
7155 |
. |
|
7156 |
^ false |
|
7157 |
! |
|
7158 |
||
7159 |
glxTponIn: aGLXWindowId |
|
7160 |
||
7161 |
%{ /* NOCONTEXT */ |
|
7162 |
#ifdef GLX |
|
7163 |
SETWIN(aGLXWindowId) |
|
7164 |
tpon(); |
|
7165 |
RETURN (true); |
|
7166 |
#endif |
|
7167 |
%} |
|
7168 |
. |
|
7169 |
^ false |
|
7170 |
! |
|
7171 |
||
7172 |
glxUnqdevice: dev in: aGLXWindowId |
|
7173 |
||
7174 |
%{ /* NOCONTEXT */ |
|
7175 |
#ifdef GLX |
|
7176 |
SETWIN(aGLXWindowId) |
|
7177 |
unqdevice(_deviceVal(dev)); |
|
7178 |
RETURN (true); |
|
7179 |
#endif |
|
7180 |
%} |
|
7181 |
. |
|
7182 |
^ false |
|
7183 |
! |
|
7184 |
||
7185 |
glxWmpack: pack in: aGLXWindowId |
|
7186 |
||
7187 |
%{ /* NOCONTEXT */ |
|
7188 |
#ifdef GLX |
|
7189 |
SETWIN(aGLXWindowId) |
|
185 | 7190 |
wmpack((ulong)__intVal(pack)); |
29 | 7191 |
RETURN (true); |
7192 |
#endif |
|
7193 |
%} |
|
7194 |
. |
|
7195 |
^ false |
|
7196 |
! |
|
7197 |
||
7198 |
glxWritemask: wtm in: aGLXWindowId |
|
7199 |
||
7200 |
%{ /* NOCONTEXT */ |
|
7201 |
#ifdef GLX |
|
7202 |
SETWIN(aGLXWindowId) |
|
7203 |
writemask(_colorindexVal(wtm)); |
|
7204 |
RETURN (true); |
|
7205 |
#endif |
|
7206 |
%} |
|
7207 |
. |
|
7208 |
^ false |
|
7209 |
! |
|
7210 |
||
7211 |
glxXfptX: x y: y z: z in: aGLXWindowId |
|
7212 |
||
7213 |
%{ /* NOCONTEXT */ |
|
7214 |
#ifdef GLX |
|
7215 |
Coord c_x, c_y, c_z; |
|
7216 |
||
7217 |
_COORD_ (x, c_x) |
|
7218 |
_COORD_ (y, c_y) |
|
7219 |
_COORD_ (z, c_z) |
|
7220 |
SETWIN(aGLXWindowId) |
|
7221 |
xfpt(c_x, c_y, c_z); |
|
7222 |
RETURN (true); |
|
7223 |
#endif |
|
7224 |
%} |
|
7225 |
. |
|
7226 |
^ false |
|
7227 |
! |
|
7228 |
||
7229 |
glxXfptiX: x y: y z: z in: aGLXWindowId |
|
7230 |
||
7231 |
%{ /* NOCONTEXT */ |
|
7232 |
#ifdef GLX |
|
7233 |
Icoord c_x, c_y, c_z; |
|
7234 |
||
7235 |
_ICOORD_ (x, c_x) |
|
7236 |
_ICOORD_ (y, c_y) |
|
7237 |
_ICOORD_ (z, c_z) |
|
7238 |
SETWIN(aGLXWindowId) |
|
7239 |
xfpti(c_x, c_y, c_z); |
|
7240 |
RETURN (true); |
|
7241 |
#endif |
|
7242 |
%} |
|
7243 |
. |
|
7244 |
^ false |
|
7245 |
! |
|
7246 |
||
7247 |
glxXfptsX: x y: y z: z in: aGLXWindowId |
|
7248 |
||
7249 |
%{ /* NOCONTEXT */ |
|
7250 |
#ifdef GLX |
|
7251 |
Scoord c_x, c_y, c_z; |
|
7252 |
||
7253 |
_SCOORD_ (x, c_x) |
|
7254 |
_SCOORD_ (y, c_y) |
|
7255 |
_SCOORD_ (z, c_z) |
|
7256 |
SETWIN(aGLXWindowId) |
|
7257 |
xfpts(c_x, c_y, c_z); |
|
7258 |
RETURN (true); |
|
7259 |
#endif |
|
7260 |
%} |
|
7261 |
. |
|
7262 |
^ false |
|
7263 |
! |
|
7264 |
||
7265 |
glxXfpt2X: x y: y in: aGLXWindowId |
|
7266 |
||
7267 |
%{ /* NOCONTEXT */ |
|
7268 |
#ifdef GLX |
|
7269 |
Coord c_x, c_y; |
|
7270 |
||
7271 |
_COORD_ (x, c_x) |
|
7272 |
_COORD_ (y, c_y) |
|
7273 |
SETWIN(aGLXWindowId) |
|
7274 |
xfpt2(c_x, c_y); |
|
7275 |
RETURN (true); |
|
7276 |
#endif |
|
7277 |
%} |
|
7278 |
. |
|
7279 |
^ false |
|
7280 |
! |
|
7281 |
||
7282 |
glxXfpt2iX: x y: y in: aGLXWindowId |
|
7283 |
||
7284 |
%{ /* NOCONTEXT */ |
|
7285 |
#ifdef GLX |
|
7286 |
Icoord c_x, c_y; |
|
7287 |
||
7288 |
_ICOORD_ (x, c_x) |
|
7289 |
_ICOORD_ (y, c_y) |
|
7290 |
SETWIN(aGLXWindowId) |
|
7291 |
xfpt2i(c_x, c_y); |
|
7292 |
RETURN (true); |
|
7293 |
#endif |
|
7294 |
%} |
|
7295 |
. |
|
7296 |
^ false |
|
7297 |
! |
|
7298 |
||
7299 |
glxXfpt2sX: x y: y in: aGLXWindowId |
|
7300 |
||
7301 |
%{ /* NOCONTEXT */ |
|
7302 |
#ifdef GLX |
|
7303 |
Scoord c_x, c_y; |
|
7304 |
||
7305 |
_SCOORD_ (x, c_x) |
|
7306 |
_SCOORD_ (y, c_y) |
|
7307 |
SETWIN(aGLXWindowId) |
|
7308 |
xfpt2s(c_x, c_y); |
|
7309 |
RETURN (true); |
|
7310 |
#endif |
|
7311 |
%} |
|
7312 |
. |
|
7313 |
^ false |
|
7314 |
! |
|
7315 |
||
7316 |
glxXfpt4X: x y: y z: z w: w in: aGLXWindowId |
|
7317 |
||
7318 |
%{ /* NOCONTEXT */ |
|
7319 |
#ifdef GLX |
|
7320 |
Coord c_x, c_y, c_z, c_w; |
|
7321 |
||
7322 |
_COORD_ (x, c_x) |
|
7323 |
_COORD_ (y, c_y) |
|
7324 |
_COORD_ (z, c_z) |
|
7325 |
_COORD_ (w, c_w) |
|
7326 |
SETWIN(aGLXWindowId) |
|
7327 |
xfpt4(c_x, c_y, c_z, c_w); |
|
7328 |
RETURN (true); |
|
7329 |
#endif |
|
7330 |
%} |
|
7331 |
. |
|
7332 |
^ false |
|
7333 |
! |
|
7334 |
||
7335 |
glxXfpt4iX: x y: y z: z w: w in: aGLXWindowId |
|
7336 |
||
7337 |
%{ /* NOCONTEXT */ |
|
7338 |
#ifdef GLX |
|
7339 |
Icoord c_x, c_y, c_z, c_w; |
|
7340 |
||
7341 |
_ICOORD_ (x, c_x) |
|
7342 |
_ICOORD_ (y, c_y) |
|
7343 |
_ICOORD_ (z, c_z) |
|
7344 |
_ICOORD_ (w, c_w) |
|
7345 |
SETWIN(aGLXWindowId) |
|
7346 |
xfpt4i(c_x, c_y, c_z, c_w); |
|
7347 |
RETURN (true); |
|
7348 |
#endif |
|
7349 |
%} |
|
7350 |
. |
|
7351 |
^ false |
|
7352 |
! |
|
7353 |
||
7354 |
glxXfpt4sX: x y: y z: z w: w in: aGLXWindowId |
|
7355 |
||
7356 |
%{ /* NOCONTEXT */ |
|
7357 |
#ifdef GLX |
|
7358 |
Scoord c_x, c_y, c_z, c_w; |
|
7359 |
||
7360 |
_SCOORD_ (x, c_x) |
|
7361 |
_SCOORD_ (y, c_y) |
|
7362 |
_SCOORD_ (z, c_z) |
|
7363 |
_SCOORD_ (w, c_w) |
|
7364 |
SETWIN(aGLXWindowId) |
|
7365 |
xfpt4s(c_x, c_y, c_z, c_w); |
|
7366 |
RETURN (true); |
|
7367 |
#endif |
|
7368 |
%} |
|
7369 |
. |
|
7370 |
^ false |
|
0 | 7371 |
! ! |
64 | 7372 |
|
89 | 7373 |
!GLXWorkstation methodsFor:'vertex data transfer'! |
64 | 7374 |
|
7375 |
glxV2s:v in:aGLXWindowId |
|
7376 |
"pass a vertex; v must be a vector with 2 shorts; z is taken as 0" |
|
7377 |
||
7378 |
%{ /* NOCONTEXT */ |
|
7379 |
short vec[2], *c_v; |
|
7380 |
||
7381 |
if (! (c_v = getShortsFromInto(v, vec, 2))) RETURN(false); |
|
7382 |
SETWIN(aGLXWindowId) |
|
7383 |
v2s(c_v); |
|
7384 |
RETURN (true); |
|
7385 |
%} |
|
7386 |
! |
|
7387 |
||
7388 |
glxV2i:v in:aGLXWindowId |
|
7389 |
"pass a vertex; v must be a vector with 2 longs; z is taken as 0" |
|
7390 |
||
7391 |
%{ /* NOCONTEXT */ |
|
7392 |
long vec[2], *c_v; |
|
7393 |
||
7394 |
if (! (c_v = getLongsFromInto(v, vec, 2))) RETURN(false); |
|
7395 |
SETWIN(aGLXWindowId) |
|
7396 |
v2i(c_v); |
|
7397 |
RETURN (true); |
|
7398 |
%} |
|
7399 |
! |
|
7400 |
||
7401 |
glxV2f:v in:aGLXWindowId |
|
7402 |
"pass a vertex; v must be a vector with 2 floats; z is taken as 0" |
|
7403 |
||
7404 |
%{ /* NOCONTEXT */ |
|
7405 |
float vec[2], *c_v; |
|
7406 |
||
7407 |
if (! (c_v = getFloatsFromInto(v, vec, 2))) RETURN(false); |
|
7408 |
SETWIN(aGLXWindowId) |
|
7409 |
v2f(c_v); |
|
7410 |
RETURN (true); |
|
7411 |
%} |
|
7412 |
! |
|
7413 |
||
7414 |
glxV2d:v in:aGLXWindowId |
|
7415 |
"pass a vertex; v must be a vector with 2 doubles; z is taken as 0" |
|
7416 |
||
7417 |
%{ /* NOCONTEXT */ |
|
7418 |
double vec[2], *c_v; |
|
7419 |
||
7420 |
if (! (c_v = getDoublesFromInto(v, vec, 2))) RETURN(false); |
|
7421 |
SETWIN(aGLXWindowId) |
|
7422 |
v2d(c_v); |
|
7423 |
RETURN (true); |
|
7424 |
%} |
|
7425 |
! |
|
7426 |
||
7427 |
glxV2fX:x y:y in:aGLXWindowId |
|
7428 |
"pass a vertex from individual x and y values; z is taken as 0.0" |
|
7429 |
||
7430 |
%{ /* NOCONTEXT */ |
|
7431 |
float vec[2]; |
|
7432 |
||
7433 |
_FLOAT_(x, vec[0]) |
|
7434 |
_FLOAT_(y, vec[1]) |
|
7435 |
SETWIN(aGLXWindowId) |
|
7436 |
v2f(vec); |
|
7437 |
RETURN (true); |
|
7438 |
%} |
|
7439 |
! |
|
7440 |
||
7441 |
glxV3s:v in:aGLXWindowId |
|
7442 |
"pass a vertex; v must be a vector with 3 shorts" |
|
7443 |
||
7444 |
%{ /* NOCONTEXT */ |
|
7445 |
short vec[3], *c_v; |
|
7446 |
||
7447 |
if (! (c_v = getShortsFromInto(v, vec, 3))) RETURN(false); |
|
7448 |
SETWIN(aGLXWindowId) |
|
7449 |
v3s(c_v); |
|
7450 |
RETURN (true); |
|
7451 |
%} |
|
7452 |
! |
|
7453 |
||
7454 |
glxV3i:v in:aGLXWindowId |
|
7455 |
"pass a vertex; v must be a vector with 3 longs" |
|
7456 |
||
7457 |
%{ /* NOCONTEXT */ |
|
7458 |
long vec[3], *c_v; |
|
7459 |
||
7460 |
if (! (c_v = getLongsFromInto(v, vec, 3))) RETURN(false); |
|
7461 |
SETWIN(aGLXWindowId) |
|
7462 |
v3i(c_v); |
|
7463 |
RETURN (true); |
|
7464 |
%} |
|
7465 |
! |
|
7466 |
||
7467 |
glxV3f:v in:aGLXWindowId |
|
7468 |
"pass a vertex; v must be a 3-element float-vector" |
|
7469 |
||
7470 |
%{ /* NOCONTEXT */ |
|
7471 |
float vec[3], *c_v; |
|
7472 |
||
7473 |
if (! (c_v = getFloatsFromInto(v, vec, 3))) RETURN(false); |
|
7474 |
SETWIN(aGLXWindowId) |
|
7475 |
v3f(c_v); |
|
7476 |
RETURN (true); |
|
7477 |
%} |
|
7478 |
! |
|
7479 |
||
7480 |
glxV3fX:x y:y z:z in: aGLXWindowId |
|
7481 |
"pass a vector from individual x, y and z (float) values" |
|
7482 |
||
7483 |
%{ /* NOCONTEXT */ |
|
7484 |
float vec[3]; |
|
7485 |
||
7486 |
_FLOAT_(x, vec[0]) |
|
7487 |
_FLOAT_(y, vec[1]) |
|
7488 |
_FLOAT_(z, vec[2]) |
|
7489 |
SETWIN(aGLXWindowId) |
|
7490 |
v3f(vec); |
|
7491 |
RETURN (true); |
|
7492 |
%} |
|
7493 |
! |
|
7494 |
||
7495 |
glxVOriginIn:aGLXWindowId |
|
7496 |
"pass a 0.0/0.0/0.0 vector. |
|
7497 |
This is the same as v3f:#(0.0 0.0 0.0), but, since its so |
|
7498 |
common, this somewhat faster method has been provided" |
|
7499 |
||
7500 |
%{ /* NOCONTEXT */ |
|
7501 |
static float vec[3] = {0.0, 0.0, 0.0}; |
|
7502 |
||
7503 |
SETWIN(aGLXWindowId) |
|
7504 |
v3f(vec); |
|
7505 |
RETURN (true); |
|
7506 |
%} |
|
7507 |
! |
|
7508 |
||
7509 |
glxVUnitXIn:aGLXWindowId |
|
7510 |
"pass a 1.0/0.0/0.0 vector. |
|
7511 |
This is the same as v3f:#(1.0 0.0 0.0), but, since its so |
|
7512 |
common, this somewhat faster method has been provided" |
|
7513 |
||
7514 |
%{ /* NOCONTEXT */ |
|
7515 |
static float vec[3] = {1.0, 0.0, 0.0}; |
|
7516 |
||
7517 |
SETWIN(aGLXWindowId) |
|
7518 |
v3f(vec); |
|
7519 |
RETURN (true); |
|
7520 |
%} |
|
7521 |
! |
|
7522 |
||
7523 |
glxVUnitYIn:aGLXWindowId |
|
7524 |
"pass a 0.0/1.0/0.0 vector. |
|
7525 |
This is the same as v3f:#(0.0 1.0 0.0), but, since its so |
|
7526 |
common, this somewhat faster method has been provided" |
|
7527 |
||
7528 |
%{ /* NOCONTEXT */ |
|
7529 |
static float vec[3] = {0.0, 1.0, 0.0}; |
|
7530 |
||
7531 |
SETWIN(aGLXWindowId) |
|
7532 |
v3f(vec); |
|
7533 |
RETURN (true); |
|
7534 |
%} |
|
7535 |
! |
|
7536 |
||
7537 |
glxVUnitZIn:aGLXWindowId |
|
7538 |
"pass a 0.0/0.0/1.0 vector. |
|
7539 |
This is the same as v3f:#(0.0 0.0 1.0), but, since its so |
|
7540 |
common, this somewhat faster method has been provided" |
|
7541 |
||
7542 |
%{ /* NOCONTEXT */ |
|
7543 |
static float vec[3] = {0.0, 0.0, 1.0}; |
|
7544 |
||
7545 |
SETWIN(aGLXWindowId) |
|
7546 |
v3f(vec); |
|
7547 |
RETURN (true); |
|
7548 |
%} |
|
7549 |
! |
|
7550 |
||
7551 |
glxV3d:v in:aGLXWindowId |
|
7552 |
"pass a vertex; v must be a 3-element double-vector" |
|
7553 |
||
7554 |
%{ /* NOCONTEXT */ |
|
7555 |
double vec[3], *c_v; |
|
7556 |
||
7557 |
if (! (c_v = getDoublesFromInto(v, vec, 3))) RETURN(false); |
|
7558 |
SETWIN(aGLXWindowId) |
|
7559 |
v3d(c_v); |
|
7560 |
RETURN (true); |
|
7561 |
%} |
|
7562 |
. |
|
7563 |
^ false |
|
7564 |
! |
|
7565 |
||
7566 |
glxN3f:arrayOf3Floats in:aGLXWindowId |
|
7567 |
"argument must be an array of 3 floats containing the |
|
7568 |
current vertex normal - in real GL only" |
|
7569 |
||
7570 |
%{ /* NOCONTEXT */ |
|
7571 |
#ifdef GLX |
|
7572 |
float vec[3], *v; |
|
7573 |
||
7574 |
if (! (v = getFloatsFromInto(arrayOf3Floats, vec, 3))) RETURN(false); |
|
7575 |
SETWIN(aGLXWindowId) |
|
7576 |
n3f(v); |
|
7577 |
RETURN (true); |
|
7578 |
#endif |
|
7579 |
%} |
|
7580 |
. |
|
7581 |
^ false |
|
7582 |
! |
|
7583 |
||
7584 |
glxV4s:v in:aGLXWindowId |
|
7585 |
"pass a vertex; v must be a 4-element short-vector, |
|
7586 |
containing x, y, z and w" |
|
7587 |
||
7588 |
%{ /* NOCONTEXT */ |
|
7589 |
short vec[4], *c_v; |
|
7590 |
||
7591 |
if (! (c_v = getShortsFromInto(v, vec, 4))) RETURN(false); |
|
7592 |
SETWIN(aGLXWindowId) |
|
7593 |
v4s(c_v); |
|
7594 |
RETURN (true); |
|
7595 |
%} |
|
7596 |
! |
|
7597 |
||
7598 |
glxV4i:v in:aGLXWindowId |
|
7599 |
"pass a vertex; v must be a 4-element int-vector, |
|
7600 |
containing x, y, z and w" |
|
7601 |
||
7602 |
%{ /* NOCONTEXT */ |
|
7603 |
long vec[4], *c_v; |
|
7604 |
||
7605 |
if (! (c_v = getLongsFromInto(v, vec, 4))) RETURN(false); |
|
7606 |
SETWIN(aGLXWindowId) |
|
7607 |
v4i(c_v); |
|
7608 |
RETURN (true); |
|
7609 |
%} |
|
7610 |
! |
|
7611 |
||
7612 |
glxV4f:v in:aGLXWindowId |
|
7613 |
"pass a vertex; v must be a 4-element float-vector, |
|
7614 |
containing x, y, z and w" |
|
7615 |
||
7616 |
%{ /* NOCONTEXT */ |
|
7617 |
float vec[4], *c_v; |
|
7618 |
||
7619 |
if (! (c_v = getFloatsFromInto(v, vec, 4))) RETURN(false); |
|
7620 |
SETWIN(aGLXWindowId) |
|
7621 |
v4f(c_v); |
|
7622 |
RETURN (true); |
|
7623 |
%} |
|
7624 |
! |
|
7625 |
||
7626 |
glxV4d:v in:aGLXWindowId |
|
7627 |
"pass a vertex; v must be a 4-element double-vector, |
|
7628 |
containing x, y, z and w" |
|
7629 |
||
7630 |
%{ /* NOCONTEXT */ |
|
7631 |
double vec[4], *c_v; |
|
7632 |
||
7633 |
if (! (c_v = getDoublesFromInto(v, vec, 4))) RETURN(false); |
|
7634 |
SETWIN(aGLXWindowId) |
|
7635 |
v4d(c_v); |
|
7636 |
RETURN (true); |
|
7637 |
%} |
|
7638 |
! ! |
|
185 | 7639 |
|
7640 |
!GLXWorkstation methodsFor:'stereo extension'! |
|
7641 |
||
7642 |
stereoExtensionVersion |
|
7643 |
"return the stereo extensions version as an array consisting of |
|
7644 |
major and minor numbers." |
|
7645 |
||
7646 |
%{ /* NOCONTEXT */ |
|
7647 |
#if defined(XSGIStereo) && defined(GLX) |
|
7648 |
Status status; |
|
7649 |
Display *dpy = myDpy; |
|
7650 |
int major, minor; |
|
7651 |
extern OBJ __ARRAY_WITH2(); |
|
7652 |
||
7653 |
if (ISCONNECTED) { |
|
7654 |
status = XSGIStereoQueryVersion(myDpy, &major, &minor); |
|
7655 |
if (status == True) { |
|
7656 |
RETURN ( __ARRAY_WITH2(__MKSMALLINT(major), __MKSMALLINT(minor))); |
|
7657 |
} |
|
7658 |
} |
|
7659 |
#endif |
|
7660 |
%}. |
|
7661 |
self primitiveFailed |
|
7662 |
||
7663 |
" |
|
7664 |
Display stereoExtensionVersion |
|
7665 |
" |
|
7666 |
! |
|
7667 |
||
7668 |
stereoExtensionModeIn:aWindowId |
|
7669 |
"return the current stereo mode for some window" |
|
7670 |
||
7671 |
%{ /* NOCONTEXT */ |
|
7672 |
#if defined(XSGIStereo) && defined(GLX) |
|
7673 |
int mode; |
|
7674 |
Window win; |
|
7675 |
||
206
4284b80bebdf
changed to use ExternalAddress handles for all Window, Font,
Claus Gittinger <cg@exept.de>
parents:
190
diff
changeset
|
7676 |
if (ISCONNECTED && __isExternalAddress(aWindowId)) { |
185 | 7677 |
win = _WindowVal(aWindowId); |
7678 |
mode = XSGIQueryStereoMode(myDpy, win); |
|
7679 |
switch (mode) { |
|
7680 |
case STEREO_OFF: |
|
7681 |
RETURN ( @symbol(off) ); |
|
7682 |
case STEREO_BOTTOM: |
|
7683 |
RETURN ( @symbol(bottom) ); |
|
7684 |
case STEREO_TOP: |
|
7685 |
RETURN ( @symbol(top) ); |
|
7686 |
} |
|
7687 |
RETURN ( @symbol(unsupported) ); |
|
7688 |
} |
|
7689 |
#endif |
|
7690 |
%}. |
|
7691 |
self primitiveFailed |
|
7692 |
||
7693 |
" |
|
7694 |
|v| |
|
7695 |
||
7696 |
v := StandardSystemView new. |
|
7697 |
v extent:300@300. |
|
7698 |
v openAndWait. |
|
7699 |
v device stereoExtensionModeIn:(v id) |
|
7700 |
||
7701 |
Display stereoExtensionModeIn:Display rootWindowId |
|
7702 |
" |
|
7703 |
! |
|
7704 |
||
7705 |
stereoExtensionMode:aModeSymbol height:h offset:o for:aWindowId |
|
7706 |
"set the current stereo mode; the argument may be one of: |
|
7707 |
nil/false #off -> turn it off |
|
7708 |
#bottom -> STEREO_BOTTOM |
|
7709 |
#top -> STEREO_TOP |
|
7710 |
" |
|
7711 |
||
7712 |
%{ /* NOCONTEXT */ |
|
7713 |
#if defined(XSGIStereo) && defined(GLX) |
|
7714 |
Status status; |
|
7715 |
int mode; |
|
7716 |
unsigned short us_h, us_o; |
|
7717 |
Window win; |
|
7718 |
||
7719 |
if (ISCONNECTED |
|
7720 |
&& __bothSmallInteger(h, o) |
|
206
4284b80bebdf
changed to use ExternalAddress handles for all Window, Font,
Claus Gittinger <cg@exept.de>
parents:
190
diff
changeset
|
7721 |
&& __isExternalAddress(aWindowId)) { |
185 | 7722 |
win = _WindowVal(aWindowId); |
7723 |
if ((aModeSymbol == nil) |
|
7724 |
|| (aModeSymbol == false) |
|
7725 |
|| (aModeSymbol == @symbol(off))) { |
|
7726 |
mode = STEREO_OFF; |
|
7727 |
} else { |
|
7728 |
if (aModeSymbol == @symbol(bottom)) { |
|
7729 |
mode = STEREO_BOTTOM; |
|
7730 |
} else { |
|
7731 |
if (aModeSymbol == @symbol(top)) { |
|
7732 |
mode = STEREO_TOP; |
|
7733 |
} else { |
|
7734 |
goto bad; |
|
7735 |
} |
|
7736 |
} |
|
7737 |
} |
|
7738 |
us_h = __intVal(h); |
|
7739 |
us_o = __intVal(o); |
|
7740 |
status = XSGISetStereoMode(myDpy, win, us_h, us_o, mode); |
|
7741 |
RETURN ( status ? true : false); |
|
7742 |
} |
|
7743 |
bad: ; |
|
7744 |
#endif |
|
7745 |
%}. |
|
7746 |
self primitiveFailed |
|
7747 |
||
7748 |
" |
|
7749 |
Display stereoExtensionMode:#top height:492 offset:532 for:(Display rootWindowId). |
|
7750 |
(Delay forSeconds:10) wait. |
|
7751 |
Display stereoExtensionMode:#off height:0 offset:0 for:(Display rootWindowId). |
|
7752 |
" |
|
7753 |
! |
|
7754 |
||
7755 |
stereoExtensionBuffer:aBufferSymbol for:aWindowId |
|
7756 |
"set the current stereo buffer; the argument may be one of: |
|
7757 |
#left -> STEREO_BUFFER_LEFT |
|
7758 |
#right -> STEREO_BUFFER_RIGHT |
|
7759 |
" |
|
7760 |
||
7761 |
%{ /* NOCONTEXT */ |
|
7762 |
#if defined(XSGIStereo) && defined(GLX) |
|
7763 |
Status status; |
|
7764 |
int buffer; |
|
7765 |
Window win; |
|
7766 |
||
7767 |
if (ISCONNECTED |
|
206
4284b80bebdf
changed to use ExternalAddress handles for all Window, Font,
Claus Gittinger <cg@exept.de>
parents:
190
diff
changeset
|
7768 |
&& __isExternalAddress(aWindowId)) { |
185 | 7769 |
win = _WindowVal(aWindowId); |
7770 |
if (aBufferSymbol == @symbol(left)) { |
|
7771 |
buffer = STEREO_BUFFER_LEFT; |
|
7772 |
} else { |
|
7773 |
if (aBufferSymbol == @symbol(right)) { |
|
7774 |
buffer = STEREO_BUFFER_RIGHT; |
|
7775 |
} else { |
|
7776 |
goto bad; |
|
7777 |
} |
|
7778 |
} |
|
7779 |
status = XSGISetStereoBuffer(myDpy, win, buffer); |
|
7780 |
RETURN ( status ? true : false); |
|
7781 |
} |
|
7782 |
bad: ; |
|
7783 |
#endif |
|
7784 |
%}. |
|
7785 |
self primitiveFailed |
|
7786 |
||
7787 |
" |
|
7788 |
|t v| |
|
7789 |
||
7790 |
t := StandardSystemView new. |
|
7791 |
t extent:300@300. |
|
7792 |
v := GLXView origin:0.0@0.0 corner:1.0@1.0 in:t. |
|
7793 |
t openAndWait. |
|
7794 |
||
7795 |
v device stereoExtensionBuffer:#left for:(v id). |
|
7796 |
(Delay forSeconds:10) wait. |
|
7797 |
v device stereoExtensionBuffer:#right for:(v id). |
|
7798 |
" |
|
7799 |
! ! |
|
7800 |