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