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