author | Claus Gittinger <cg@exept.de> |
Wed, 03 Jul 1996 11:19:19 +0200 | |
changeset 912 | 1fa9cb1dac83 |
parent 793 | 8fbee58d45c1 |
child 913 | f20b354a5533 |
permissions | -rw-r--r-- |
0 | 1 |
" |
614 | 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 |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
25 |
* |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
26 |
* New note: starting to support openGL (tm) (compile with -DOPENGL) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
27 |
* or its simulation (compile with -DOPENGL -DMESA) |
24 | 28 |
*/ |
29 | 29 |
|
0 | 30 |
/* |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
31 |
* SAD, SAD: |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
32 |
* on SGI, the GL library seems to come in different versions, |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
33 |
* some include the functions below, others dont. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
34 |
* To avoid getting undefined symbol errors when linking, these |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
35 |
* functions are not included by default. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
36 |
* |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
37 |
* enable the #define below (or compile with -DFULL_GLX) to enable |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
38 |
* the following: |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
39 |
* |
46 | 40 |
* blendcolor getgconfig getmultisample leftbuffer rightbuffer monobuffer |
41 |
* msalpha msmask mspattern mssize multisample stereobuffer |
|
42 |
* t3s t3i t3f t3d t4s t4i t4f t4d tlutbind zbsize |
|
43 |
* |
|
44 |
* these are not available on all gl's |
|
45 |
*/ |
|
46 |
||
47 |
/* #define FULL_GLX */ |
|
48 |
||
49 |
/* |
|
554
34cc776bcc0f
compilable with String/Object definition
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
50 |
* this is stupid, GLX type-defs String, which is also defined here ... |
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
51 |
* ... and xlib defines True and False |
554
34cc776bcc0f
compilable with String/Object definition
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
52 |
* It might be a better idea, to completely separate GLX stuff from ST/X |
0 | 53 |
*/ |
554
34cc776bcc0f
compilable with String/Object definition
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
54 |
# ifdef String |
34cc776bcc0f
compilable with String/Object definition
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
55 |
# undef String |
34cc776bcc0f
compilable with String/Object definition
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
56 |
# define String GLX_String |
34cc776bcc0f
compilable with String/Object definition
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
57 |
# endif |
34cc776bcc0f
compilable with String/Object definition
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
58 |
# ifdef Object |
34cc776bcc0f
compilable with String/Object definition
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
59 |
# undef Object |
912
1fa9cb1dac83
care for systems where Object is defined (88k) - Object is also defined in VGL
Claus Gittinger <cg@exept.de>
parents:
793
diff
changeset
|
60 |
# define Object GLX_Object |
554
34cc776bcc0f
compilable with String/Object definition
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
61 |
# endif |
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
62 |
# undef True |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
63 |
# undef False |
24 | 64 |
|
168 | 65 |
#include <stdio.h> |
66 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
67 |
#ifdef OPENGL /* SGI or others OPENGL library */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
68 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
69 |
# include "GL/gl.h" |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
70 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
71 |
# ifdef MESA /* GNU MESA openGL simulation */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
72 |
# include "GL/xmesa.h" |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
73 |
# define OPENGLCONTEXT XMesaContext |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
74 |
# define GLXMAKECURRENT(dpy, draw, con) XMesaMakeCurrent(con) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
75 |
# else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
76 |
/* not yet known what else to include */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
77 |
# define OPENGLCONTEXT GLXContext |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
78 |
# define GLXMAKECURRENT(dpy, draw, con) glxMakeCurrent(dpy, draw, con) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
79 |
# endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
80 |
|
24 | 81 |
#else |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
82 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
83 |
# ifdef GLX /* SGI's GL library */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
84 |
# include <gl/glws.h> |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
85 |
# include <gl/sphere.h> |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
86 |
# else /* VOGL GL simulation */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
87 |
# undef memset |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
88 |
# include <vogl.h> |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
89 |
# undef move |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
90 |
# include <X11/Xlib.h> |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
91 |
# endif |
24 | 92 |
#endif |
0 | 93 |
|
185 | 94 |
/* |
95 |
* XSGIStereo extension - if available |
|
96 |
*/ |
|
97 |
#ifdef XSGIStereo |
|
98 |
# include <X11/extensions/SGIStereo.h> |
|
99 |
#endif |
|
100 |
||
35 | 101 |
#ifndef NULL |
58 | 102 |
# define NULL (char *)0 /* sigh */ |
35 | 103 |
#endif |
104 |
||
0 | 105 |
typedef enum { |
106 |
GLXcolorIndexSingleBuffer, |
|
107 |
GLXcolorIndexDoubleBuffer, |
|
108 |
GLXrgbSingleBuffer, |
|
109 |
GLXrgbDoubleBuffer |
|
110 |
} GLXWindowType; |
|
111 |
||
333 | 112 |
# define ENTERGLX __BEGIN_PROTECT_REGISTERS__ |
113 |
# define LEAVEGLX __END_PROTECT_REGISTERS__ |
|
134 | 114 |
|
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
115 |
/* |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
116 |
* 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
|
117 |
*/ |
0 | 118 |
#undef String |
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
119 |
#ifdef __DEF_STRING |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
120 |
# define String __DEF_String |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
121 |
#endif |
0 | 122 |
|
123 |
/* |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
124 |
* mhmh - openGL has its separate gl-context, |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
125 |
* which is distinct (?) from the windowID. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
126 |
* We dont want to add another instvar to View - do we ? |
0 | 127 |
*/ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
128 |
#if defined(OPENGL) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
129 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
130 |
# ifndef MAX_OPENGL_VIEWS |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
131 |
# define MAX_OPENGL_VIEWS 50 |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
132 |
# endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
133 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
134 |
struct windowIDToGLContextMapping { |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
135 |
Window win; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
136 |
OPENGLCONTEXT con; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
137 |
}; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
138 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
139 |
static struct windowIDToGLContextMapping windowIDToGLContextMapping[MAX_OPENGL_VIEWS]; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
140 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
141 |
static OPENGLCONTEXT |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
142 |
__glxWindowIdToGLContext(xId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
143 |
Window xId; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
144 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
145 |
int i; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
146 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
147 |
for (i=0; i<MAX_OPENGL_VIEWS; i++) { |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
148 |
if (windowIDToGLContextMapping[i].win == xId) { |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
149 |
return windowIDToGLContextMapping[i].con; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
150 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
151 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
152 |
return (OPENGLCONTEXT) 0; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
153 |
} |
0 | 154 |
|
157 | 155 |
/* |
156 |
* set the GLXWindow for followup drawing |
|
157 |
*/ |
|
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
158 |
#define SETWIN(aGLXWindowId) \ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
159 |
{ \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
160 |
OPENGLCONTEXT context; \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
161 |
\ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
162 |
if (_INST(activeWindow) != aGLXWindowId) { \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
163 |
if (! ISCONNECTED ) { \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
164 |
RETURN (false); \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
165 |
} \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
166 |
if (! __isExternalAddress(aGLXWindowId)) { \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
167 |
RETURN (false); \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
168 |
} \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
169 |
context = (OPENGLCONTEXT) __glxWindowIdToGLContext(_WindowVal(aGLXWindowId)); \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
170 |
if (! context) { \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
171 |
RETURN (false); \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
172 |
} \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
173 |
GLXMAKECURRENT(myDpy, _WindowVal(aGLXWindowId), context ); \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
174 |
_INST(activeWindow) = aGLXWindowId; \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
175 |
__STORE(self, aGLXWindowId); \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
176 |
} else { \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
177 |
if (aGLXWindowId == nil) { \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
178 |
RETURN (false); \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
179 |
} \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
180 |
} \ |
12 | 181 |
} |
182 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
183 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
184 |
#else /* old GL */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
185 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
186 |
/* |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
187 |
* set the GLXWindow for followup drawing |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
188 |
*/ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
189 |
#define SETWIN(aGLXWindowId) \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
190 |
{ \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
191 |
if (_INST(activeWindow) != aGLXWindowId) { \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
192 |
if (! ISCONNECTED ) { \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
193 |
RETURN (false); \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
194 |
} \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
195 |
if (! __isExternalAddress(aGLXWindowId)) { \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
196 |
RETURN (false); \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
197 |
} \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
198 |
if (GLXwinset(myDpy, _WindowVal(aGLXWindowId)) < 0) { \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
199 |
RETURN (false); \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
200 |
} \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
201 |
_INST(activeWindow) = aGLXWindowId; \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
202 |
__STORE(self, aGLXWindowId); \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
203 |
} else { \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
204 |
if (aGLXWindowId == nil) { \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
205 |
RETURN (false); \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
206 |
} \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
207 |
} \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
208 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
209 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
210 |
#endif /* old GL */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
211 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
212 |
/* |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
213 |
* some defines - tired of typing ... |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
214 |
* most of these macros/functions extract values from smalltalk objects or |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
215 |
* put/pack them into corresponding c variables. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
216 |
* |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
217 |
*/ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
218 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
219 |
# define Boolean int |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
220 |
# define TRUE 1 |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
221 |
# define FALSE 0 |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
222 |
# define Coord float |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
223 |
# define Icoord int |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
224 |
# define Scoord int |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
225 |
# define Colorindex int |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
226 |
# define Linestyle int |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
227 |
# define Offset int |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
228 |
# define Angle int |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
229 |
# define Screencoord int |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
230 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
231 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
232 |
#define myDpy (Display *)(__MKCP(_INST(displayId))) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
233 |
#define ISCONNECTED (_INST(displayId) != nil) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
234 |
#define _WindowVal(o) (Window)(__MKCP(o)) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
235 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
236 |
#define __MKBOOLEAN(b) ((b==FALSE) ? false : true) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
237 |
#define _booleanVal(b) ((b==false) ? (Boolean)FALSE : (Boolean)TRUE) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
238 |
#define _coordVal(c) ((__isFloat(c)) ? (Coord)(_floatVal(c)) : (Coord)(__intVal(c))) |
185 | 239 |
#define _icoordVal(c) ((Icoord)(__intVal(c))) |
240 |
#define _scoordVal(c) ((Scoord)(__intVal(c))) |
|
241 |
#define _screencoordVal(c) ((Screencoord)(__intVal(c))) |
|
242 |
#define _colorindexVal(c) ((Colorindex)(__intVal(c))) |
|
243 |
#define _linestyleVal(l) ((Linestyle)(__intVal(l))) |
|
244 |
#define _shortVal(l) ((short)(__intVal(l))) |
|
245 |
#define _longVal(l) ((long)(__intVal(l))) |
|
246 |
#define _deviceVal(l) ((Device)(__intVal(l))) |
|
247 |
#define _tagVal(l) ((Tag)(__intVal(l))) |
|
248 |
#define _objectVal(l) ((Object)(__intVal(l))) |
|
249 |
#define _offsetVal(l) ((Offset)(__intVal(l))) |
|
250 |
#define _rgbVal(l) ((RGBvalue)(__intVal(l))) |
|
251 |
#define _angleVal(c) ((Angle)(__intVal(c))) |
|
157 | 252 |
|
29 | 253 |
/* |
254 |
* check for and fetch a boolean from ST-arg into C-dst |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
255 |
* ST-object must be true or false. Return from method if invalid. |
29 | 256 |
*/ |
257 |
#define _BOOLEAN_(arg, dst) \ |
|
30 | 258 |
if (arg==true) \ |
77 | 259 |
dst = (Boolean)TRUE; \ |
30 | 260 |
else if (arg==false) \ |
77 | 261 |
dst = (Boolean)FALSE; \ |
29 | 262 |
else { RETURN(false); } |
263 |
||
264 |
/* |
|
265 |
* check for and fetch a coord from ST-arg into C-dst |
|
157 | 266 |
* ST-object must be Float, SmallInteger or Fraction. |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
267 |
* Return from method if invalid. |
29 | 268 |
*/ |
0 | 269 |
#define _COORD_(arg, dst) \ |
97 | 270 |
if (__isFloat(arg)) \ |
77 | 271 |
dst = (Coord)(_floatVal(arg)); \ |
97 | 272 |
else if (__isSmallInteger(arg)) \ |
185 | 273 |
dst = (Coord)(__intVal(arg)); \ |
97 | 274 |
else if (__isFraction(arg) \ |
275 |
&& __isSmallInteger(_FractionInstPtr(arg)->f_numerator) \ |
|
276 |
&& __isSmallInteger(_FractionInstPtr(arg)->f_denominator)) { \ |
|
77 | 277 |
float n, d; \ |
278 |
\ |
|
185 | 279 |
n = (float)(__intVal(_FractionInstPtr(arg)->f_numerator)); \ |
280 |
d = (float)(__intVal(_FractionInstPtr(arg)->f_denominator)); \ |
|
77 | 281 |
dst = (Coord)(n / d); \ |
29 | 282 |
} else { RETURN(false); } |
283 |
||
284 |
/* |
|
285 |
* check for and fetch an icoord from ST-arg into C-dst |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
286 |
* ST-object must be SmallInteger. Return from method if invalid. |
29 | 287 |
*/ |
288 |
#define _ICOORD_(arg, dst) \ |
|
97 | 289 |
if (__isSmallInteger(arg)) \ |
185 | 290 |
dst = (Icoord)(__intVal(arg)); \ |
29 | 291 |
else { RETURN(false); } |
292 |
||
293 |
/* |
|
157 | 294 |
* check for and fetch an scoord from ST-arg into C-dst |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
295 |
* ST-object must be SmallInteger. Return from method if invalid. |
29 | 296 |
*/ |
297 |
#define _SCOORD_(arg, dst) \ |
|
97 | 298 |
if (__isSmallInteger(arg)) \ |
185 | 299 |
dst = (Scoord)(__intVal(arg)); \ |
29 | 300 |
else { RETURN(false); } |
301 |
||
302 |
#define _SCREENCOORD_(arg, dst) \ |
|
97 | 303 |
if (__isSmallInteger(arg)) \ |
185 | 304 |
dst = (Screencoord)(__intVal(arg)); \ |
29 | 305 |
else { RETURN(false); } |
306 |
||
307 |
#define _COLORINDEX_(arg, dst) \ |
|
97 | 308 |
if (__isSmallInteger(arg)) \ |
185 | 309 |
dst = (Colorindex)(__intVal(arg)); \ |
29 | 310 |
else { RETURN(false); } |
311 |
||
312 |
#define _ANGLE_(arg, dst) \ |
|
97 | 313 |
if (__isSmallInteger(arg)) \ |
185 | 314 |
dst = (Angle)(__intVal(arg)); \ |
29 | 315 |
else { RETURN(false); } |
0 | 316 |
|
317 |
#define _FLOAT_(arg, dst) \ |
|
97 | 318 |
if (__isFloat(arg)) \ |
77 | 319 |
dst = (float)(_floatVal(arg)); \ |
97 | 320 |
else if (__isSmallInteger(arg)) \ |
185 | 321 |
dst = (float)(__intVal(arg)); \ |
97 | 322 |
else if (__isFraction(arg) \ |
323 |
&& __isSmallInteger(_FractionInstPtr(arg)->f_numerator) \ |
|
324 |
&& __isSmallInteger(_FractionInstPtr(arg)->f_denominator)) { \ |
|
77 | 325 |
float n, d; \ |
326 |
\ |
|
185 | 327 |
n = (float)(__intVal(_FractionInstPtr(arg)->f_numerator)); \ |
328 |
d = (float)(__intVal(_FractionInstPtr(arg)->f_denominator)); \ |
|
77 | 329 |
dst = (float)(n / d); \ |
29 | 330 |
} else { RETURN(false); } |
0 | 331 |
|
332 |
#define _INT_(arg, dst) \ |
|
97 | 333 |
if (__isSmallInteger(arg)) \ |
185 | 334 |
dst = (int)(__intVal(arg)); \ |
29 | 335 |
else { RETURN(false); } |
336 |
||
30 | 337 |
#define _indexedArea(object) \ |
338 |
(((char *) (_InstPtr(object))) \ |
|
77 | 339 |
+ OHDR_SIZE \ |
185 | 340 |
+ (__intVal(_ClassInstPtr(__qClass(object))->c_ninstvars)) * sizeof(OBJ)) |
77 | 341 |
%} |
342 |
! ! |
|
343 |
||
168 | 344 |
!GLXWorkstation primitiveVariables! |
345 |
%{ |
|
346 |
/* |
|
347 |
* remembered info from private error handler |
|
348 |
*/ |
|
349 |
static char lastErrorMsg[80] = ""; |
|
350 |
static unsigned lastRequestCode = 0; |
|
351 |
static unsigned lastMinorCode = 0; |
|
352 |
static unsigned lastResource = 0; |
|
353 |
||
354 |
%} |
|
355 |
! ! |
|
356 |
||
89 | 357 |
!GLXWorkstation primitiveFunctions! |
77 | 358 |
%{ |
151 | 359 |
|
168 | 360 |
/* |
361 |
* catch X-errors and forward as errorInterrupt:#DisplayError, |
|
362 |
* (which itself invokes my handler and optionally raises an exceptionSignal) |
|
363 |
* the implementation below is somewhat wrong: it will |
|
364 |
* report all errors for Display, even though there could be |
|
365 |
* more than one display connection. (being fixed, new errorInterrupt mechanism |
|
366 |
* allows passing an additional argument, which is the displayID ...) |
|
367 |
* |
|
368 |
* this dublicates the functionality as found in XWorkstation; |
|
369 |
* the reason is to allow dynamic loading systems to load this module |
|
370 |
* before XWorkstation (which was not possible otherwise, due to unresolved |
|
371 |
* external references while loading this one) |
|
372 |
*/ |
|
373 |
static |
|
374 |
__XErrorHandler__(dpy, event) |
|
375 |
Display *dpy; |
|
376 |
XErrorEvent *event; |
|
377 |
{ |
|
378 |
XGetErrorText(dpy, event->error_code, lastErrorMsg, 80); |
|
379 |
if (lastErrorMsg[0] == '\0') { |
|
185 | 380 |
sprintf(lastErrorMsg, "code: %d", event->error_code); |
168 | 381 |
} |
382 |
lastRequestCode = event->request_code; |
|
383 |
lastMinorCode = event->minor_code; |
|
384 |
lastResource = event->resourceid; |
|
385 |
||
218
10072d9beba5
can now turn off Xlib error messages from the errorHandler
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
386 |
if (@global(ErrorPrinting) == true) { |
219
9ff0660f447f
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
387 |
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
|
388 |
event->request_code, event->request_code, |
9ff0660f447f
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
218
diff
changeset
|
389 |
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
|
390 |
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
|
391 |
} |
168 | 392 |
|
207
9124817bbb03
use new c-pointer wrapper macros (based on externalAddress)
Claus Gittinger <cg@exept.de>
parents:
206
diff
changeset
|
393 |
__errorInterruptWithIDAndParameter__(@symbol(DisplayError), __MKOBJ(dpy)); |
168 | 394 |
return 0; |
395 |
} |
|
396 |
||
151 | 397 |
/* |
398 |
* begin moved from GLXsupport.c |
|
399 |
*/ |
|
400 |
||
401 |
/* |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
402 |
* This provides a helper function "GLXCreateWindow", which does |
151 | 403 |
* all the necessary magic to create an X window suitable for GL drawing |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
404 |
* to take place within. See the definition of GLXCreateWindow for a |
151 | 405 |
* description of how to call it. |
406 |
* |
|
407 |
* claus: I really had no time to look into all this, |
|
408 |
* this file has been just copied from a 4Dgifts demo .. |
|
409 |
* (will need more than a day to show more ...) |
|
410 |
*/ |
|
411 |
#if defined(GLX) || defined(VGL) |
|
412 |
||
413 |
#include <X11/Xlib.h> |
|
414 |
#include <X11/Xutil.h> |
|
415 |
#ifndef VGL |
|
416 |
# include <gl/glws.h> |
|
417 |
#endif |
|
418 |
#include <signal.h> |
|
419 |
#include <setjmp.h> |
|
420 |
#include "stcIntern.h" |
|
421 |
||
422 |
/* |
|
423 |
* glxhelper.h: |
|
424 |
* |
|
425 |
* List of drawing modes supported by GLXCreateWindow (in glxhelper.c). |
|
426 |
* More than this are possible with mixed model, but this is just an |
|
427 |
* example. You can either expand this list (and the corresponding code in |
|
428 |
* GLXCreateWindow) or call the mixed model calls yourself, using |
|
429 |
* GLXCreateWindow as an example. |
|
430 |
*/ |
|
431 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
432 |
static char * |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
433 |
typeToName[] = { |
151 | 434 |
"color index single buffer", |
435 |
"color index double buffer", |
|
436 |
"rgb single buffer", |
|
437 |
"rgb double buffer", |
|
438 |
}; |
|
439 |
||
440 |
#ifndef VGL |
|
441 |
/* |
|
442 |
* Dorky little helper function used to build up a GLXconfig array. |
|
443 |
*/ |
|
444 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
445 |
static void |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
446 |
set_entry (GLXconfig* ptr, int b, int m, int a) |
151 | 447 |
{ |
448 |
ptr->buffer = b; |
|
449 |
ptr->mode = m; |
|
450 |
ptr->arg = a; |
|
451 |
} |
|
452 |
#endif /* VGL */ |
|
453 |
||
454 |
static JMP_BUF errorReturn; |
|
455 |
||
456 |
static void |
|
457 |
glAbort() { |
|
458 |
longjmp(errorReturn, 1); |
|
459 |
} |
|
460 |
||
461 |
/* |
|
462 |
* GLXCreateWindow(dpy, parent, x, y, w, h, boderWidth, type) |
|
463 |
* |
|
464 |
* Return value is the X window id of the newly created window. |
|
465 |
* |
|
466 |
* Arguments are: |
|
467 |
* dpy The X "Display*" returned by XOpenDisplay |
|
468 |
* parent The parent of the newly created window, |
|
469 |
* a typical value for this is |
|
470 |
* RootWindow(dpy, DefaultScreen(dpy)) |
|
471 |
* x,y The location of the window to be created, |
|
472 |
* y coordinate is measured from the top down. |
|
473 |
* w,h size of the new window |
|
474 |
* borderWidth the X border size for this window, should probably |
|
475 |
* be zero. |
|
476 |
* type the GLXWindowType (see glxhelper.h) desribing the |
|
477 |
* typer of GL drawing to be done in this window |
|
478 |
*/ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
479 |
Window |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
480 |
__GLXCreateWindow(dpy, parent, x, y, w, h, borderWidth, type) |
151 | 481 |
Display* dpy; |
482 |
Window parent; |
|
483 |
GLXWindowType type; |
|
484 |
{ |
|
485 |
#ifdef VGL |
|
486 |
Visual visual; |
|
487 |
#else |
|
488 |
GLXconfig params[50]; |
|
489 |
GLXconfig* next; |
|
490 |
GLXconfig* retconfig; |
|
491 |
Colormap cmap = DefaultColormap(dpy, DefaultScreen(dpy)); |
|
492 |
XVisualInfo *vis; |
|
493 |
#endif |
|
494 |
XVisualInfo template; |
|
495 |
XColor white; |
|
496 |
XSetWindowAttributes cwa; |
|
497 |
XWindowAttributes pwa; |
|
498 |
int scr, i, nret; |
|
499 |
Window win; |
|
389
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
500 |
#ifdef HAS_SIGACTION |
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
501 |
struct sigaction oldSig, newSig; |
151 | 502 |
#else |
503 |
void *oldSig; |
|
504 |
#endif |
|
505 |
||
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
506 |
__catchExit(1); |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
507 |
|
151 | 508 |
if (setjmp(errorReturn)) { |
509 |
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
|
510 |
#ifdef HAS_SIGACTION |
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
511 |
sigaction(SIGSEGV, &oldSig, 0); |
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
512 |
#else |
151 | 513 |
signal(SIGSEGV, oldSig); |
389
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
514 |
#endif |
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
515 |
__catchExit(0); |
151 | 516 |
return 0; |
517 |
} |
|
518 |
__CONT__ |
|
519 |
||
520 |
#ifdef VGL |
|
521 |
/* |
|
522 |
* I know what VGL supports; its somewhat unclean to hard code it here |
|
523 |
*/ |
|
524 |
switch (type) { |
|
525 |
case GLXcolorIndexSingleBuffer: |
|
526 |
case GLXcolorIndexDoubleBuffer: |
|
527 |
break; |
|
528 |
||
529 |
case GLXrgbSingleBuffer: |
|
530 |
case GLXrgbDoubleBuffer: |
|
531 |
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
|
532 |
__catchExit(0); |
151 | 533 |
return 0; |
534 |
} |
|
535 |
||
536 |
scr = DefaultScreen(dpy); |
|
537 |
visual.visualid = CopyFromParent; |
|
538 |
cwa.border_pixel = 0; /* Even if we don't use it, it must be something */ |
|
539 |
if (w <= 0) { |
|
540 |
printf("VGL: bad width: %d\n", w); |
|
541 |
w = 1; |
|
542 |
} |
|
543 |
if (h <= 0) { |
|
544 |
printf("VGL: bad height: %d\n", h); |
|
545 |
h = 1; |
|
546 |
} |
|
547 |
win = XCreateWindow(dpy, parent, x, y, w, h, |
|
548 |
borderWidth, DisplayPlanes(dpy, scr), |
|
549 |
InputOutput, &visual, |
|
550 |
CWBorderPixel, &cwa); |
|
551 |
||
552 |
/* |
|
389
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
553 |
* on some, seg-violations occur in the GL, if too many |
151 | 554 |
* views are created ... just to make certain, we catch those |
555 |
* in GL too. |
|
556 |
*/ |
|
389
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
557 |
# ifdef HAS_SIGACTION |
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
558 |
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
|
559 |
newSig = oldSig; |
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
560 |
newSig.sa_handler = glAbort; |
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
561 |
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
|
562 |
# else |
151 | 563 |
oldSig = signal(SIGSEGV, glAbort); |
389
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
564 |
# endif |
151 | 565 |
i = GLXlink(dpy, win); |
389
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
566 |
# ifdef HAS_SIGACTION |
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
567 |
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
|
568 |
# else |
151 | 569 |
signal(SIGSEGV, oldSig); |
389
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
570 |
# endif |
151 | 571 |
|
572 |
if (i < 0) { |
|
573 |
printf("GLXlink returned %d\n", i); |
|
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
574 |
__catchExit(0); |
151 | 575 |
return 0; |
576 |
} |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
577 |
|
151 | 578 |
#else /* not VGL */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
579 |
|
151 | 580 |
/* |
581 |
* This builds an array in "params" that describes for GLXgetconfig(3G) |
|
582 |
* the type of GL drawing that will be done. |
|
583 |
*/ |
|
584 |
next = params; |
|
585 |
switch (type) { |
|
586 |
case GLXcolorIndexSingleBuffer: |
|
587 |
set_entry(next++, GLX_NORMAL, GLX_RGB, FALSE); |
|
588 |
set_entry(next++, GLX_NORMAL, GLX_DOUBLE, FALSE); |
|
589 |
break; |
|
590 |
case GLXcolorIndexDoubleBuffer: |
|
591 |
set_entry(next++, GLX_NORMAL, GLX_RGB, FALSE); |
|
592 |
set_entry(next++, GLX_NORMAL, GLX_DOUBLE, TRUE); |
|
593 |
break; |
|
594 |
case GLXrgbSingleBuffer: |
|
595 |
set_entry(next++, GLX_NORMAL, GLX_RGB, TRUE); |
|
596 |
set_entry(next++, GLX_NORMAL, GLX_DOUBLE, FALSE); |
|
597 |
break; |
|
598 |
case GLXrgbDoubleBuffer: |
|
599 |
set_entry(next++, GLX_NORMAL, GLX_RGB, TRUE); |
|
600 |
set_entry(next++, GLX_NORMAL, GLX_DOUBLE, TRUE); |
|
601 |
break; |
|
602 |
} |
|
603 |
set_entry(next, 0, 0, 0); /* The input to GLXgetconfig is null terminated */ |
|
604 |
||
605 |
/* |
|
606 |
* Get configuration data for a window based on above parameters |
|
607 |
* First we have to find out which screen the parent window is on, |
|
608 |
* then we can call GXLgetconfig() |
|
609 |
*/ |
|
610 |
XGetWindowAttributes(dpy, parent, &pwa); |
|
611 |
retconfig = GLXgetconfig(dpy, XScreenNumberOfScreen(pwa.screen), params); |
|
612 |
if (retconfig == 0) { |
|
613 |
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
|
614 |
__catchExit(0); |
151 | 615 |
return 0; |
616 |
} |
|
617 |
||
618 |
/* |
|
619 |
* Scan through config info, pulling info needed to create a window |
|
620 |
* that supports the rendering mode. |
|
621 |
*/ |
|
622 |
for (next = retconfig; next->buffer; next++) { |
|
623 |
unsigned long buffer = next->buffer; |
|
624 |
unsigned long mode = next->mode; |
|
625 |
unsigned long value = next->arg; |
|
626 |
switch (mode) { |
|
627 |
case GLX_COLORMAP: |
|
628 |
if (buffer == GLX_NORMAL) { |
|
629 |
cmap = value; |
|
630 |
} |
|
631 |
break; |
|
632 |
case GLX_VISUAL: |
|
633 |
if (buffer == GLX_NORMAL) { |
|
634 |
template.visualid = value; |
|
635 |
template.screen = DefaultScreen(dpy); |
|
636 |
vis = XGetVisualInfo(dpy, VisualScreenMask|VisualIDMask, |
|
637 |
&template, &nret); |
|
638 |
} |
|
639 |
break; |
|
640 |
} |
|
641 |
} |
|
642 |
||
643 |
/* |
|
644 |
* Create the window |
|
645 |
*/ |
|
646 |
cwa.colormap = cmap; |
|
647 |
cwa.border_pixel = 0; /* Even if we don't use it, it must be something */ |
|
648 |
win = XCreateWindow(dpy, parent, x, y, w, h, |
|
649 |
borderWidth, vis->depth, InputOutput, vis->visual, |
|
650 |
CWColormap|CWBorderPixel, &cwa); |
|
651 |
||
652 |
/* |
|
653 |
* Rescan configuration info and find window slot that getconfig |
|
654 |
* provided. Fill it in with the window we just created. |
|
655 |
*/ |
|
656 |
for (next = retconfig; next->buffer; next++) { |
|
657 |
if ((next->buffer == GLX_NORMAL) && (next->mode == GLX_WINDOW)) { |
|
658 |
next->arg = win; |
|
659 |
break; |
|
660 |
} |
|
661 |
} |
|
662 |
||
663 |
/* |
|
664 |
* Now "retconfig" contains all the information the GL needs to |
|
665 |
* configure the window and its own internal state. |
|
666 |
*/ |
|
667 |
/* |
|
389
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
668 |
* on iris, seg-violations occur in the GL, if too many |
151 | 669 |
* views are created ... |
670 |
*/ |
|
389
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
671 |
# ifdef HAS_SIGACTION |
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
672 |
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
|
673 |
newSig = oldSig; |
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
674 |
newSig.sa_handler = glAbort; |
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
675 |
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
|
676 |
# else |
151 | 677 |
oldSig = signal(SIGSEGV, glAbort); |
389
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
678 |
# endif |
151 | 679 |
i = GLXlink(dpy, retconfig); |
389
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
680 |
# ifdef HAS_SIGACTION |
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
681 |
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
|
682 |
# else |
151 | 683 |
signal(SIGSEGV, oldSig); |
389
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
684 |
# endif |
151 | 685 |
|
686 |
if (i < 0) { |
|
687 |
printf("GLXlink returned %d\n", i); |
|
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
688 |
__catchExit(0); |
151 | 689 |
return 0; |
690 |
} |
|
691 |
||
692 |
/* |
|
693 |
* The GL sets its own X error handlers, which exits - this is not what we want |
|
694 |
*/ |
|
695 |
XSetErrorHandler(__XErrorHandler__); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
696 |
#endif /* not VGL */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
697 |
|
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
698 |
__catchExit(0); |
151 | 699 |
return win; |
700 |
} |
|
701 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
702 |
__GLXUnlinkWindow(dpy, win) |
151 | 703 |
Display* dpy; |
704 |
Window win; |
|
705 |
{ |
|
706 |
/* |
|
707 |
* only needed for VGL - GLX does it automatically |
|
708 |
*/ |
|
709 |
#ifdef VGL |
|
710 |
GLXunlink(dpy, win); |
|
711 |
#endif |
|
712 |
} |
|
713 |
||
714 |
#endif /* GLX or VGL */ |
|
715 |
||
716 |
/* |
|
717 |
* end moved from GLXsupport.c |
|
718 |
*/ |
|
719 |
||
29 | 720 |
/* |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
721 |
* helper for rotation - calls rot() |
29 | 722 |
*/ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
723 |
OBJ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
724 |
__glx_doRotate(angle, axis) |
29 | 725 |
OBJ angle; |
726 |
char axis; |
|
727 |
{ |
|
728 |
float f_angle; |
|
729 |
||
35 | 730 |
if (__isFloat(angle)) { |
77 | 731 |
f_angle = (float)(_floatVal(angle)); |
732 |
if (f_angle != 0.0) |
|
733 |
rot(f_angle, axis); |
|
734 |
return (true); |
|
29 | 735 |
} |
35 | 736 |
if (__isFraction(angle) |
97 | 737 |
&& __isSmallInteger(_FractionInstPtr(angle)->f_numerator) |
738 |
&& __isSmallInteger(_FractionInstPtr(angle)->f_denominator)) { |
|
77 | 739 |
float n, d; |
740 |
||
185 | 741 |
n = (float)(__intVal(_FractionInstPtr(angle)->f_numerator)); |
742 |
d = (float)(__intVal(_FractionInstPtr(angle)->f_denominator)); |
|
77 | 743 |
f_angle = n / d; |
744 |
if (f_angle != 0.0) |
|
745 |
rot(f_angle, axis); |
|
746 |
return (true); |
|
29 | 747 |
} |
97 | 748 |
if (__isSmallInteger(angle)) { |
185 | 749 |
f_angle = (float)(__intVal(angle)); |
77 | 750 |
if (f_angle != 0.0) |
751 |
rot(f_angle, axis); |
|
752 |
return (true); |
|
29 | 753 |
} |
754 |
return false; |
|
755 |
} |
|
0 | 756 |
|
24 | 757 |
/* |
29 | 758 |
* fetch integers from an st-array (elements must be smallIntegers) |
759 |
*/ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
760 |
long * |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
761 |
__glx_getLongsFromInto(obj, vec, count) |
29 | 762 |
OBJ obj; |
763 |
long *vec; |
|
764 |
{ |
|
765 |
OBJ cls, o; |
|
766 |
int nByte, i, ninstVars, nInstBytes; |
|
767 |
char *pElem; |
|
768 |
||
769 |
if (! _isNonNilObject(obj)) return (long *)NULL; |
|
134 | 770 |
cls = __qClass(obj); |
185 | 771 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
29 | 772 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 773 |
nByte = __qSize(obj) - nInstBytes; |
29 | 774 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
775 |
if (nByte < (count * sizeof(OBJ))) return (long *)NULL; |
|
776 |
for (i=0; i<count; i++) { |
|
77 | 777 |
o = *(OBJ *)pElem; |
97 | 778 |
if (! __isSmallInteger(o)) return (long *)NULL; |
185 | 779 |
vec[i] = (long)__intVal(o); |
77 | 780 |
pElem += sizeof(OBJ); |
29 | 781 |
} |
782 |
return vec; |
|
783 |
} |
|
784 |
||
785 |
/* |
|
786 |
* fetch shorts from an st-array (elements must be smallIntegers) |
|
787 |
*/ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
788 |
short * |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
789 |
__glx_getShortsFromInto(obj, vec, count) |
29 | 790 |
OBJ obj; |
791 |
short *vec; |
|
792 |
{ |
|
793 |
OBJ cls, o; |
|
794 |
int nByte, i, ninstVars, nInstBytes; |
|
795 |
char *pElem; |
|
796 |
||
797 |
if (! _isNonNilObject(obj)) return (short *)NULL; |
|
134 | 798 |
cls = __qClass(obj); |
185 | 799 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
29 | 800 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 801 |
nByte = __qSize(obj) - nInstBytes; |
29 | 802 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
803 |
if (nByte < (count * sizeof(OBJ))) return (short *)NULL; |
|
804 |
for (i=0; i<count; i++) { |
|
77 | 805 |
o = *(OBJ *)pElem; |
97 | 806 |
if (! __isSmallInteger(o)) return (short *)NULL; |
185 | 807 |
vec[i] = (short)__intVal(o); |
77 | 808 |
pElem += sizeof(OBJ); |
29 | 809 |
} |
810 |
return vec; |
|
811 |
} |
|
812 |
||
813 |
/* |
|
814 |
* fetch floats from an st-object into a c-float array |
|
815 |
* which may be a floatArray, doubleArray or array-of-something, |
|
816 |
* where something may be a float, fraction or smallInteger, |
|
24 | 817 |
*/ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
818 |
float * |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
819 |
__glx_getFloatsFromInto(obj, vec, count) |
12 | 820 |
OBJ obj; |
821 |
float *vec; |
|
822 |
{ |
|
823 |
OBJ cls; |
|
824 |
int nByte; |
|
825 |
OBJ o; |
|
826 |
int i, ninstVars, nInstBytes; |
|
827 |
char *pElem; |
|
828 |
||
829 |
if (! _isNonNilObject(obj)) return (float *)0; |
|
830 |
||
134 | 831 |
cls = __qClass(obj); |
185 | 832 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
12 | 833 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 834 |
nByte = __qSize(obj) - nInstBytes; |
12 | 835 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
836 |
||
185 | 837 |
switch (__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) { |
12 | 838 |
case FLOATARRAY: |
77 | 839 |
/* |
840 |
* best speed for float array |
|
841 |
* - the data is already as we want it |
|
842 |
*/ |
|
843 |
if (nByte < (count * sizeof(float))) return (float *)0; |
|
844 |
return (float *)pElem; |
|
12 | 845 |
|
846 |
case DOUBLEARRAY: |
|
77 | 847 |
/* |
848 |
* for double array, have to copy-and-cast |
|
849 |
*/ |
|
850 |
if (nByte < (count * sizeof(double))) return (float *)0; |
|
851 |
for (i=0; i<count; i++) { |
|
852 |
vec[i] = *((double *)pElem); |
|
853 |
pElem += sizeof(double); |
|
854 |
} |
|
855 |
return vec; |
|
12 | 856 |
|
857 |
case POINTERARRAY: |
|
77 | 858 |
/* |
859 |
* for other array, have to fetch, check and store |
|
860 |
* the elements can be floats, smallintegers or fractions |
|
861 |
*/ |
|
862 |
if (nByte < (count * sizeof(OBJ))) return (float *)0; |
|
863 |
/* get elements one-by-one */ |
|
864 |
for (i=0; i<count; i++) { |
|
865 |
o = *(OBJ *)pElem; |
|
866 |
if (__isFloat(o)) { |
|
867 |
vec[i] = _floatVal(o); |
|
97 | 868 |
} else if (__isSmallInteger(o)) { |
185 | 869 |
vec[i] = (float)(__intVal(o)); |
77 | 870 |
} else if (__isFraction(o) |
97 | 871 |
&& __isSmallInteger(_FractionInstPtr(o)->f_numerator) |
872 |
&& __isSmallInteger(_FractionInstPtr(o)->f_denominator)) { |
|
77 | 873 |
float n, d; |
874 |
||
185 | 875 |
n = (float)(__intVal(_FractionInstPtr(o)->f_numerator)); |
876 |
d = (float)(__intVal(_FractionInstPtr(o)->f_denominator)); |
|
77 | 877 |
vec[i] = n / d; |
878 |
} else |
|
879 |
return 0; |
|
880 |
pElem += sizeof(OBJ); |
|
881 |
} |
|
882 |
return vec; |
|
12 | 883 |
} |
884 |
return (float *)0; |
|
885 |
} |
|
886 |
||
29 | 887 |
/* |
888 |
* fetch doubles from an st-object into a c-double array |
|
889 |
* which may be a floatArray, doubleArray or array-of-something, |
|
890 |
* where something may be a float, fraction or smallInteger, |
|
891 |
*/ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
892 |
double * |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
893 |
__glx_getDoublesFromInto(obj, vec, count) |
29 | 894 |
OBJ obj; |
895 |
double *vec; |
|
896 |
{ |
|
897 |
OBJ cls, o; |
|
898 |
int nByte, i, ninstVars, nInstBytes; |
|
899 |
char *pElem; |
|
900 |
||
901 |
if (! _isNonNilObject(obj)) return (double *)0; |
|
134 | 902 |
cls = __qClass(obj); |
185 | 903 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
29 | 904 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 905 |
nByte = __qSize(obj) - nInstBytes; |
29 | 906 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
907 |
||
185 | 908 |
switch (__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) { |
29 | 909 |
case DOUBLEARRAY: |
77 | 910 |
/* best speed for double array - the data is already as we want it */ |
911 |
if (nByte < (count * sizeof(double))) return (double *)0; |
|
912 |
return (double *)pElem; |
|
29 | 913 |
|
914 |
case FLOATARRAY: |
|
77 | 915 |
if (nByte < (count * sizeof(float))) return (double *)0; |
916 |
for (i=0; i<count; i++) { |
|
917 |
vec[i] = *((float *)pElem); |
|
918 |
pElem += sizeof(float); |
|
919 |
} |
|
920 |
return vec; |
|
29 | 921 |
|
922 |
case POINTERARRAY: |
|
77 | 923 |
if (nByte < (count * sizeof(OBJ))) return (double *)0; |
924 |
/* get elements one-by-one */ |
|
925 |
for (i=0; i<count; i++) { |
|
926 |
o = *(OBJ *)pElem; |
|
927 |
if (__isFloat(o)) |
|
928 |
vec[i] = _floatVal(o); |
|
97 | 929 |
else if (__isSmallInteger(o)) |
185 | 930 |
vec[i] = (double)(__intVal(o)); |
77 | 931 |
else if (__isFraction(o) |
97 | 932 |
&& __isSmallInteger(_FractionInstPtr(o)->f_numerator) |
933 |
&& __isSmallInteger(_FractionInstPtr(o)->f_denominator)) { |
|
77 | 934 |
double n, d; |
935 |
||
185 | 936 |
n = (double)(__intVal(_FractionInstPtr(o)->f_numerator)); |
937 |
d = (double)(__intVal(_FractionInstPtr(o)->f_denominator)); |
|
77 | 938 |
vec[i] = n / d; |
939 |
||
940 |
} else |
|
941 |
return 0; |
|
942 |
pElem += sizeof(OBJ); |
|
943 |
} |
|
944 |
return vec; |
|
29 | 945 |
} |
946 |
return (double *)0; |
|
947 |
} |
|
948 |
||
949 |
/* |
|
950 |
* move from a c-float array into an st-object, |
|
951 |
* the st-object MUST be either a float- or double array |
|
952 |
*/ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
953 |
__glx_putFloatsFromInto(vec, obj, count) |
12 | 954 |
OBJ obj; |
955 |
float *vec; |
|
956 |
{ |
|
957 |
OBJ cls; |
|
958 |
int nByte; |
|
959 |
OBJ o; |
|
960 |
int i, ninstVars, nInstBytes; |
|
961 |
char *pElem; |
|
962 |
||
963 |
if (! _isNonNilObject(obj)) return 0; |
|
964 |
||
134 | 965 |
cls = __qClass(obj); |
185 | 966 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
12 | 967 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 968 |
nByte = __qSize(obj) - nInstBytes; |
12 | 969 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
970 |
||
185 | 971 |
switch (__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) { |
12 | 972 |
case FLOATARRAY: |
77 | 973 |
if (nByte < (count * sizeof(float))) return 0; |
974 |
for (i=0; i<count; i++) { |
|
975 |
*(float *)pElem = vec[i]; |
|
976 |
pElem += sizeof(float); |
|
977 |
} |
|
978 |
return 1; |
|
12 | 979 |
|
980 |
case DOUBLEARRAY: |
|
77 | 981 |
if (nByte < (count * sizeof(float))) return 0; |
982 |
for (i=0; i<count; i++) { |
|
983 |
*(double *)pElem = vec[i]; |
|
984 |
pElem += sizeof(double); |
|
985 |
} |
|
986 |
return 1; |
|
12 | 987 |
} |
988 |
/* not implemented for others */ |
|
989 |
||
990 |
return 0; |
|
991 |
} |
|
992 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
993 |
#ifndef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
994 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
995 |
Matrix * |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
996 |
__glx_getFloatsFromMatrixInto(obj, mp) |
12 | 997 |
OBJ obj; |
998 |
Matrix *mp; |
|
999 |
{ |
|
1000 |
OBJ cls; |
|
1001 |
int nByte; |
|
1002 |
OBJ o; |
|
29 | 1003 |
int ninstVars, nInstBytes; |
1004 |
char *pElem; |
|
1005 |
int x = 0; |
|
1006 |
int i,j; |
|
12 | 1007 |
|
1008 |
if (! _isNonNilObject(obj)) return (Matrix *)0; |
|
1009 |
||
134 | 1010 |
cls = __qClass(obj); |
185 | 1011 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
29 | 1012 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 1013 |
nByte = __qSize(obj) - nInstBytes; |
29 | 1014 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
1015 |
||
185 | 1016 |
switch (__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) { |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1017 |
case FLOATARRAY: |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1018 |
/* |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1019 |
* very easy for FLOATARRAY objects - no copying needed |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1020 |
*/ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1021 |
if (nByte < (16 * sizeof(float))) return (Matrix *)0; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1022 |
return (Matrix *) _FloatArrayInstPtr(obj)->f_element; |
12 | 1023 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1024 |
case DOUBLEARRAY: |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1025 |
/* |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1026 |
* for DOUBLEARRAY objects copy and cast |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1027 |
*/ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1028 |
if (nByte < (16 * sizeof(double))) return (Matrix *)0; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1029 |
for (i=0; i<4; i++) { |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1030 |
for (j=0; j<4; j++) { |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1031 |
(*mp)[i][j] = _DoubleArrayInstPtr(obj)->d_element[x]; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1032 |
x++; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1033 |
} |
77 | 1034 |
} |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1035 |
return mp; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1036 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1037 |
case POINTERARRAY: |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1038 |
if (nByte < (16 * sizeof(OBJ))) return (Matrix *)0; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1039 |
/* |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1040 |
* get elements one-by-one |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1041 |
*/ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1042 |
for (i=0; i<4; i++) { |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1043 |
for (j=0; j<4; j++) { |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1044 |
o = _ArrayInstPtr(obj)->a_element[x]; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1045 |
if (__isFloat(o)) { |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1046 |
(*mp)[i][j] = _floatVal(o); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1047 |
} else if (__isSmallInteger(o)) { |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1048 |
(*mp)[i][j] = (double)__intVal(o); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1049 |
} else if (__isFraction(o) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1050 |
&& __isSmallInteger(_FractionInstPtr(o)->f_numerator) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1051 |
&& __isSmallInteger(_FractionInstPtr(o)->f_denominator)) { |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1052 |
double n, d; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1053 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1054 |
n = (double)(__intVal(_FractionInstPtr(o)->f_numerator)); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1055 |
d = (double)(__intVal(_FractionInstPtr(o)->f_denominator)); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1056 |
(*mp)[i][j] = n / d; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1057 |
} else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1058 |
return (Matrix *)0; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1059 |
x++; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1060 |
} |
77 | 1061 |
} |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1062 |
return mp; |
12 | 1063 |
} |
1064 |
return (Matrix *)0; |
|
1065 |
} |
|
1066 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1067 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1068 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1069 |
float* |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1070 |
__glx_getFloatsFromFloatArrayInto(obj, fp) |
46 | 1071 |
OBJ obj; |
1072 |
float *fp; |
|
1073 |
{ |
|
1074 |
OBJ cls; |
|
1075 |
int ninstVars; |
|
1076 |
||
1077 |
if (! _isNonNilObject(obj)) return (float *)0; |
|
134 | 1078 |
cls = __qClass(obj); |
350 | 1079 |
if (cls == @global(FloatArray)) |
77 | 1080 |
return _FloatArrayInstPtr(obj)->f_element; |
46 | 1081 |
|
185 | 1082 |
if ((__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) == FLOATARRAY) { |
1083 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
|
77 | 1084 |
return (float *) &(_InstPtr(obj)->i_instvars[ninstVars]); |
46 | 1085 |
} |
1086 |
||
1087 |
/* |
|
1088 |
* need more here (i.e. convert from array-of-floats) |
|
1089 |
*/ |
|
1090 |
return (float *)0; |
|
1091 |
} |
|
1092 |
||
1093 |
%} |
|
1094 |
! ! |
|
0 | 1095 |
|
294 | 1096 |
!GLXWorkstation class methodsFor:'documentation'! |
1097 |
||
1098 |
copyright |
|
1099 |
" |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1100 |
COPYRIGHT (c) 1993 by Claus Gittinger |
294 | 1101 |
All Rights Reserved |
1102 |
||
1103 |
This software is furnished under a license and may be used |
|
1104 |
only in accordance with the terms of that license and with the |
|
1105 |
inclusion of the above copyright notice. This software may not |
|
1106 |
be provided or otherwise made available to, or used by, any |
|
1107 |
other person. No title to or ownership of the software is |
|
1108 |
hereby transferred. |
|
1109 |
" |
|
1110 |
! |
|
1111 |
||
1112 |
documentation |
|
1113 |
" |
|
1114 |
this class was originally written as a demo on how an interface to |
|
1115 |
a c graphics library could be implemented. In the mean time, it has become |
|
1116 |
quite complete ... |
|
1117 |
||
1118 |
It provides an interface to either a real GL (on SGI workstations) |
|
1119 |
or a simulated VGL (i.e. GL-light; low nicotine). |
|
1120 |
The GL simulation is derived from the PD vogl library, with slight |
|
1121 |
modifictions to support multiple GL views. |
|
1122 |
||
1123 |
Most of the hard work was done by Jeff (thanks indeed) ... |
|
1124 |
||
1125 |
||
1126 |
Some notes: |
|
1127 |
||
1128 |
I do not really know what most of these functions do - for more |
|
1129 |
detail, see the GL man pages (on SGI) or the doc provided with VGL. |
|
1130 |
||
1131 |
The interface offered here provides a very very low level (i.e one-to-one) |
|
1132 |
interface to GL functions. More high-level stuff is required, to make |
|
1133 |
3D drawing be more object-oriented. |
|
1134 |
(see a bit of this in 'clients/IRIS-specials') |
|
1135 |
||
1136 |
Some functions are duplicated, Jeff and I developed those in parallel - |
|
1137 |
for now, both will remain - finally they will be merged and duplicates removed ... |
|
1138 |
(examples are makeobj and makeObject). |
|
1139 |
||
1140 |
Also, in a hurry to implement all those methods, many do no or only |
|
1141 |
limited argument checking - make certain, that you pass the correct |
|
1142 |
arguments. |
|
1143 |
||
1144 |
There might be some confusion in the v3[sifd] functions: basically they |
|
1145 |
all do the same, and could be mapped onto one st-method (such as vertex3). |
|
1146 |
However, the C-functions expect different argument types - I dont know if |
|
1147 |
one or another of these functions suffers from any performance penalties. |
|
1148 |
Therefore, I leave the direct 1-to-1 mapping; GL experts might know more |
|
1149 |
about this (I use v3f in all of my code). |
|
1150 |
||
1151 |
written june 93 by claus |
|
1152 |
VGL stuff dec 93 |
|
1153 |
many many additions jan 94 by Jeff McAffer <jeff@is.s.u-tokyo.ac.jp> |
|
1154 |
||
1155 |
Since this is a demo (consider it a free add-on goody) there is |
|
1156 |
*** NO WARRANTY ** for this. |
|
1157 |
||
1158 |
Notice: this should be rewritten to use the openGL library functions |
|
1159 |
(actually, to not loose the VGL interface, another OpenGLWorkstation |
|
1160 |
class should be written) |
|
614 | 1161 |
|
1162 |
[author:] |
|
1163 |
Claus Gittinger |
|
1164 |
Jeff McAffer |
|
294 | 1165 |
" |
1166 |
! ! |
|
1167 |
||
168 | 1168 |
!GLXWorkstation class methodsFor:'error handling'! |
1169 |
||
294 | 1170 |
errorStringOfLastError |
1171 |
%{ |
|
1172 |
RETURN ( __MKSTRING(lastErrorMsg COMMA_CON) ); |
|
168 | 1173 |
%} |
1174 |
! |
|
1175 |
||
528 | 1176 |
forceGL:aBoolean |
1177 |
ForceGL := aBoolean. |
|
1178 |
AllScreens notNil ifTrue:[ |
|
1179 |
AllScreens do:[:screen | screen initializeScreenProperties] |
|
1180 |
]. |
|
1181 |
! |
|
1182 |
||
168 | 1183 |
minorCodeOfLastError |
1184 |
%{ /* NOCONTEXT */ |
|
1185 |
||
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
1186 |
RETURN ( __MKSMALLINT(lastMinorCode) ); |
168 | 1187 |
%} |
1188 |
! |
|
1189 |
||
294 | 1190 |
requestCodeOfLastError |
1191 |
%{ /* NOCONTEXT */ |
|
1192 |
||
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
1193 |
RETURN ( __MKSMALLINT(lastRequestCode) ); |
294 | 1194 |
%} |
1195 |
! |
|
1196 |
||
168 | 1197 |
resourceIdOfLastError |
1198 |
%{ /* NOCONTEXT */ |
|
1199 |
||
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
1200 |
RETURN ( __MKSMALLINT(lastResource) ); |
168 | 1201 |
%} |
294 | 1202 |
! ! |
1203 |
||
1204 |
!GLXWorkstation methodsFor:'arcs and circles'! |
|
1205 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1206 |
glxArcX:x y:y radius:radius startang:startang endang:endang in: aGLXWindowId |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1207 |
"draw an arc at a given location. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1208 |
The x/y/radius args may be floats, fractions or smallIntegers. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1209 |
startang and endang must be smallIntegers (10th of a degree)." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1210 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1211 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1212 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1213 |
#else |
294 | 1214 |
Coord c_x, c_y, c_radius; |
1215 |
Angle a_startang, a_endang; |
|
1216 |
||
1217 |
_COORD_(x, c_x) |
|
1218 |
_COORD_(y, c_y) |
|
1219 |
_COORD_(radius, c_radius) |
|
1220 |
_ANGLE_(startang, a_startang) |
|
1221 |
_ANGLE_(endang, a_endang) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1222 |
|
294 | 1223 |
SETWIN(aGLXWindowId) |
1224 |
arc(c_x, c_y, c_radius, a_startang, a_endang); |
|
1225 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1226 |
#endif |
294 | 1227 |
%} |
528 | 1228 |
|
1229 |
"Modified: 19.3.1996 / 18:43:52 / cg" |
|
294 | 1230 |
! |
1231 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1232 |
glxArcfX:x y:y radius:radius startang:startang endang:endang in: aGLXWindowId |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1233 |
"draw a filled arc. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1234 |
The x/y/radius args may be floats, fractions or smallIntegers. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1235 |
startang and endang must be smallIntegers (10th of a degree)." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1236 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1237 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1238 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1239 |
#else |
294 | 1240 |
Coord c_x, c_y, c_radius; |
1241 |
Angle a_startang, a_endang; |
|
1242 |
||
1243 |
_COORD_(x, c_x) |
|
1244 |
_COORD_(y, c_y) |
|
1245 |
_COORD_(radius, c_radius) |
|
1246 |
_ANGLE_(startang, a_startang) |
|
1247 |
_ANGLE_(endang, a_endang) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1248 |
|
294 | 1249 |
SETWIN(aGLXWindowId) |
1250 |
arcf(c_x, c_y, c_radius, a_startang, a_endang); |
|
1251 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1252 |
#endif |
294 | 1253 |
%} |
1254 |
! |
|
1255 |
||
1256 |
glxArcfiX: x y: y radius: radius startang: startang endang: endang in: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1257 |
"draw a filled arc. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1258 |
All arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1259 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1260 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1261 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1262 |
#else |
294 | 1263 |
Icoord c_x, c_y, c_radius; |
1264 |
Angle a_startang, a_endang; |
|
1265 |
||
1266 |
_ICOORD_(x, c_x) |
|
1267 |
_ICOORD_(y, c_y) |
|
1268 |
_ICOORD_(radius, c_radius) |
|
1269 |
_ANGLE_(startang, a_startang); |
|
1270 |
_ANGLE_(endang, a_endang) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1271 |
|
294 | 1272 |
SETWIN(aGLXWindowId) |
1273 |
arcfi(c_x, c_y, c_radius, a_startang, a_endang); |
|
1274 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1275 |
#endif |
294 | 1276 |
%} |
1277 |
! |
|
1278 |
||
1279 |
glxArcfsX: x y: y radius: radius startang: startang endang: endang in: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1280 |
"draw a filled arc. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1281 |
All arguments must be (16bit) smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1282 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1283 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1284 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1285 |
#else |
294 | 1286 |
Scoord c_x, c_y, c_radius; |
1287 |
Angle a_startang, a_endang; |
|
1288 |
||
1289 |
_SCOORD_(x, c_x) |
|
1290 |
_SCOORD_(y, c_y) |
|
1291 |
_SCOORD_(radius, c_radius) |
|
1292 |
_ANGLE_(startang, a_startang) |
|
1293 |
_ANGLE_(endang, a_endang) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1294 |
|
294 | 1295 |
SETWIN(aGLXWindowId) |
1296 |
arcfs(c_x, c_y, c_radius, a_startang, a_endang); |
|
1297 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1298 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1299 |
%} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1300 |
! |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1301 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1302 |
glxArciX:x y:y radius:radius startang:startang endang:endang in: aGLXWindowId |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1303 |
"draw an (unfilled) arc. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1304 |
All arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1305 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1306 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1307 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1308 |
#else |
294 | 1309 |
Icoord c_x, c_y, c_radius; |
1310 |
Angle a_startang, a_endang; |
|
1311 |
||
1312 |
_ICOORD_(x, c_x) |
|
1313 |
_ICOORD_(y, c_y) |
|
1314 |
_ICOORD_(radius, c_radius) |
|
1315 |
_ANGLE_(startang, a_startang) |
|
1316 |
_ANGLE_(endang, a_endang) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1317 |
|
294 | 1318 |
SETWIN(aGLXWindowId) |
1319 |
arci(c_x, c_y, c_radius, a_startang, a_endang); |
|
1320 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1321 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1322 |
%} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1323 |
! |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1324 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1325 |
glxArcsX:x y:y radius:radius startang:startang endang:endang in: aGLXWindowId |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1326 |
"draw an (unfilled) arc. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1327 |
All arguments must be (16bit) smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1328 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1329 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1330 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1331 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1332 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1333 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1334 |
Scoord c_x, c_y, c_radius; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1335 |
Angle a_startang, a_endang; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1336 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1337 |
_SCOORD_(x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1338 |
_SCOORD_(y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1339 |
_SCOORD_(radius, c_radius) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1340 |
_ANGLE_(startang, a_startang) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1341 |
_ANGLE_(endang, a_endang) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1342 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1343 |
arcs(c_x, c_y, c_radius, a_startang, a_endang); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1344 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1345 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1346 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1347 |
%} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1348 |
! |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1349 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1350 |
glxCircX:x y:y radius: radius in: aGLXWindowId |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1351 |
"draw a circle. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1352 |
x/y/radius may be floats, fractions or smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1353 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1354 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1355 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1356 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1357 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1358 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1359 |
Coord c_x, c_y, c_radius; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1360 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1361 |
_COORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1362 |
_COORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1363 |
_COORD_ (radius, c_radius) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1364 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1365 |
circ(c_x, c_y, c_radius); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1366 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1367 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1368 |
#endif |
294 | 1369 |
%} |
1370 |
! |
|
1371 |
||
1372 |
glxCircfX: x y: y radius: radius in: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1373 |
"draw a filled circle. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1374 |
x/y/radius may be floats, fractions or smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1375 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1376 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1377 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1378 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1379 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1380 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1381 |
Coord c_x, c_y, c_radius; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1382 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1383 |
_COORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1384 |
_COORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1385 |
_COORD_ (radius, c_radius) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1386 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1387 |
circf(c_x, c_y, c_radius); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1388 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1389 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1390 |
#endif |
294 | 1391 |
%} |
1392 |
! |
|
1393 |
||
1394 |
glxCircfiX: x y: y radius: radius in: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1395 |
"draw a filled circle. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1396 |
x/y/radius must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1397 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1398 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1399 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1400 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1401 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1402 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1403 |
Icoord c_x, c_y, c_radius; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1404 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1405 |
_ICOORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1406 |
_ICOORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1407 |
_ICOORD_ (radius, c_radius) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1408 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1409 |
circfi(c_x, c_y, c_radius); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1410 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1411 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1412 |
#endif |
294 | 1413 |
%} |
1414 |
! |
|
1415 |
||
1416 |
glxCircfsX: x y: y radius: radius in: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1417 |
"draw a filled circle. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1418 |
x/y/radius must be (16bit) smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1419 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1420 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1421 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1422 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1423 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1424 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1425 |
Scoord c_x, c_y, c_radius; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1426 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1427 |
_SCOORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1428 |
_SCOORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1429 |
_SCOORD_ (radius, c_radius) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1430 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1431 |
circfs(c_x, c_y, c_radius); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1432 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1433 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1434 |
#endif |
294 | 1435 |
%} |
1436 |
! |
|
1437 |
||
1438 |
glxCirciX: x y: y radius: radius in: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1439 |
"draw a circle (unfilled). |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1440 |
x/y/radius must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1441 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1442 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1443 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1444 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1445 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1446 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1447 |
Icoord c_x, c_y, c_radius; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1448 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1449 |
_ICOORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1450 |
_ICOORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1451 |
_ICOORD_ (radius, c_radius) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1452 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1453 |
circi(c_x, c_y, c_radius); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1454 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1455 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1456 |
#endif |
294 | 1457 |
%} |
1458 |
! |
|
1459 |
||
1460 |
glxCircsX: x y: y radius: radius in: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1461 |
"draw a circle (unfilled) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1462 |
x/y/radius must be (16bit) smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1463 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1464 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1465 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1466 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1467 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1468 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1469 |
Scoord c_x, c_y, c_radius; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1470 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1471 |
_SCOORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1472 |
_SCOORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1473 |
_SCOORD_ (radius, c_radius) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1474 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1475 |
circs(c_x, c_y, c_radius); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1476 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1477 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1478 |
#endif |
294 | 1479 |
%} |
1480 |
! ! |
|
1481 |
||
528 | 1482 |
!GLXWorkstation methodsFor:'attribute stack'! |
1483 |
||
1484 |
glxPopattributesIn: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1485 |
"pop (and forget) the top entry on the attribute stack" |
528 | 1486 |
|
1487 |
%{ /* NOCONTEXT */ |
|
1488 |
SETWIN(aGLXWindowId) |
|
1489 |
popattributes(); |
|
1490 |
%} |
|
1491 |
||
1492 |
"Modified: 19.3.1996 / 18:42:53 / cg" |
|
1493 |
! |
|
1494 |
||
1495 |
glxPushattributesIn: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1496 |
"save the current attributes on the attribute stack" |
528 | 1497 |
|
1498 |
%{ /* NOCONTEXT */ |
|
1499 |
SETWIN(aGLXWindowId) |
|
1500 |
pushattributes(); |
|
1501 |
%} |
|
1502 |
||
1503 |
"Modified: 19.3.1996 / 18:43:04 / cg" |
|
1504 |
! ! |
|
1505 |
||
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1506 |
!GLXWorkstation methodsFor:'character position'! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1507 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1508 |
glxCmov2X: x y: y in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1509 |
"change the character position to a 2D point, as passed in x/y. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1510 |
The arguments may be floats, fractions or smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1511 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1512 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1513 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1514 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1515 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1516 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1517 |
Coord c_x, c_y; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1518 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1519 |
_COORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1520 |
_COORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1521 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1522 |
cmov2(c_x, c_y); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1523 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1524 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1525 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1526 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1527 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1528 |
"Modified: 22.3.1996 / 18:17:38 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1529 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1530 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1531 |
glxCmov2iX: x y: y in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1532 |
"change the character position to a 2D point, as passed in x/y. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1533 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1534 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1535 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1536 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1537 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1538 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1539 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1540 |
Icoord c_x, c_y; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1541 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1542 |
_ICOORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1543 |
_ICOORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1544 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1545 |
cmov2i(c_x, c_y); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1546 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1547 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1548 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1549 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1550 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1551 |
"Modified: 22.3.1996 / 18:17:43 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1552 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1553 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1554 |
glxCmov2sX: x y: y in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1555 |
"change the character position to a 2D point, as passed in x/y. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1556 |
The arguments must be (16bit) smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1557 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1558 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1559 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1560 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1561 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1562 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1563 |
Scoord c_x, c_y; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1564 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1565 |
_SCOORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1566 |
_SCOORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1567 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1568 |
cmov2s(c_x, c_y); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1569 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1570 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1571 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1572 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1573 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1574 |
"Modified: 22.3.1996 / 18:17:47 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1575 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1576 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1577 |
glxCmovX: x y: y z: z in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1578 |
"change the character position to a 3D point, as passed in x/y/z. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1579 |
The arguments may be floats, fractions or smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1580 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1581 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1582 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1583 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1584 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1585 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1586 |
Coord c_x, c_y, c_z; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1587 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1588 |
_COORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1589 |
_COORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1590 |
_COORD_ (z, c_z) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1591 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1592 |
cmov(c_x, c_y, c_z); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1593 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1594 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1595 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1596 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1597 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1598 |
"Modified: 22.3.1996 / 18:17:22 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1599 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1600 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1601 |
glxCmoviX: x y: y z: z in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1602 |
"change the character position to a 3D point, as passed in x/y/z. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1603 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1604 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1605 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1606 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1607 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1608 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1609 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1610 |
Icoord c_x, c_y, c_z; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1611 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1612 |
_ICOORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1613 |
_ICOORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1614 |
_ICOORD_ (z, c_z) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1615 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1616 |
cmovi(c_x, c_y, c_z); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1617 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1618 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1619 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1620 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1621 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1622 |
"Modified: 22.3.1996 / 18:17:55 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1623 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1624 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1625 |
glxCmovsX: x y: y z: z in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1626 |
"change the character position to a 3D point, as passed in x/y/z. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1627 |
The arguments must be (16bit) smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1628 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1629 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1630 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1631 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1632 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1633 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1634 |
Scoord c_x, c_y, c_z; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1635 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1636 |
_SCOORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1637 |
_SCOORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1638 |
_SCOORD_ (z, c_z) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1639 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1640 |
cmovs(c_x, c_y, c_z); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1641 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1642 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1643 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1644 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1645 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1646 |
"Modified: 22.3.1996 / 18:17:59 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1647 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1648 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1649 |
glxGetcposIn: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1650 |
"Return the current character position as a point with integer coordinates" |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1651 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1652 |
| x y | |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1653 |
%{ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1654 |
#ifdef GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1655 |
short s_x, s_y; |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1656 |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1657 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1658 |
getcpos(&s_x, &s_y); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1659 |
x = __MKSMALLINT(s_x); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1660 |
y = __MKSMALLINT(s_y); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1661 |
#endif |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1662 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1663 |
. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1664 |
^x @ y |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1665 |
! ! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1666 |
|
294 | 1667 |
!GLXWorkstation methodsFor:'clearing'! |
1668 |
||
1669 |
glxClearIn:aGLXWindowId |
|
1670 |
"clear to current color" |
|
1671 |
||
1672 |
%{ /* NOCONTEXT */ |
|
1673 |
SETWIN(aGLXWindowId) |
|
1674 |
clear(); |
|
1675 |
%} |
|
1676 |
! |
|
1677 |
||
1678 |
glxCzclearCval:cval zval:zval in:aGLXWindowId |
|
1679 |
"clear to a color (cval) and clear z buffer to zval simultaniously" |
|
1680 |
||
1681 |
%{ /* NOCONTEXT */ |
|
1682 |
#ifdef GLX |
|
1683 |
SETWIN(aGLXWindowId) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1684 |
|
294 | 1685 |
czclear((ulong)__intVal(cval), __intVal(zval)); |
1686 |
RETURN (true); |
|
1687 |
#endif |
|
1688 |
%} |
|
1689 |
. |
|
1690 |
^ false |
|
1691 |
! |
|
1692 |
||
1693 |
glxZClearIn:aGLXWindowId |
|
1694 |
"clear z buffer" |
|
1695 |
||
1696 |
%{ /* NOCONTEXT */ |
|
1697 |
#ifdef GLX |
|
1698 |
SETWIN(aGLXWindowId) |
|
1699 |
zclear(); |
|
1700 |
RETURN (true); |
|
1701 |
#endif |
|
1702 |
%} |
|
1703 |
. |
|
1704 |
^ false |
|
1705 |
! ! |
|
1706 |
||
1707 |
!GLXWorkstation methodsFor:'color'! |
|
1708 |
||
1709 |
glxColor:index in:aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1710 |
"set the drawing color; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1711 |
for non gouraud shading, we dont care if the argument is integer or float; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1712 |
otherwise, better results are expected with float values." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1713 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1714 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1715 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1716 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1717 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1718 |
#else |
294 | 1719 |
if (__isSmallInteger(index)) { |
1720 |
color((Colorindex)(__intVal(index))); |
|
1721 |
RETURN (true); |
|
1722 |
} |
|
1723 |
if (__isFloat(index)) { |
|
1724 |
colorf((float)(_floatVal(index))); |
|
1725 |
RETURN (true); |
|
1726 |
} |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1727 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1728 |
%}. |
294 | 1729 |
^ false |
1730 |
! |
|
1731 |
||
1732 |
glxColorRed:r green:g blue:b alpha:a in:aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1733 |
"set the drawing color, including alpha value. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1734 |
The args must be integer values within 0..255" |
294 | 1735 |
|
1736 |
%{ /* NOCONTEXT */ |
|
1737 |
||
1738 |
#ifdef GLX |
|
1739 |
short s_r, s_g, s_b, s_a; |
|
1740 |
||
1741 |
_INT_(r, s_r); |
|
1742 |
_INT_(g, s_g); |
|
1743 |
_INT_(b, s_b); |
|
1744 |
_INT_(a, s_a); |
|
1745 |
SETWIN(aGLXWindowId) |
|
1746 |
cpack((((((s_a<<8) | s_b) << 8) | s_g) << 8) | s_r); |
|
1747 |
RETURN (true); |
|
1748 |
#endif |
|
1749 |
%} |
|
1750 |
. |
|
1751 |
^ false |
|
1752 |
! |
|
1753 |
||
1754 |
glxColorRed:r green:g blue:b in:aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1755 |
"set the drawing color. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1756 |
The args must be integer values in 0..255" |
294 | 1757 |
|
1758 |
%{ /* NOCONTEXT */ |
|
1759 |
||
1760 |
#ifdef GLX |
|
1761 |
short s_r, s_g, s_b; |
|
1762 |
||
1763 |
_INT_(r, s_r); |
|
1764 |
_INT_(g, s_g); |
|
1765 |
_INT_(b, s_b); |
|
1766 |
SETWIN(aGLXWindowId) |
|
1767 |
RGBcolor(s_r, s_g, s_b); |
|
1768 |
RETURN (true); |
|
1769 |
#endif |
|
1770 |
%} |
|
1771 |
. |
|
1772 |
^ false |
|
1773 |
! |
|
1774 |
||
528 | 1775 |
glxLrgbrangeRmin: rmin gmin: gmin bmin: bmin rmax: rmax gmax: gmax bmax: bmax |
1776 |
znear: znear zfar: zfar in: aGLXWindowId |
|
1777 |
||
1778 |
%{ /* NOCONTEXT */ |
|
1779 |
#ifdef GLX |
|
1780 |
SETWIN(aGLXWindowId) |
|
1781 |
lRGBrange(_shortVal(rmin), _shortVal(gmin), _shortVal(bmin), |
|
1782 |
_shortVal(rmax), _shortVal(gmax), _shortVal(bmax), |
|
1783 |
_longVal(znear), _longVal(zfar)); |
|
1784 |
RETURN (true); |
|
1785 |
#endif |
|
1786 |
%} |
|
1787 |
. |
|
1788 |
^ false |
|
1789 |
! |
|
1790 |
||
1791 |
glxMapcolorI: i red: red green: green blue: blue in: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1792 |
"change a color in the color lookup table (i.e. in COLOR_INDEX mode). |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1793 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1794 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1795 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1796 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1797 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1798 |
#else |
528 | 1799 |
mapcolor(_colorindexVal(i), _shortVal(red), _shortVal(green), _shortVal(blue)); |
1800 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1801 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1802 |
%} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1803 |
! |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1804 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1805 |
glxTextcolor:tcolor in: aGLXWindowId |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1806 |
"change the color used for text drawing" |
294 | 1807 |
|
1808 |
%{ /* NOCONTEXT */ |
|
1809 |
#ifdef GLX |
|
1810 |
SETWIN(aGLXWindowId) |
|
1811 |
textcolor(_colorindexVal(tcolor)); |
|
1812 |
RETURN (true); |
|
1813 |
#endif |
|
1814 |
%} |
|
1815 |
. |
|
1816 |
^ false |
|
1817 |
! ! |
|
1818 |
||
528 | 1819 |
!GLXWorkstation methodsFor:'curves'! |
1820 |
||
1821 |
glxCurvebasis: basid in: aGLXWindowId |
|
1822 |
"sets the basis type of curves" |
|
1823 |
||
1824 |
%{ /* NOCONTEXT */ |
|
1825 |
SETWIN(aGLXWindowId) |
|
1826 |
curvebasis(_shortVal(basid)); |
|
1827 |
RETURN (true); |
|
1828 |
%} |
|
1829 |
||
1830 |
"Modified: 19.3.1996 / 18:47:09 / cg" |
|
1831 |
! |
|
1832 |
||
1833 |
glxCurveit: iterationcount in: aGLXWindowId |
|
1834 |
"Iterates the top matrix on the stack as a forward difference |
|
1835 |
matrix, drawing as it goes along." |
|
1836 |
||
1837 |
%{ /* NOCONTEXT */ |
|
1838 |
SETWIN(aGLXWindowId) |
|
1839 |
curveit(_shortVal(iterationcount)); |
|
1840 |
RETURN (true); |
|
1841 |
%} |
|
1842 |
||
1843 |
"Modified: 19.3.1996 / 18:48:57 / cg" |
|
1844 |
! |
|
1845 |
||
1846 |
glxCurveprecision: nsegments in: aGLXWindowId |
|
1847 |
"sets the number of line segments that make up a curve segment" |
|
1848 |
||
1849 |
%{ /* NOCONTEXT */ |
|
1850 |
SETWIN(aGLXWindowId) |
|
1851 |
curveprecision(_shortVal(nsegments)); |
|
1852 |
RETURN (true); |
|
1853 |
%} |
|
1854 |
||
1855 |
"Modified: 19.3.1996 / 18:47:43 / cg" |
|
1856 |
! ! |
|
1857 |
||
294 | 1858 |
!GLXWorkstation methodsFor:'double buffering'! |
1859 |
||
1860 |
glxBackBufferIn:aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1861 |
"switch to back buffer drawing - turning frontbuffer drawing off" |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1862 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1863 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1864 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1865 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1866 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1867 |
# ifdef GLX |
294 | 1868 |
frontbuffer(FALSE); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1869 |
# endif |
294 | 1870 |
backbuffer(TRUE); |
1871 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1872 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1873 |
%} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1874 |
! |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1875 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1876 |
glxBackbuffer:b in: aGLXWindowId |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1877 |
"turn backBuffer drawing on/off. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1878 |
Notice: VGL is not able to draw into both buffers at the same time ... |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1879 |
... enabling the backbuffer automatically disables frontbuffer drawing |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1880 |
and vice versa. This seems not to be the case with a true GL." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1881 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1882 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1883 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1884 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1885 |
#else |
294 | 1886 |
backbuffer(_booleanVal(b)); |
1887 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1888 |
#endif |
294 | 1889 |
%} |
528 | 1890 |
|
1891 |
"Modified: 19.3.1996 / 18:45:05 / cg" |
|
294 | 1892 |
! |
1893 |
||
1894 |
glxDoubleBufferIn:aGLXWindowId |
|
1895 |
"set double buffer mode" |
|
1896 |
||
1897 |
%{ /* NOCONTEXT */ |
|
1898 |
SETWIN(aGLXWindowId) |
|
1899 |
doublebuffer(); |
|
1900 |
RETURN (true); |
|
1901 |
%} |
|
1902 |
! |
|
1903 |
||
1904 |
glxFrontBufferIn:aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1905 |
"switch to front buffer drawing - turning backbuffer drawing off" |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1906 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1907 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1908 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1909 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1910 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1911 |
# ifdef GLX |
294 | 1912 |
backbuffer(FALSE); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1913 |
# endif |
294 | 1914 |
frontbuffer(TRUE); |
1915 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1916 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1917 |
%} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1918 |
! |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1919 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1920 |
glxFrontbuffer:b in: aGLXWindowId |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1921 |
"turn on/off frontbuffer drawing. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1922 |
Notice: VGL is not able to draw into both buffers at the same time ... |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1923 |
... enabling the backbuffer automatically disables frontbuffer drawing |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1924 |
and vice versa. This seems not to be the case with a true GL." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1925 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1926 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1927 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1928 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1929 |
#else |
294 | 1930 |
frontbuffer(_booleanVal(b)); |
1931 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1932 |
#endif |
294 | 1933 |
%} |
528 | 1934 |
|
1935 |
"Modified: 19.3.1996 / 18:45:31 / cg" |
|
294 | 1936 |
! |
1937 |
||
1938 |
glxSingleBufferIn: aGLXWindowId |
|
1939 |
"set single buffer mode" |
|
1940 |
||
1941 |
%{ /* NOCONTEXT */ |
|
1942 |
SETWIN(aGLXWindowId) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1943 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1944 |
#else |
294 | 1945 |
singlebuffer(); |
1946 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1947 |
#endif |
294 | 1948 |
%} |
1949 |
! |
|
1950 |
||
1951 |
glxSwapBuffersIn:aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1952 |
"swap the back and front buffers. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1953 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1954 |
To animate things smoothly, draw into the backBuffer while the frontBuffer is |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1955 |
displayed and swap them for every frame." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1956 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1957 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1958 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1959 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1960 |
#else |
294 | 1961 |
swapbuffers(); |
1962 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1963 |
#endif |
294 | 1964 |
%} |
528 | 1965 |
|
1966 |
"Modified: 19.3.1996 / 18:45:47 / cg" |
|
294 | 1967 |
! ! |
1968 |
||
1969 |
!GLXWorkstation methodsFor:'flat drawing'! |
|
1970 |
||
1971 |
glxBeginClosedLineIn:aGLXWindowId |
|
1972 |
"start a closed line" |
|
1973 |
||
1974 |
%{ /* NOCONTEXT */ |
|
1975 |
SETWIN(aGLXWindowId) |
|
1976 |
bgnclosedline(); |
|
1977 |
RETURN (true); |
|
1978 |
%} |
|
1979 |
! |
|
1980 |
||
1981 |
glxBeginLineIn:aGLXWindowId |
|
1982 |
"start a line group" |
|
1983 |
||
1984 |
%{ /* NOCONTEXT */ |
|
1985 |
SETWIN(aGLXWindowId) |
|
1986 |
bgnline(); |
|
1987 |
%} |
|
1988 |
! |
|
1989 |
||
1990 |
glxBeginPointIn:aGLXWindowId |
|
1991 |
"start a point-group" |
|
1992 |
||
1993 |
%{ /* NOCONTEXT */ |
|
1994 |
SETWIN(aGLXWindowId) |
|
1995 |
bgnpoint(); |
|
1996 |
RETURN (true); |
|
1997 |
%} |
|
1998 |
! |
|
1999 |
||
2000 |
glxBeginPolygonIn:aGLXWindowId |
|
2001 |
"start a polygon" |
|
2002 |
||
2003 |
%{ /* NOCONTEXT */ |
|
2004 |
SETWIN(aGLXWindowId) |
|
2005 |
bgnpolygon(); |
|
2006 |
RETURN (true); |
|
2007 |
%} |
|
2008 |
! |
|
2009 |
||
2010 |
glxBeginQuadrilateralStripIn:aGLXWindowId |
|
2011 |
"start a quadrilateral strip" |
|
2012 |
||
2013 |
%{ /* NOCONTEXT */ |
|
2014 |
SETWIN(aGLXWindowId) |
|
2015 |
bgnqstrip(); |
|
2016 |
RETURN (true); |
|
2017 |
%} |
|
2018 |
! |
|
2019 |
||
2020 |
glxBeginTriangleMeshIn:aGLXWindowId |
|
2021 |
"start a triangle mesh" |
|
2022 |
||
2023 |
%{ /* NOCONTEXT */ |
|
2024 |
SETWIN(aGLXWindowId) |
|
2025 |
bgntmesh(); |
|
2026 |
RETURN (true); |
|
2027 |
%} |
|
2028 |
! |
|
2029 |
||
2030 |
glxEndClosedLineIn:aGLXWindowId |
|
2031 |
"end a closed line" |
|
2032 |
||
2033 |
%{ /* NOCONTEXT */ |
|
2034 |
SETWIN(aGLXWindowId) |
|
2035 |
endclosedline(); |
|
2036 |
RETURN (true); |
|
2037 |
%} |
|
2038 |
! |
|
2039 |
||
2040 |
glxEndLineIn:aGLXWindowId |
|
2041 |
"end a line group" |
|
2042 |
||
2043 |
%{ /* NOCONTEXT */ |
|
2044 |
SETWIN(aGLXWindowId) |
|
2045 |
endline(); |
|
2046 |
RETURN (true); |
|
2047 |
%} |
|
2048 |
! |
|
2049 |
||
2050 |
glxEndPointIn:aGLXWindowId |
|
2051 |
"end a point group" |
|
2052 |
||
2053 |
%{ /* NOCONTEXT */ |
|
2054 |
SETWIN(aGLXWindowId) |
|
2055 |
endpoint(); |
|
2056 |
RETURN (true); |
|
2057 |
%} |
|
2058 |
! |
|
2059 |
||
2060 |
glxEndPolygonIn:aGLXWindowId |
|
2061 |
"end a polygon" |
|
2062 |
||
2063 |
%{ /* NOCONTEXT */ |
|
2064 |
SETWIN(aGLXWindowId) |
|
2065 |
endpolygon(); |
|
2066 |
RETURN (true); |
|
2067 |
%} |
|
2068 |
! |
|
2069 |
||
2070 |
glxEndQuadrilateralStripIn:aGLXWindowId |
|
2071 |
"end a quadrilateral strip" |
|
2072 |
||
2073 |
%{ /* NOCONTEXT */ |
|
2074 |
SETWIN(aGLXWindowId) |
|
2075 |
endqstrip(); |
|
2076 |
RETURN (true); |
|
2077 |
%} |
|
2078 |
! |
|
2079 |
||
2080 |
glxEndTriangleMeshIn:aGLXWindowId |
|
2081 |
"end a triangle mesh" |
|
2082 |
||
2083 |
%{ /* NOCONTEXT */ |
|
2084 |
SETWIN(aGLXWindowId) |
|
2085 |
endtmesh(); |
|
2086 |
RETURN (true); |
|
168 | 2087 |
%} |
2088 |
! ! |
|
2089 |
||
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2090 |
!GLXWorkstation methodsFor:'graphics position'! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2091 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2092 |
glxMove2:v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2093 |
"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
|
2094 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2095 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2096 |
float vec[2], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2097 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2098 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 2))) RETURN(false); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2099 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2100 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2101 |
#else |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2102 |
move2((Coord)(c_v[0]), (Coord)(c_v[1])); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2103 |
RETURN (true); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2104 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2105 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2106 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2107 |
"Modified: 22.3.1996 / 18:15:23 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2108 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2109 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2110 |
glxMove2X: x y: y in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2111 |
"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
|
2112 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2113 |
%{ /* NOCONTEXT */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2114 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2115 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2116 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2117 |
Coord c_x, c_y; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2118 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2119 |
_COORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2120 |
_COORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2121 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2122 |
move2(c_x, c_y); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2123 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2124 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2125 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2126 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2127 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2128 |
"Modified: 22.3.1996 / 18:15:02 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2129 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2130 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2131 |
glxMove2iX: x y: y in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2132 |
"change the graphics position to a 2D point, as passed in x/y. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2133 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2134 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2135 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2136 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2137 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2138 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2139 |
Icoord c_x, c_y; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2140 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2141 |
_ICOORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2142 |
_ICOORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2143 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2144 |
move2i(c_x, c_y); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2145 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2146 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2147 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2148 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2149 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2150 |
"Modified: 22.3.1996 / 18:15:08 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2151 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2152 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2153 |
glxMove2sX: x y: y in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2154 |
"change the graphics position to a 2D point, as passed in x/y. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2155 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2156 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2157 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2158 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2159 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2160 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2161 |
Scoord c_x, c_y; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2162 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2163 |
_SCOORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2164 |
_SCOORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2165 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2166 |
move2s(c_x, c_y); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2167 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2168 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2169 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2170 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2171 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2172 |
"Modified: 22.3.1996 / 18:15:13 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2173 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2174 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2175 |
glxMove:v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2176 |
"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
|
2177 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2178 |
%{ /* NOCONTEXT */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2179 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2180 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2181 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2182 |
float vec[3], *c_v; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2183 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2184 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 3))) RETURN(false); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2185 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2186 |
move((Coord)(c_v[0]), (Coord)(c_v[1]), (Coord)(c_v[2])); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2187 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2188 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2189 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2190 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2191 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2192 |
"Modified: 22.3.1996 / 18:14:29 / cg" |
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 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2195 |
glxMoveX: x y: y z: z in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2196 |
"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
|
2197 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2198 |
%{ /* NOCONTEXT */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2199 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2200 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2201 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2202 |
Coord c_x, c_y, c_z; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2203 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2204 |
_COORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2205 |
_COORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2206 |
_COORD_ (z, c_z) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2207 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2208 |
move(c_x, c_y, c_z); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2209 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2210 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2211 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2212 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2213 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2214 |
"Modified: 22.3.1996 / 18:14:38 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2215 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2216 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2217 |
glxMoveiX: x y: y z: z in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2218 |
"change the graphics position to a 3D point, as passed in x/y/z. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2219 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2220 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2221 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2222 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2223 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2224 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2225 |
Icoord c_x, c_y, c_z; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2226 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2227 |
_ICOORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2228 |
_ICOORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2229 |
_ICOORD_ (z, c_z) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2230 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2231 |
movei(c_x, c_y, c_z); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2232 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2233 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2234 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2235 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2236 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2237 |
"Modified: 22.3.1996 / 18:14:44 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2238 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2239 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2240 |
glxMovesX: x y: y z: z in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2241 |
"change the graphics position to a 3D point, as passed in x/y/z. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2242 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2243 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2244 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2245 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2246 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2247 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2248 |
Scoord c_x, c_y, c_z; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2249 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2250 |
_SCOORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2251 |
_SCOORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2252 |
_SCOORD_ (z, c_z) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2253 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2254 |
moves(c_x, c_y, c_z); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2255 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2256 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2257 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2258 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2259 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2260 |
"Modified: 22.3.1996 / 18:14:48 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2261 |
! |
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 |
glxRmv2:v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2264 |
"change the graphics position to a 2D point, |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2265 |
the relative distance is passed in vector v" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2266 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2267 |
%{ /* NOCONTEXT */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2268 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2269 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2270 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2271 |
float vec[2], *c_v; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2272 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2273 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 2))) RETURN(false); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2274 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2275 |
rmv2((Coord)(c_v[0]), (Coord)(c_v[1])); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2276 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2277 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2278 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2279 |
%} |
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:15:57 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2282 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2283 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2284 |
glxRmv2X: x y: y in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2285 |
"change the graphics position to a 2D point, |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2286 |
the relative distance is passed in x/y" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2287 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2288 |
%{ /* NOCONTEXT */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2289 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2290 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2291 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2292 |
Coord c_x, c_y; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2293 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2294 |
_COORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2295 |
_COORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2296 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2297 |
rmv2(c_x, c_y); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2298 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2299 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2300 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2301 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2302 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2303 |
"Modified: 22.3.1996 / 18:16:42 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2304 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2305 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2306 |
glxRmv2iX: x y: y in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2307 |
"change the graphics position to a 2D point, |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2308 |
the relative distance is passed in x/y. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2309 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2310 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2311 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2312 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2313 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2314 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2315 |
Icoord c_x, c_y; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2316 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2317 |
_ICOORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2318 |
_ICOORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2319 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2320 |
rmv2i(c_x, c_y); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2321 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2322 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2323 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2324 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2325 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2326 |
"Modified: 22.3.1996 / 18:16:39 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2327 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2328 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2329 |
glxRmv2sX: x y: y in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2330 |
"change the graphics position to a 2D point, |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2331 |
the relative distance is passed in x/y. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2332 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2333 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2334 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2335 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2336 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2337 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2338 |
Scoord c_x, c_y; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2339 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2340 |
_SCOORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2341 |
_SCOORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2342 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2343 |
rmv2s(c_x, c_y); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2344 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2345 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2346 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2347 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2348 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2349 |
"Modified: 22.3.1996 / 18:16:33 / cg" |
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 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2352 |
glxRmv:v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2353 |
"change the graphics position to a 3D point, |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2354 |
the relative distance is passed in vector v" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2355 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2356 |
%{ /* NOCONTEXT */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2357 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2358 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2359 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2360 |
float vec[3], *c_v; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2361 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2362 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 3))) RETURN(false); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2363 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2364 |
rmv((Coord)(c_v[0]), (Coord)(c_v[1]), (Coord)(c_v[2])); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2365 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2366 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2367 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2368 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2369 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2370 |
"Modified: 22.3.1996 / 18:16:08 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2371 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2372 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2373 |
glxRmvX: x y: y z: z in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2374 |
"change the graphics position to a 3D point, |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2375 |
the relative distance is passed in x/y/z" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2376 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2377 |
%{ /* NOCONTEXT */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2378 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2379 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2380 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2381 |
Coord c_x, c_y, c_z; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2382 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2383 |
_COORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2384 |
_COORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2385 |
_COORD_ (z, c_z) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2386 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2387 |
rmv(c_x, c_y, c_z); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2388 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2389 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2390 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2391 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2392 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2393 |
"Modified: 22.3.1996 / 18:16:16 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2394 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2395 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2396 |
glxRmviX: x y: y z: z in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2397 |
"change the graphics position to a 3D point, |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2398 |
the relative distance is passed in x/y/z. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2399 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2400 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2401 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2402 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2403 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2404 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2405 |
Icoord c_x, c_y, c_z; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2406 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2407 |
_ICOORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2408 |
_ICOORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2409 |
_ICOORD_ (z, c_z) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2410 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2411 |
rmvi(c_x, c_y, c_z); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2412 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2413 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2414 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2415 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2416 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2417 |
"Modified: 22.3.1996 / 18:16:21 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2418 |
! |
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 |
glxRmvsX: x y: y z: z in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2421 |
"change the graphics position to a 3D point, |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2422 |
the relative distance is passed in x/y/z. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2423 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2424 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2425 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2426 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2427 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2428 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2429 |
Scoord c_x, c_y, c_z; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2430 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2431 |
_SCOORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2432 |
_SCOORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2433 |
_SCOORD_ (z, c_z) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2434 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2435 |
rmvs(c_x, c_y, c_z); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2436 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2437 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2438 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2439 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2440 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2441 |
"Modified: 22.3.1996 / 18:16:25 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2442 |
! ! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2443 |
|
168 | 2444 |
!GLXWorkstation methodsFor:'initialization'! |
2445 |
||
2446 |
initializeFor:aDisplayName |
|
169 | 2447 |
(super initializeFor:aDisplayName) isNil ifTrue:[^ nil]. |
168 | 2448 |
%{ |
2449 |
if (_INST(displayId) != nil) { |
|
185 | 2450 |
XSetErrorHandler(__XErrorHandler__); |
2451 |
} |
|
2452 |
%} |
|
2453 |
! |
|
2454 |
||
2455 |
initializeScreenProperties |
|
2456 |
super initializeScreenProperties. |
|
2457 |
||
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
2458 |
"/ 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
|
2459 |
"/ 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
|
2460 |
"/ 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
|
2461 |
"/ 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
|
2462 |
"/ 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
|
2463 |
"/ 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
|
2464 |
"/ 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
|
2465 |
"/ have no documentation). |
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
2466 |
"/ 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
|
2467 |
"/ 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
|
2468 |
"/ 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
|
2469 |
|
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
2470 |
(self isTrueGL and:[ForceGL ~~ true]) ifTrue:[ |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
2471 |
glOK := (displayName = ':0') or:[displayName = ':0.0']. |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
2472 |
] ifFalse:[ |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
2473 |
glOK := true. |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
2474 |
]. |
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
2475 |
|
185 | 2476 |
%{ |
2477 |
Display *dpy = myDpy; |
|
2478 |
int dummy; |
|
2479 |
||
2480 |
if (ISCONNECTED) { |
|
290
f9397ade6677
fix for sgi - need displayName to be set for initScreenProps
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
2481 |
_INST(hasStereoExtension) = false; |
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
2482 |
|
290
f9397ade6677
fix for sgi - need displayName to be set for initScreenProps
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
2483 |
#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
|
2484 |
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
|
2485 |
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
|
2486 |
_INST(hasStereoExtension) = true; |
290
f9397ade6677
fix for sgi - need displayName to be set for initScreenProps
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
2487 |
} |
f9397ade6677
fix for sgi - need displayName to be set for initScreenProps
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
2488 |
#endif |
168 | 2489 |
} |
2490 |
%} |
|
2491 |
! ! |
|
2492 |
||
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2493 |
!GLXWorkstation methodsFor:'lines'! |
528 | 2494 |
|
2495 |
glxDeflinestyleN: n ls: ls in: aGLXWindowId |
|
2496 |
"define a line style" |
|
2497 |
||
2498 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2499 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2500 |
#else |
528 | 2501 |
SETWIN(aGLXWindowId) |
2502 |
deflinestyle(_shortVal(n), _linestyleVal(ls)); |
|
2503 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2504 |
#endif |
528 | 2505 |
%} |
2506 |
! |
|
2507 |
||
2508 |
glxDraw2:v in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2509 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2510 |
to a new 2D position, passed in vector v." |
528 | 2511 |
|
2512 |
%{ /* NOCONTEXT */ |
|
2513 |
float vec[2], *c_v; |
|
2514 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2515 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 2))) RETURN(false); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2516 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2517 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2518 |
#else |
528 | 2519 |
draw2((Coord)(c_v[0]), (Coord)(c_v[1])); |
2520 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2521 |
#endif |
528 | 2522 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2523 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2524 |
"Modified: 22.3.1996 / 18:03:29 / cg" |
528 | 2525 |
! |
2526 |
||
2527 |
glxDraw2X: x y: y in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2528 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2529 |
to a new 2D position, passed in x/y." |
528 | 2530 |
|
2531 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2532 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2533 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2534 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2535 |
Coord c_x, c_y; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2536 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2537 |
_COORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2538 |
_COORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2539 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2540 |
draw2(c_x, c_y); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2541 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2542 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2543 |
#endif |
528 | 2544 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2545 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2546 |
"Modified: 22.3.1996 / 18:03:50 / cg" |
528 | 2547 |
! |
2548 |
||
2549 |
glxDraw2iX: x y: y in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2550 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2551 |
to a new 2D position, passed in x/y." |
528 | 2552 |
|
2553 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2554 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2555 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2556 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2557 |
Icoord c_x, c_y; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2558 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2559 |
_ICOORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2560 |
_ICOORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2561 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2562 |
draw2i(c_x, c_y); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2563 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2564 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2565 |
#endif |
528 | 2566 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2567 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2568 |
"Modified: 22.3.1996 / 18:04:07 / cg" |
528 | 2569 |
! |
2570 |
||
2571 |
glxDraw2sX: x y: y in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2572 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2573 |
to a new 2D position, passed in x/y." |
528 | 2574 |
|
2575 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2576 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2577 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2578 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2579 |
Scoord c_x, c_y; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2580 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2581 |
_SCOORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2582 |
_SCOORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2583 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2584 |
draw2s(c_x, c_y); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2585 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2586 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2587 |
#endif |
528 | 2588 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2589 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2590 |
"Modified: 22.3.1996 / 18:04:19 / cg" |
528 | 2591 |
! |
2592 |
||
2593 |
glxDraw:v in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2594 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2595 |
to a new 3D position, passed in vector v." |
528 | 2596 |
|
2597 |
%{ /* NOCONTEXT */ |
|
2598 |
float vec[3], *c_v; |
|
2599 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2600 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 3))) RETURN(false); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2601 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2602 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2603 |
#else |
528 | 2604 |
draw((Coord)(c_v[0]), (Coord)(c_v[1]), (Coord)(c_v[2])); |
2605 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2606 |
#endif |
528 | 2607 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2608 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2609 |
"Modified: 22.3.1996 / 18:04:34 / cg" |
528 | 2610 |
! |
2611 |
||
2612 |
glxDrawX: x y: y z: z in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2613 |
"draw a line from the current graphics position |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2614 |
to a new 3D position, passed in x/y/z. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2615 |
The arguments may be floats, fractions or smallIntegers" |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2616 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2617 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2618 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2619 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2620 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2621 |
Coord c_x, c_y, c_z; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2622 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2623 |
_COORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2624 |
_COORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2625 |
_COORD_ (z, c_z) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2626 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2627 |
draw(c_x, c_y, c_z); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2628 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2629 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2630 |
#endif |
528 | 2631 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2632 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2633 |
"Modified: 22.3.1996 / 18:04:46 / cg" |
528 | 2634 |
! |
2635 |
||
2636 |
glxDrawiX: x y: y z: z in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2637 |
"draw a line from the current graphics position |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2638 |
to a new 3D position, passed in x/y/z. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2639 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2640 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2641 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2642 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2643 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2644 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2645 |
Icoord c_x, c_y, c_z; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2646 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2647 |
_ICOORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2648 |
_ICOORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2649 |
_ICOORD_ (z, c_z) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2650 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2651 |
drawi(c_x, c_y, c_z); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2652 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2653 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2654 |
#endif |
528 | 2655 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2656 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2657 |
"Modified: 22.3.1996 / 18:04:54 / cg" |
528 | 2658 |
! |
2659 |
||
2660 |
glxDrawsX: x y: y z: z in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2661 |
"draw a line from the current graphics position |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2662 |
to a new 3D position, passed in x/y/z. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2663 |
The arguments must be (16bit) smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2664 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2665 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2666 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2667 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2668 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2669 |
Scoord c_x, c_y, c_z; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2670 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2671 |
_SCOORD_ (x, c_x) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2672 |
_SCOORD_ (y, c_y) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2673 |
_SCOORD_ (z, c_z) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2674 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2675 |
draws(c_x, c_y, c_z); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2676 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2677 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2678 |
#endif |
528 | 2679 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2680 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2681 |
"Modified: 22.3.1996 / 18:05:01 / cg" |
528 | 2682 |
! |
2683 |
||
2684 |
glxLinewidth: n in: aGLXWindowId |
|
2685 |
"set the linewidth" |
|
2686 |
||
2687 |
%{ /* NOCONTEXT */ |
|
2688 |
SETWIN(aGLXWindowId) |
|
2689 |
linewidth(_shortVal(n)); |
|
2690 |
RETURN (true); |
|
2691 |
%} |
|
2692 |
! |
|
2693 |
||
2694 |
glxLinewidthf: n in: aGLXWindowId |
|
2695 |
"set the linewidth" |
|
2696 |
||
2697 |
%{ /* NOCONTEXT */ |
|
2698 |
SETWIN(aGLXWindowId) |
|
2699 |
linewidthf(_floatVal(n)); |
|
2700 |
RETURN (true); |
|
2701 |
%} |
|
2702 |
! |
|
2703 |
||
2704 |
glxRdr2:v in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2705 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2706 |
to a new 2D position, passing the relative distance in the vector v." |
528 | 2707 |
|
2708 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2709 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2710 |
#else |
528 | 2711 |
float vec[2], *c_v; |
2712 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2713 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 2))) RETURN(false); |
528 | 2714 |
SETWIN(aGLXWindowId) |
2715 |
rdr2((Coord)(c_v[0]), (Coord)(c_v[1])); |
|
2716 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2717 |
#endif |
528 | 2718 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2719 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2720 |
"Modified: 22.3.1996 / 18:05:54 / cg" |
528 | 2721 |
! |
2722 |
||
2723 |
glxRdr2X: x y: y in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2724 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2725 |
to a new 2D position, passing the relative distance in x/y." |
528 | 2726 |
|
2727 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2728 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2729 |
#else |
528 | 2730 |
Coord c_x, c_y; |
2731 |
||
2732 |
_COORD_ (x, c_x) |
|
2733 |
_COORD_ (y, c_y) |
|
2734 |
SETWIN(aGLXWindowId) |
|
2735 |
rdr2(c_x, c_y); |
|
2736 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2737 |
#endif |
528 | 2738 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2739 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2740 |
"Modified: 22.3.1996 / 18:06:20 / cg" |
528 | 2741 |
! |
2742 |
||
2743 |
glxRdr2iX: x y: y in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2744 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2745 |
to a new 2D position, passing the relative distance in x/y." |
528 | 2746 |
|
2747 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2748 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2749 |
#else |
528 | 2750 |
Icoord c_x, c_y; |
2751 |
||
2752 |
_ICOORD_ (x, c_x) |
|
2753 |
_ICOORD_ (y, c_y) |
|
2754 |
SETWIN(aGLXWindowId) |
|
2755 |
rdr2i(c_x, c_y); |
|
2756 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2757 |
#endif |
528 | 2758 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2759 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2760 |
"Modified: 22.3.1996 / 18:06:28 / cg" |
528 | 2761 |
! |
2762 |
||
2763 |
glxRdr2sX: x y: y in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2764 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2765 |
to a new 2D position, passing the relative distance in x/y." |
528 | 2766 |
|
2767 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2768 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2769 |
#else |
528 | 2770 |
Scoord c_x, c_y; |
2771 |
||
2772 |
_SCOORD_ (x, c_x) |
|
2773 |
_SCOORD_ (y, c_y) |
|
2774 |
SETWIN(aGLXWindowId) |
|
2775 |
rdr2s(c_x, c_y); |
|
2776 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2777 |
#endif |
528 | 2778 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2779 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2780 |
"Modified: 22.3.1996 / 18:06:34 / cg" |
528 | 2781 |
! |
2782 |
||
2783 |
glxRdr:v in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2784 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2785 |
to a new 3D position, passing the relative distance in the vector v." |
528 | 2786 |
|
2787 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2788 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2789 |
#else |
528 | 2790 |
float vec[3], *c_v; |
2791 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2792 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 3))) RETURN(false); |
528 | 2793 |
SETWIN(aGLXWindowId) |
2794 |
rdr((Coord)(c_v[0]), (Coord)(c_v[1]), (Coord)(c_v[2])); |
|
2795 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2796 |
#endif |
528 | 2797 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2798 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2799 |
"Modified: 22.3.1996 / 18:06:07 / cg" |
528 | 2800 |
! |
2801 |
||
2802 |
glxRdrX: x y: y z: z in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2803 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2804 |
to a new 3D position, passing the relative distance in x/y/z." |
528 | 2805 |
|
2806 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2807 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2808 |
#else |
528 | 2809 |
Coord c_x, c_y, c_z; |
2810 |
||
2811 |
_COORD_ (x, c_x) |
|
2812 |
_COORD_ (y, c_y) |
|
2813 |
_COORD_ (z, c_z) |
|
2814 |
SETWIN(aGLXWindowId) |
|
2815 |
rdr(c_x, c_y, c_z); |
|
2816 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2817 |
#endif |
528 | 2818 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2819 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2820 |
"Modified: 22.3.1996 / 18:06:44 / cg" |
528 | 2821 |
! |
2822 |
||
2823 |
glxRdriX: x y: y z: z in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2824 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2825 |
to a new 3D position, passing the relative distance in x/y/z." |
528 | 2826 |
|
2827 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2828 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2829 |
#else |
528 | 2830 |
Icoord c_x, c_y, c_z; |
2831 |
||
2832 |
_ICOORD_ (x, c_x) |
|
2833 |
_ICOORD_ (y, c_y) |
|
2834 |
_ICOORD_ (z, c_z) |
|
2835 |
SETWIN(aGLXWindowId) |
|
2836 |
rdri(c_x, c_y, c_z); |
|
2837 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2838 |
#endif |
528 | 2839 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2840 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2841 |
"Modified: 22.3.1996 / 18:06:51 / cg" |
528 | 2842 |
! |
2843 |
||
2844 |
glxRdrsX: x y: y z: z in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2845 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2846 |
to a new 3D position, passing the relative distance in x/y/z." |
528 | 2847 |
|
2848 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2849 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2850 |
#else |
528 | 2851 |
Scoord c_x, c_y, c_z; |
2852 |
||
2853 |
_SCOORD_ (x, c_x) |
|
2854 |
_SCOORD_ (y, c_y) |
|
2855 |
_SCOORD_ (z, c_z) |
|
2856 |
SETWIN(aGLXWindowId) |
|
2857 |
rdrs(c_x, c_y, c_z); |
|
2858 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2859 |
#endif |
528 | 2860 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2861 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2862 |
"Modified: 22.3.1996 / 18:06:55 / cg" |
528 | 2863 |
! |
2864 |
||
2865 |
glxSetlinestyle: index in: aGLXWindowId |
|
2866 |
"set the linestyle" |
|
2867 |
||
2868 |
%{ /* NOCONTEXT */ |
|
2869 |
SETWIN(aGLXWindowId) |
|
2870 |
setlinestyle(_shortVal(index)); |
|
2871 |
RETURN (true); |
|
2872 |
%} |
|
2873 |
. |
|
2874 |
^ false |
|
2875 |
! ! |
|
2876 |
||
294 | 2877 |
!GLXWorkstation methodsFor:'materials & lights'! |
2878 |
||
2879 |
glxLmbind:target index:index in:aGLXWindowId |
|
2880 |
"select a material, light or lighting model. |
|
2881 |
target must be a symbol from: #material, #backMaterial, |
|
2882 |
#light0-light7 or #lightModel." |
|
2883 |
||
2884 |
%{ /* NOCONTEXT */ |
|
2885 |
#ifdef GLX |
|
2886 |
short defType; |
|
2887 |
short i_index; |
|
2888 |
||
2889 |
if (target == @symbol(material)) |
|
2890 |
defType = MATERIAL; |
|
2891 |
else if (target == @symbol(backMaterial)) |
|
2892 |
defType = BACKMATERIAL; |
|
2893 |
else if (target == @symbol(light0)) |
|
2894 |
defType = LIGHT0; |
|
2895 |
else if (target == @symbol(light1)) |
|
2896 |
defType = LIGHT1; |
|
2897 |
else if (target == @symbol(light2)) |
|
2898 |
defType = LIGHT2; |
|
2899 |
else if (target == @symbol(light3)) |
|
2900 |
defType = LIGHT3; |
|
2901 |
else if (target == @symbol(light4)) |
|
2902 |
defType = LIGHT4; |
|
2903 |
else if (target == @symbol(light5)) |
|
2904 |
defType = LIGHT5; |
|
2905 |
else if (target == @symbol(light6)) |
|
2906 |
defType = LIGHT6; |
|
2907 |
else if (target == @symbol(light7)) |
|
2908 |
defType = LIGHT7; |
|
2909 |
else if (target == @symbol(lightModel)) |
|
2910 |
defType = LMODEL; |
|
2911 |
else { |
|
2912 |
RETURN (false); |
|
2913 |
} |
|
2914 |
||
2915 |
_INT_ (index, i_index); |
|
2916 |
SETWIN(aGLXWindowId) |
|
2917 |
lmbind(defType, i_index); |
|
2918 |
RETURN (true); |
|
2919 |
#endif |
|
2920 |
%} |
|
2921 |
. |
|
2922 |
^ false |
|
2923 |
! |
|
2924 |
||
2925 |
glxLmdef:what index:index np:np props:props in:aGLXWindowId |
|
2926 |
"define a material, light source or lighting model; |
|
2927 |
what must be one of #material, #light or #lightModel. |
|
2928 |
props must be a FloatArray or a subclass of FloatArray" |
|
2929 |
||
2930 |
%{ /* NOCONTEXT */ |
|
2931 |
#ifdef GLX |
|
2932 |
short defType; |
|
2933 |
short i_index, i_np; |
|
2934 |
float *fp; |
|
2935 |
OBJ cls; |
|
2936 |
int ninstVars, nInstBytes; |
|
2937 |
||
2938 |
if (what == @symbol(material)) |
|
2939 |
defType = DEFMATERIAL; |
|
2940 |
else if (what == @symbol(light)) |
|
2941 |
defType = DEFLIGHT; |
|
2942 |
else if (what == @symbol(lightModel)) |
|
2943 |
defType = DEFLMODEL; |
|
2944 |
else { |
|
2945 |
RETURN (false); |
|
2946 |
} |
|
2947 |
||
2948 |
_INT_ (index, i_index); |
|
2949 |
_INT_ (np, i_np); |
|
2950 |
||
2951 |
if (! _isNonNilObject(props)) fp = NULL; |
|
2952 |
else { |
|
2953 |
cls = __qClass(props); |
|
350 | 2954 |
if (cls == @global(FloatArray)) |
294 | 2955 |
fp = _FloatArrayInstPtr(props)->f_element; |
2956 |
else { |
|
2957 |
if ((__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) == FLOATARRAY) { |
|
2958 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
|
2959 |
fp = (float *) &(_InstPtr(props)->i_instvars[ninstVars]); |
|
2960 |
} else { |
|
2961 |
RETURN (false); |
|
2962 |
} |
|
2963 |
} |
|
2964 |
} |
|
2965 |
SETWIN(aGLXWindowId) |
|
2966 |
lmdef(defType, i_index, i_np, fp); |
|
2967 |
RETURN (true); |
|
2968 |
#endif |
|
2969 |
%} |
|
2970 |
. |
|
2971 |
^ false |
|
2972 |
! |
|
2973 |
||
2974 |
glxTevbind:target index:index in:aGLXWindowId |
|
2975 |
"bind a texture environment; target must be 0 |
|
2976 |
or the symbol #env0." |
|
2977 |
||
2978 |
%{ /* NOCONTEXT */ |
|
2979 |
#ifdef GLX |
|
2980 |
long t; |
|
2981 |
||
2982 |
if (__isSmallInteger(target)) { |
|
2983 |
t = __intVal(target); |
|
2984 |
} else { |
|
2985 |
if (target == @symbol(env0)) { |
|
2986 |
t = TV_ENV0; |
|
2987 |
} else { |
|
2988 |
RETURN (false); |
|
2989 |
} |
|
2990 |
} |
|
2991 |
SETWIN(aGLXWindowId) |
|
2992 |
tevbind(t, __intVal(index)); |
|
2993 |
RETURN (true); |
|
2994 |
#endif |
|
2995 |
%} |
|
2996 |
. |
|
2997 |
^ false |
|
2998 |
! |
|
2999 |
||
3000 |
glxTevdef:index np:np props:props in:aGLXWindowId |
|
3001 |
||
3002 |
%{ /* NOCONTEXT */ |
|
3003 |
#ifdef GLX |
|
3004 |
const float *fp; |
|
3005 |
float fbuff[30]; |
|
3006 |
||
3007 |
SETWIN(aGLXWindowId) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3008 |
fp = __glx_getFloatsFromFloatArrayInto(props, fbuff); |
294 | 3009 |
tevdef(__intVal(index), __intVal(np), fp); |
3010 |
RETURN (true); |
|
3011 |
#endif |
|
3012 |
%} |
|
3013 |
. |
|
3014 |
^ false |
|
3015 |
! |
|
3016 |
||
3017 |
glxTexDef2d:index nc:nc width:w height:h bits:image np:np props:props in:aGLXWindowId |
|
3018 |
"define a 2D texture. index is the 'name' of the texture; |
|
3019 |
nc is the number of components (1-4) per pixel; |
|
3020 |
w/h define the size of the texture; bits is a byteArray containing the |
|
3021 |
long-word aligned pixel data; np is the number of props found in |
|
3022 |
the floatArray props. Props must be delimited by a 0.0 entry." |
|
3023 |
||
3024 |
%{ /* NOCONTEXT */ |
|
3025 |
#ifdef GLX |
|
3026 |
unsigned char *cp; |
|
3027 |
const float *fp; |
|
3028 |
OBJ cls; |
|
3029 |
float fbuff[30]; |
|
3030 |
||
3031 |
if (__isByteArray(image)) { |
|
3032 |
cp = _ByteArrayInstPtr(image)->ba_element; |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3033 |
fp = __glx_getFloatsFromFloatArrayInto(props, fbuff); |
294 | 3034 |
|
3035 |
SETWIN(aGLXWindowId) |
|
3036 |
texdef2d(__intVal(index), __intVal(nc), __intVal(w), __intVal(h), |
|
3037 |
(const unsigned long *)cp, __intVal(np), fp); |
|
3038 |
RETURN (true); |
|
3039 |
} |
|
3040 |
#endif |
|
3041 |
%} |
|
3042 |
. |
|
3043 |
^ false |
|
3044 |
! |
|
3045 |
||
3046 |
glxTexDef3d:index nc:nc width:w height:h depth:d bits:image np:np props:props in:aGLXWindowId |
|
3047 |
"define a 3D texture. index is the 'name' of the texture; |
|
3048 |
nc is the number of components (1-4) per pixel; |
|
3049 |
w/h/d define the size of the texture; bits is a byteArray containing the |
|
3050 |
long-word aligned pixel data; np is the number of props found in |
|
3051 |
the floatArray props. Props must be delimited by a 0.0 entry." |
|
3052 |
||
3053 |
%{ /* NOCONTEXT */ |
|
3054 |
#ifdef GLX |
|
3055 |
unsigned char *cp; |
|
3056 |
const float *fp; |
|
3057 |
OBJ cls; |
|
3058 |
float fbuff[30]; |
|
3059 |
||
3060 |
if (__isByteArray(image)) { |
|
3061 |
cp = _ByteArrayInstPtr(image)->ba_element; |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3062 |
fp = __glx_getFloatsFromFloatArrayInto(props, fbuff); |
294 | 3063 |
|
3064 |
SETWIN(aGLXWindowId) |
|
3065 |
texdef3d(__intVal(index), __intVal(nc), __intVal(w), __intVal(h), |
|
3066 |
__intVal(d), |
|
3067 |
(const unsigned long *)cp, __intVal(np), fp); |
|
3068 |
RETURN (true); |
|
3069 |
} |
|
3070 |
#endif |
|
3071 |
%} |
|
3072 |
. |
|
3073 |
^ false |
|
3074 |
! |
|
3075 |
||
3076 |
glxTexbind:target index:index in:aGLXWindowId |
|
3077 |
"bind a texture; target must be an integer or one |
|
3078 |
of the symbols #texture0, #textureDetail or #textureIdle." |
|
3079 |
||
3080 |
%{ /* NOCONTEXT */ |
|
3081 |
#ifdef GLX |
|
3082 |
long t; |
|
3083 |
||
3084 |
if (__isSmallInteger(target)) { |
|
3085 |
t = __intVal(target); |
|
3086 |
} else { |
|
3087 |
if (target == @symbol(texture0)) { |
|
3088 |
t = TX_TEXTURE_0; |
|
3089 |
} else if (target == @symbol(textureDetail)) { |
|
3090 |
t = TX_TEXTURE_DETAIL; |
|
3091 |
} else if (target == @symbol(textureIdle)) { |
|
3092 |
t = TX_TEXTURE_IDLE; |
|
3093 |
} else { |
|
3094 |
RETURN (false); |
|
3095 |
} |
|
3096 |
} |
|
3097 |
SETWIN(aGLXWindowId) |
|
3098 |
texbind(t, __intVal(index)); |
|
3099 |
RETURN (true); |
|
3100 |
#endif |
|
3101 |
%} |
|
3102 |
. |
|
3103 |
^ false |
|
3104 |
! ! |
|
3105 |
||
3106 |
!GLXWorkstation methodsFor:'matrix stack'! |
|
3107 |
||
3108 |
glxGetMatrix:arrayOf16Floats in:aGLXWindowId |
|
3109 |
"argument must be an array (a matrix) of 16 floats. The current matrix |
|
3110 |
will be stored into that." |
|
3111 |
||
3112 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3113 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3114 |
#else |
294 | 3115 |
Matrix matrix; |
3116 |
||
3117 |
SETWIN(aGLXWindowId) |
|
3118 |
getmatrix(matrix); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3119 |
if (! __glx_putFloatsFromInto(matrix, arrayOf16Floats, 16)) RETURN(false); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3120 |
RETURN (true); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3121 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3122 |
%}. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3123 |
^ false |
294 | 3124 |
! |
3125 |
||
3126 |
glxLoadMatrix:arrayOf16Floats in:aGLXWindowId |
|
3127 |
"argument must be an array(a matrix) of 16 floats. The current matrix |
|
3128 |
will be loaded from that." |
|
3129 |
||
3130 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3131 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3132 |
#else |
294 | 3133 |
Matrix matrix; |
3134 |
Matrix *m; |
|
3135 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3136 |
if (! (m = __glx_getFloatsFromMatrixInto(arrayOf16Floats, &matrix))) RETURN (false); |
294 | 3137 |
SETWIN(aGLXWindowId) |
3138 |
loadmatrix(*m); |
|
3139 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3140 |
#endif |
294 | 3141 |
%} |
3142 |
! |
|
3143 |
||
3144 |
glxMultMatrix:arrayOf16Floats in:aGLXWindowId |
|
3145 |
"argument must be an array(a matrix) of 16 floats containing a |
|
3146 |
matrix to multiply into the current matrix." |
|
3147 |
||
3148 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3149 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3150 |
#else |
294 | 3151 |
Matrix matrix; |
3152 |
Matrix *m; |
|
3153 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3154 |
if (! (m = __glx_getFloatsFromMatrixInto(arrayOf16Floats, &matrix))) RETURN (false); |
294 | 3155 |
SETWIN(aGLXWindowId) |
3156 |
multmatrix(*m); |
|
3157 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3158 |
#endif |
294 | 3159 |
%} |
3160 |
! |
|
3161 |
||
3162 |
glxPopmatrixIn:aGLXWindowId |
|
3163 |
"pop transformation stack" |
|
3164 |
||
3165 |
%{ /* NOCONTEXT */ |
|
3166 |
SETWIN(aGLXWindowId) |
|
3167 |
popmatrix(); |
|
3168 |
%} |
|
3169 |
! |
|
3170 |
||
3171 |
glxPushmatrixIn:aGLXWindowId |
|
3172 |
"push down transformation stack" |
|
3173 |
||
3174 |
%{ /* NOCONTEXT */ |
|
3175 |
SETWIN(aGLXWindowId) |
|
3176 |
pushmatrix(); |
|
3177 |
%} |
|
3178 |
! ! |
|
3179 |
||
3180 |
!GLXWorkstation methodsFor:'misc'! |
|
3181 |
||
3182 |
glxGconfigIn:aGLXWindowId |
|
3183 |
"must be sent after RGBmode, doubleBuffer etc. to have these |
|
3184 |
changes really take effect. See GLX manual. |
|
3185 |
(Actually, it seems to be not allowed - I dont really know)" |
|
3186 |
||
3187 |
%{ /* NOCONTEXT */ |
|
3188 |
SETWIN(aGLXWindowId) |
|
3189 |
gconfig(); |
|
3190 |
RETURN (true); |
|
3191 |
%} |
|
3192 |
! |
|
3193 |
||
3194 |
glxMmode:aSymbol in:aGLXWindowId |
|
3195 |
"set matrix mode: #single, #viewing, #projection or #texture" |
|
3196 |
||
3197 |
%{ /* NOCONTEXT */ |
|
3198 |
#ifdef GLX |
|
3199 |
if (aSymbol == @symbol(single)) { |
|
3200 |
mmode(MSINGLE); |
|
3201 |
RETURN (true); |
|
3202 |
} |
|
3203 |
if (aSymbol == @symbol(viewing)) { |
|
3204 |
mmode(MVIEWING); |
|
3205 |
RETURN (true); |
|
3206 |
} |
|
3207 |
if (aSymbol == @symbol(projection)) { |
|
3208 |
mmode(MPROJECTION); |
|
3209 |
RETURN (true); |
|
3210 |
} |
|
3211 |
if (aSymbol == @symbol(texture)) { |
|
3212 |
mmode(MTEXTURE); |
|
3213 |
RETURN (true); |
|
3214 |
} |
|
3215 |
#endif |
|
3216 |
%} |
|
3217 |
. |
|
3218 |
^ false |
|
3219 |
! |
|
3220 |
||
3221 |
glxNmode:aSymbol in:aGLXWindowId |
|
3222 |
"set normalize mode: #auto, #normalize" |
|
3223 |
||
3224 |
%{ /* NOCONTEXT */ |
|
3225 |
#ifdef GLX |
|
3226 |
if (aSymbol == @symbol(auto)) { |
|
3227 |
nmode(NAUTO); |
|
3228 |
RETURN (true); |
|
3229 |
} |
|
3230 |
if (aSymbol == @symbol(normalize)) { |
|
3231 |
nmode(NNORMALIZE); |
|
3232 |
RETURN (true); |
|
3233 |
} |
|
3234 |
#endif |
|
3235 |
%} |
|
3236 |
. |
|
3237 |
^ false |
|
3238 |
! |
|
3239 |
||
3240 |
glxRGBmodeIn:aGLXWindowId |
|
3241 |
"set true color mode (no colormap)" |
|
3242 |
||
3243 |
%{ /* NOCONTEXT */ |
|
3244 |
#ifdef GLX |
|
3245 |
SETWIN(aGLXWindowId) |
|
3246 |
RGBmode(); |
|
3247 |
RETURN (true); |
|
3248 |
#endif |
|
3249 |
%} |
|
3250 |
. |
|
3251 |
^ false |
|
3252 |
! ! |
|
3253 |
||
3254 |
!GLXWorkstation methodsFor:'objects'! |
|
3255 |
||
3256 |
glxCallObject:obj in:aGLXWindowId |
|
3257 |
"perform the commands of an object (macro)." |
|
3258 |
||
3259 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3260 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3261 |
#else |
294 | 3262 |
if (__isSmallInteger(obj)) { |
3263 |
SETWIN(aGLXWindowId) |
|
3264 |
callobj(_objectVal(obj)); |
|
3265 |
RETURN (true); |
|
3266 |
} |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3267 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3268 |
%}. |
294 | 3269 |
^ false |
3270 |
! |
|
3271 |
||
3272 |
glxCallobj: obj in: aGLXWindowId |
|
3273 |
"OBSOLETE; use glxCallObject:in: |
|
3274 |
This one will be removed soon." |
|
3275 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3276 |
self halt |
294 | 3277 |
! |
3278 |
||
3279 |
glxCloseObjectIn:aGLXWindowId |
|
3280 |
"end object defnition" |
|
3281 |
||
3282 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3283 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3284 |
#else |
294 | 3285 |
SETWIN(aGLXWindowId) |
3286 |
closeobj(); |
|
3287 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3288 |
#endif |
294 | 3289 |
%} |
3290 |
! |
|
3291 |
||
3292 |
glxCloseobjIn:aGLXWindowId |
|
3293 |
"OBSOLETE: use glxCloseObjectIn: |
|
3294 |
This one will be removed." |
|
3295 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3296 |
self halt |
294 | 3297 |
! |
3298 |
||
3299 |
glxDeleteObject:obj in:aGLXWindowId |
|
3300 |
||
3301 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3302 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3303 |
#else |
294 | 3304 |
SETWIN(aGLXWindowId) |
3305 |
delobj(_objectVal(obj)); |
|
3306 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3307 |
#endif |
294 | 3308 |
%} |
3309 |
! |
|
3310 |
||
3311 |
glxDelobj:obj in:aGLXWindowId |
|
3312 |
"OBSOLETE: use glxDeleteObject:in: |
|
3313 |
This one will be removed." |
|
3314 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3315 |
self halt |
294 | 3316 |
! |
3317 |
||
3318 |
glxGenObjectIn:aGLXWindowId |
|
3319 |
"return a new (free & unused) object id for use |
|
3320 |
with makeObj" |
|
3321 |
||
3322 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3323 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3324 |
#else |
294 | 3325 |
SETWIN(aGLXWindowId) |
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
3326 |
RETURN (__MKSMALLINT(genobj())); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3327 |
#endif |
294 | 3328 |
%} |
3329 |
! |
|
3330 |
||
3331 |
glxGenobjIn:aGLXWindowId |
|
3332 |
"OBSOLETE: use glxGenObject:in: |
|
3333 |
This one will be removed." |
|
3334 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3335 |
self halt |
294 | 3336 |
! |
3337 |
||
3338 |
glxGetopenobjIn:aGLXWindowId |
|
3339 |
"return the currently open objects id; -1 if none is open" |
|
3340 |
||
3341 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3342 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3343 |
#else |
294 | 3344 |
SETWIN(aGLXWindowId) |
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
3345 |
RETURN (__MKSMALLINT(getopenobj())); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3346 |
#endif |
294 | 3347 |
%} |
3348 |
! |
|
3349 |
||
3350 |
glxIsobj:obj in:aGLXWindowId |
|
3351 |
"return true, if obj is a valid object id" |
|
3352 |
||
3353 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3354 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3355 |
#else |
294 | 3356 |
SETWIN(aGLXWindowId) |
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
3357 |
RETURN (__MKBOOLEAN(isobj(_objectVal(obj)))); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3358 |
#endif |
294 | 3359 |
%} |
3360 |
! |
|
3361 |
||
3362 |
glxMakeObject:id in:aGLXWindowId |
|
3363 |
"start object definition - |
|
3364 |
another name conflict" |
|
3365 |
||
3366 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3367 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3368 |
#else |
294 | 3369 |
if (__isSmallInteger(id)) { |
3370 |
SETWIN(aGLXWindowId) |
|
3371 |
makeobj(_objectVal(id)); |
|
3372 |
RETURN (true); |
|
3373 |
} |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3374 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3375 |
%}. |
294 | 3376 |
^ false |
3377 |
! |
|
3378 |
||
3379 |
glxMakeobj:obj in:aGLXWindowId |
|
3380 |
"OBSOLETE; use glxMakeObject:in: |
|
3381 |
This one will be removed soon." |
|
3382 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3383 |
self halt |
294 | 3384 |
! ! |
3385 |
||
3386 |
!GLXWorkstation methodsFor:'patches & surfaces'! |
|
3387 |
||
3388 |
glxBeginCurveIn:aGLXWindowId |
|
3389 |
"start a NURBS curve def - in real GL only" |
|
3390 |
||
3391 |
%{ /* NOCONTEXT */ |
|
3392 |
#ifdef GLX |
|
3393 |
SETWIN(aGLXWindowId) |
|
3394 |
bgncurve(); |
|
3395 |
RETURN (true); |
|
3396 |
#endif |
|
3397 |
%} |
|
3398 |
. |
|
3399 |
^ false |
|
3400 |
! |
|
3401 |
||
3402 |
glxBeginSurfaceIn:aGLXWindowId |
|
3403 |
"start a NURBS surface def - in real GL only" |
|
3404 |
||
3405 |
%{ /* NOCONTEXT */ |
|
3406 |
#ifdef GLX |
|
3407 |
SETWIN(aGLXWindowId) |
|
3408 |
bgnsurface(); |
|
3409 |
RETURN (true); |
|
3410 |
#endif |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3411 |
%}. |
294 | 3412 |
^ false |
3413 |
! |
|
3414 |
||
3415 |
glxDefBasis:id mat:aMatrix in:aGLXWindowId |
|
528 | 3416 |
"define the basis matrix for a patch or curve" |
294 | 3417 |
|
3418 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3419 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3420 |
#else |
294 | 3421 |
Matrix matrix; |
3422 |
Matrix *m; |
|
3423 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3424 |
if (! (m = __glx_getFloatsFromMatrixInto(aMatrix, &matrix))) RETURN (false); |
294 | 3425 |
if (__isSmallInteger(id)) { |
528 | 3426 |
SETWIN(aGLXWindowId) |
3427 |
defbasis((short)(__intVal(id)), *m); |
|
3428 |
RETURN (true); |
|
294 | 3429 |
} |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3430 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3431 |
%}. |
294 | 3432 |
^ false |
528 | 3433 |
|
3434 |
"Modified: 19.3.1996 / 18:52:56 / cg" |
|
294 | 3435 |
! |
3436 |
||
3437 |
glxEndCurveIn:aGLXWindowId |
|
3438 |
"end a NURBS curve def - in real GL only" |
|
3439 |
||
3440 |
%{ /* NOCONTEXT */ |
|
3441 |
#ifdef GLX |
|
3442 |
SETWIN(aGLXWindowId) |
|
3443 |
endcurve(); |
|
3444 |
RETURN (true); |
|
3445 |
#endif |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3446 |
%}. |
294 | 3447 |
^ false |
3448 |
! |
|
3449 |
||
3450 |
glxEndSurfaceIn:aGLXWindowId |
|
3451 |
"end a NURBS surface def - in real GL only" |
|
3452 |
||
3453 |
%{ /* NOCONTEXT */ |
|
3454 |
#ifdef GLX |
|
3455 |
SETWIN(aGLXWindowId) |
|
3456 |
endsurface(); |
|
3457 |
RETURN (true); |
|
3458 |
#endif |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3459 |
%}. |
294 | 3460 |
^ false |
3461 |
! |
|
3462 |
||
3463 |
glxNurbsSurfaceUKnotCount: uKnotCount uKnot: uKnot |
|
3464 |
vKnotCount: vKnotCount vKnot: vKnot |
|
3465 |
uOffset: uOffset vOffset: vOffset |
|
3466 |
ctlArray: ctlArray |
|
3467 |
uOrder: uOrder vOrder: vOrder |
|
3468 |
type: type in: aGLXWindowId |
|
3469 |
||
3470 |
| ctlPoints i | |
|
3471 |
ctlPoints := DoubleArray new: ctlArray size * (ctlArray first size). |
|
3472 |
i := 1. |
|
3473 |
ctlArray do: [:point | |
|
3474 |
point do: [:coord | |
|
3475 |
ctlPoints at: i put: coord. |
|
3476 |
i := i + 1]]. |
|
3477 |
||
3478 |
%{ /* NOCONTEXT */ |
|
3479 |
#ifdef GLX |
|
3480 |
char *uKnotElements, *vKnotElements, *ctlElements; |
|
3481 |
OBJ cls; |
|
3482 |
int ninstVars, nInstBytes; |
|
3483 |
||
3484 |
SETWIN(aGLXWindowId) |
|
3485 |
cls = __qClass(ctlPoints); |
|
3486 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
|
3487 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
|
3488 |
||
3489 |
ctlElements = (char *)(_InstPtr(ctlPoints)) + nInstBytes; |
|
3490 |
uKnotElements = (char *)(_InstPtr(uKnot)) + nInstBytes; |
|
3491 |
vKnotElements = (char *)(_InstPtr(vKnot)) + nInstBytes; |
|
3492 |
||
3493 |
nurbssurface ( |
|
3494 |
__intVal(uKnotCount), (double *)uKnotElements, |
|
3495 |
__intVal(vKnotCount), (double *)vKnotElements, |
|
3496 |
__intVal(uOffset), __intVal(vOffset), |
|
3497 |
(double *)ctlElements, |
|
3498 |
__intVal(uOrder), __intVal(vOrder), __intVal(type)); |
|
3499 |
RETURN(true); |
|
3500 |
#endif |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3501 |
%}. |
294 | 3502 |
^ false |
3503 |
! |
|
3504 |
||
3505 |
glxPatchBasisU:u v:v in:aGLXWindowId |
|
528 | 3506 |
"set the two basis matrices for a patch" |
294 | 3507 |
|
3508 |
%{ /* NOCONTEXT */ |
|
3509 |
if (__bothSmallInteger(u, v)) { |
|
528 | 3510 |
SETWIN(aGLXWindowId) |
3511 |
patchbasis((long)__intVal(u), (long)__intVal(v)); |
|
3512 |
RETURN (true); |
|
294 | 3513 |
} |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3514 |
%}. |
294 | 3515 |
^ false |
528 | 3516 |
|
3517 |
"Modified: 19.3.1996 / 18:53:18 / cg" |
|
294 | 3518 |
! |
3519 |
||
3520 |
glxPatchCurvesU:u v:v in:aGLXWindowId |
|
528 | 3521 |
"set the number of curves to be drawn in each direction on a patch" |
294 | 3522 |
|
3523 |
%{ /* NOCONTEXT */ |
|
3524 |
if (__bothSmallInteger(u, v)) { |
|
528 | 3525 |
SETWIN(aGLXWindowId) |
3526 |
patchcurves((long)__intVal(u), (long)__intVal(v)); |
|
3527 |
RETURN (true); |
|
294 | 3528 |
} |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3529 |
%}. |
294 | 3530 |
^ false |
528 | 3531 |
|
3532 |
"Modified: 19.3.1996 / 18:53:34 / cg" |
|
294 | 3533 |
! |
3534 |
||
3535 |
glxPatchPrecisionU:u v:v in:aGLXWindowId |
|
3536 |
"set the patch precision" |
|
3537 |
||
3538 |
%{ /* NOCONTEXT */ |
|
3539 |
if (__bothSmallInteger(u, v)) { |
|
3540 |
SETWIN(aGLXWindowId) |
|
3541 |
patchprecision((long)__intVal(u), (long)__intVal(v)); |
|
3542 |
RETURN (true); |
|
3543 |
} |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3544 |
%}. |
294 | 3545 |
^ false |
3546 |
! |
|
3547 |
||
3548 |
glxPatchX:arrayOf16XFloats y:arrayOf16YFloats z:arrayOf16ZFloats in:aGLXWindowId |
|
528 | 3549 |
"Draws a bicubic patch. |
3550 |
arguments must be arrays of 16 floats containing the patch" |
|
294 | 3551 |
|
3552 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3553 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3554 |
#else |
294 | 3555 |
Matrix matrixX, matrixY, matrixZ; |
3556 |
Matrix *mX, *mY, *mZ; |
|
3557 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3558 |
if (! (mX = __glx_getFloatsFromMatrixInto(arrayOf16XFloats, &matrixX))) RETURN (false); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3559 |
if (! (mY = __glx_getFloatsFromMatrixInto(arrayOf16YFloats, &matrixY))) RETURN (false); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3560 |
if (! (mZ = __glx_getFloatsFromMatrixInto(arrayOf16ZFloats, &matrixZ))) RETURN (false); |
294 | 3561 |
SETWIN(aGLXWindowId) |
3562 |
patch(*mX, *mY, *mZ); |
|
3563 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3564 |
#endif |
294 | 3565 |
%} |
528 | 3566 |
|
3567 |
"Modified: 19.3.1996 / 18:54:02 / cg" |
|
3568 |
! |
|
3569 |
||
3570 |
glxRpatchX:arrayOf16XFloats y:arrayOf16YFloats z:arrayOf16ZFloats w:arrayOf16WFloats in:aGLXWindowId |
|
3571 |
"Draws a rational bicubic patch. |
|
3572 |
arguments must be arrays of 16 floats containing the patch" |
|
3573 |
||
3574 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3575 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3576 |
#else |
529 | 3577 |
Matrix matrixX, matrixY, matrixZ, matrixW; |
3578 |
Matrix *mX, *mY, *mZ, *mW; |
|
528 | 3579 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3580 |
if (! (mX = __glx_getFloatsFromMatrixInto(arrayOf16XFloats, &matrixX))) RETURN (false); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3581 |
if (! (mY = __glx_getFloatsFromMatrixInto(arrayOf16YFloats, &matrixY))) RETURN (false); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3582 |
if (! (mZ = __glx_getFloatsFromMatrixInto(arrayOf16ZFloats, &matrixZ))) RETURN (false); |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3583 |
if (! (mW = __glx_getFloatsFromMatrixInto(arrayOf16WFloats, &matrixW))) RETURN (false); |
529 | 3584 |
SETWIN(aGLXWindowId) |
3585 |
rpatch(*mX, *mY, *mZ, *mW); |
|
528 | 3586 |
RETURN (true); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3587 |
#endif |
528 | 3588 |
%} |
3589 |
||
3590 |
"Modified: 19.3.1996 / 18:54:02 / cg" |
|
3591 |
"Created: 19.3.1996 / 18:56:34 / cg" |
|
3592 |
! ! |
|
3593 |
||
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3594 |
!GLXWorkstation methodsFor:'pixel copy'! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3595 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3596 |
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
|
3597 |
"copy a rectangular area in the view. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3598 |
For now, this is only supported with a true GL. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3599 |
readsource specifies which plane/buffer is affected by this operation." |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3600 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3601 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3602 |
#ifdef GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3603 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3604 |
rectcopy(_screencoordVal(x1), _screencoordVal(y1), |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3605 |
_screencoordVal(x2), _screencoordVal(y2), |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3606 |
_screencoordVal(newx), _screencoordVal(newy)); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3607 |
RETURN (true); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3608 |
#endif |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3609 |
%}. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3610 |
^ false |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3611 |
! ! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3612 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3613 |
!GLXWorkstation methodsFor:'pixel reading'! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3614 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3615 |
glxReadpixelsTo:dest in:aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3616 |
"read pixels from the view. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3617 |
Dest must be an array and gets pixel values assigned, |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3618 |
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
|
3619 |
For now, pixel-reading is only supported with a true GL. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3620 |
Caveat: the number of pixels is limited to 256. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3621 |
In double buffer mode, the backBuffer is read." |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3622 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3623 |
|n| |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3624 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3625 |
n := dest size. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3626 |
n > 256 ifTrue:[^ 0]. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3627 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3628 |
%{ /* STACK:1024 */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3629 |
#ifdef GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3630 |
Colorindex buffer[256]; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3631 |
int i, nRead; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3632 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3633 |
if (__isArray(dest)) { |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3634 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3635 |
nRead = readpixels(__intVal(n), buffer); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3636 |
for (i=0; i<nRead;i++) { |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3637 |
__ArrayInstPtr(dest)->a_element[i] = __MKSMALLINT(buffer[i]); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3638 |
} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3639 |
RETURN (__MKSMALLINT(nRead)); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3640 |
} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3641 |
#endif |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3642 |
%}. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3643 |
^ 0 |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3644 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3645 |
"Modified: 22.3.1996 / 18:08:00 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3646 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3647 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3648 |
glxReadsource: src in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3649 |
"specify what is read with folowing readPixels requests. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3650 |
For now, pixel-reading is only supported with a true GL" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3651 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3652 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3653 |
#ifdef GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3654 |
OBJ s = src; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3655 |
int what; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3656 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3657 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3658 |
if (s == @symbol(auto)) { |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3659 |
what = SRC_AUTO; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3660 |
} else if (s == @symbol(front)) { |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3661 |
what = SRC_FRONT; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3662 |
} else if (s == @symbol(back)) { |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3663 |
what = SRC_BACK; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3664 |
} else if (s == @symbol(zBuffer)) { |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3665 |
what = SRC_ZBUFFER; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3666 |
} else if (s == @symbol(frameGrabber)) { |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3667 |
what = SRC_FRAMEGRABBER; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3668 |
} else if (s == @symbol(over)) { |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3669 |
what = SRC_OVER; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3670 |
} else if (s == @symbol(under)) { |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3671 |
what = SRC_UNDER; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3672 |
} else if (s == @symbol(popUp)) { |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3673 |
what = SRC_PUP; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3674 |
} else { |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3675 |
what = _longVal(src); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3676 |
} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3677 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3678 |
readsource(what); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3679 |
RETURN (true); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3680 |
#endif |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3681 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3682 |
. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3683 |
^ false |
538 | 3684 |
! |
3685 |
||
541 | 3686 |
glxRectreadX1:x1 y1:y1 x2:x2 y2:y2 h:viewHeight to:dest in:aGLXWindowId |
538 | 3687 |
"read pixels from a rectanglular area. |
3688 |
Dest must be an array and gets pixel values assigned, |
|
3689 |
reading n*m pixels. |
|
3690 |
For now, pixel-reading is only supported with a true GL. |
|
3691 |
Caveat: the number of pixels is limited to 256. |
|
3692 |
In double buffer mode, the backBuffer is read." |
|
3693 |
||
541 | 3694 |
|n idx sy1 sy2| |
3695 |
||
3696 |
"/ GLX's y coordinates go bottom to top ... |
|
3697 |
||
3698 |
sy1 := viewHeight - y1. |
|
3699 |
sy2 := viewHeight - y2. |
|
538 | 3700 |
|
3701 |
n := (x2 - x1 + 1) * (y2 - y1 + 1). |
|
3702 |
n > 256 ifTrue:[^ 0]. |
|
3703 |
dest size < n ifTrue:[^ 0]. |
|
3704 |
||
3705 |
%{ /* STACK:1024 */ |
|
3706 |
#ifdef GLX |
|
3707 |
Colorindex buffer[256]; |
|
3708 |
int i, nRead; |
|
3709 |
||
3710 |
if (__isArray(dest) |
|
3711 |
&& __isSmallInteger(x1) && __isSmallInteger(x2) |
|
541 | 3712 |
&& __isSmallInteger(sy1) && __isSmallInteger(sy2) |
538 | 3713 |
) { |
3714 |
SETWIN(aGLXWindowId) |
|
541 | 3715 |
nRead = rectread(__intVal(x1), __intVal(sy1), |
3716 |
__intVal(x2), __intVal(sy2), |
|
538 | 3717 |
buffer); |
3718 |
for (i=0; i<nRead;i++) { |
|
3719 |
__ArrayInstPtr(dest)->a_element[i] = __MKSMALLINT(buffer[i]); |
|
3720 |
} |
|
3721 |
RETURN (__MKSMALLINT(nRead)); |
|
3722 |
} |
|
3723 |
#endif |
|
3724 |
%}. |
|
3725 |
"/ |
|
3726 |
"/ ok, this is not a GL - use XWorkstations pixel read method |
|
3727 |
"/ and convert |
|
3728 |
"/ |
|
3729 |
idx := 1. |
|
3730 |
y1 to:y2 do:[:y | |
|
3731 |
x1 to:x2 do:[:x | |
|
542
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3732 |
|pix| |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3733 |
|
543
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3734 |
pix := self vglGetPixelX:x y:y in:aGLXWindowId. |
542
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3735 |
dest at:idx put:pix |
538 | 3736 |
] |
3737 |
]. |
|
3738 |
^ n |
|
3739 |
||
3740 |
"Modified: 22.3.1996 / 18:08:00 / cg" |
|
542
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3741 |
|
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3742 |
! |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3743 |
|
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3744 |
glxXColorToGLColor:pixel |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3745 |
"only for VOGL: given a pixel as read from the view, |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3746 |
return the corresponding GL color" |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3747 |
|
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3748 |
%{ /* NOCONTEXT */ |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3749 |
#ifdef VGL |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3750 |
if (__isSmallInteger(pixel)) { |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3751 |
RETURN (__MKSMALLINT(X11_invColor(__intVal(pixel)))); |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3752 |
} |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3753 |
#endif |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3754 |
%}. |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3755 |
^ pixel |
543
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3756 |
! |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3757 |
|
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3758 |
vglGetPixelX:x y:y in:aGLXWindowId |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3759 |
"special for VGL" |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3760 |
|
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3761 |
%{ |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3762 |
#ifdef VGL |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3763 |
if (__isSmallInteger(x) && __isSmallInteger(y)) { |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3764 |
SETWIN(aGLXWindowId) |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3765 |
RETURN (__MKSMALLINT(X11_getPixel(__intVal(x), __intVal(y)))); |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3766 |
} |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3767 |
#endif |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3768 |
%}. |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3769 |
^ 0 |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3770 |
|
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3771 |
"Modified: 22.3.1996 / 18:08:00 / cg" |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3772 |
! ! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3773 |
|
528 | 3774 |
!GLXWorkstation methodsFor:'points'! |
3775 |
||
3776 |
glxPnt2X: x y: y in: aGLXWindowId |
|
3777 |
"plot a point in x, y, 0." |
|
3778 |
||
3779 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3780 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3781 |
#else |
528 | 3782 |
Coord c_x, c_y; |
3783 |
||
3784 |
_COORD_ (x, c_x) |
|
3785 |
_COORD_ (y, c_y) |
|
3786 |
SETWIN(aGLXWindowId) |
|
3787 |
pnt2(c_x, c_y); |
|
3788 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3789 |
#endif |
528 | 3790 |
%} |
3791 |
||
3792 |
"Modified: 19.3.1996 / 18:35:55 / cg" |
|
3793 |
! |
|
3794 |
||
3795 |
glxPnt2iX: x y: y in: aGLXWindowId |
|
3796 |
"plot a point in x, y, 0." |
|
3797 |
||
3798 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3799 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3800 |
#else |
528 | 3801 |
Icoord c_x, c_y; |
3802 |
||
3803 |
_ICOORD_ (x, c_x) |
|
3804 |
_ICOORD_ (y, c_y) |
|
3805 |
SETWIN(aGLXWindowId) |
|
3806 |
pnt2i(c_x, c_y); |
|
3807 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3808 |
#endif |
528 | 3809 |
%} |
3810 |
||
3811 |
"Modified: 19.3.1996 / 18:35:59 / cg" |
|
3812 |
! |
|
3813 |
||
3814 |
glxPnt2sX: x y: y in: aGLXWindowId |
|
3815 |
"plot a point in x, y, 0." |
|
3816 |
||
3817 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3818 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3819 |
#else |
528 | 3820 |
Scoord c_x, c_y; |
3821 |
||
3822 |
_SCOORD_ (x, c_x) |
|
3823 |
_SCOORD_ (y, c_y) |
|
3824 |
SETWIN(aGLXWindowId) |
|
3825 |
pnt2s(c_x, c_y); |
|
3826 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3827 |
#endif |
528 | 3828 |
%} |
3829 |
||
3830 |
"Modified: 19.3.1996 / 18:36:03 / cg" |
|
3831 |
! |
|
3832 |
||
3833 |
glxPntX: x y: y z: z in: aGLXWindowId |
|
3834 |
"plot a point in x, y, z." |
|
3835 |
||
3836 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3837 |
#ifdef OPENGL |
528 | 3838 |
Coord c_x, c_y, c_z; |
3839 |
||
3840 |
_COORD_ (x, c_x) |
|
3841 |
_COORD_ (y, c_y) |
|
3842 |
_COORD_ (z, c_z) |
|
3843 |
SETWIN(aGLXWindowId) |
|
3844 |
pnt(c_x, c_y, c_z); |
|
3845 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3846 |
#endif |
528 | 3847 |
%} |
3848 |
||
3849 |
"Modified: 19.3.1996 / 18:36:08 / cg" |
|
3850 |
! |
|
3851 |
||
3852 |
glxPntiX: x y: y z: z in: aGLXWindowId |
|
3853 |
"plot a point in x, y, z." |
|
3854 |
||
3855 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3856 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3857 |
#else |
528 | 3858 |
Icoord c_x, c_y, c_z; |
3859 |
||
3860 |
_ICOORD_ (x, c_x) |
|
3861 |
_ICOORD_ (y, c_y) |
|
3862 |
_ICOORD_ (z, c_z) |
|
3863 |
SETWIN(aGLXWindowId) |
|
3864 |
pnti(c_x, c_y, c_z); |
|
3865 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3866 |
#endif |
528 | 3867 |
%} |
3868 |
||
3869 |
"Modified: 19.3.1996 / 18:36:14 / cg" |
|
3870 |
! |
|
3871 |
||
3872 |
glxPntsX: x y: y z: z in: aGLXWindowId |
|
3873 |
"plot a point in x, y, z." |
|
3874 |
||
3875 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3876 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3877 |
#else |
528 | 3878 |
Scoord c_x, c_y, c_z; |
3879 |
||
3880 |
_SCOORD_ (x, c_x) |
|
3881 |
_SCOORD_ (y, c_y) |
|
3882 |
_SCOORD_ (z, c_z) |
|
3883 |
SETWIN(aGLXWindowId) |
|
3884 |
pnts(c_x, c_y, c_z); |
|
3885 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3886 |
#endif |
528 | 3887 |
%} |
3888 |
||
3889 |
"Modified: 19.3.1996 / 18:36:17 / cg" |
|
3890 |
! |
|
3891 |
||
3892 |
glxPntsize: n in: aGLXWindowId |
|
3893 |
||
3894 |
%{ /* NOCONTEXT */ |
|
3895 |
#ifdef GLX |
|
3896 |
SETWIN(aGLXWindowId) |
|
3897 |
pntsize(_shortVal(n)); |
|
3898 |
RETURN (true); |
|
3899 |
#endif |
|
3900 |
%} |
|
3901 |
. |
|
3902 |
^ false |
|
3903 |
! |
|
3904 |
||
3905 |
glxPntsizef: n in: aGLXWindowId |
|
3906 |
||
3907 |
%{ /* NOCONTEXT */ |
|
3908 |
#ifdef GLX |
|
3909 |
SETWIN(aGLXWindowId) |
|
3910 |
pntsizef(_floatVal(n)); |
|
3911 |
RETURN (true); |
|
3912 |
#endif |
|
3913 |
%} |
|
3914 |
. |
|
3915 |
^ false |
|
3916 |
! ! |
|
3917 |
||
3918 |
!GLXWorkstation methodsFor:'polygons'! |
|
3919 |
||
3920 |
glxBackface: b in: aGLXWindowId |
|
3921 |
"enable/disable culling of backfacing polygons (suppress its drawing). |
|
3922 |
A polygon is backfacing if it's orientation in *screen* coords is clockwise" |
|
3923 |
||
3924 |
%{ /* NOCONTEXT */ |
|
3925 |
SETWIN(aGLXWindowId) |
|
3926 |
backface(_booleanVal(b)); |
|
3927 |
RETURN (true); |
|
3928 |
%} |
|
3929 |
||
3930 |
"Modified: 19.3.1996 / 18:26:50 / cg" |
|
3931 |
! |
|
3932 |
||
3933 |
glxConcave: b in: aGLXWindowId |
|
3934 |
"signal wether or not polygons are concave" |
|
3935 |
||
3936 |
%{ /* NOCONTEXT */ |
|
3937 |
SETWIN(aGLXWindowId) |
|
3938 |
concave(_booleanVal(b)); |
|
3939 |
RETURN (true); |
|
3940 |
%} |
|
3941 |
! |
|
3942 |
||
3943 |
glxFrontface: b in: aGLXWindowId |
|
3944 |
"enable/disable culling of frontfacing polygons (suppress its drawing). |
|
3945 |
A polygon is frontfacing if it's orientation in *screen* coords is |
|
3946 |
anti-clockwise" |
|
3947 |
||
3948 |
||
3949 |
%{ /* NOCONTEXT */ |
|
3950 |
SETWIN(aGLXWindowId) |
|
3951 |
frontface(_booleanVal(b)); |
|
3952 |
RETURN (true); |
|
3953 |
%} |
|
3954 |
. |
|
3955 |
^ false |
|
3956 |
||
3957 |
"Modified: 19.3.1996 / 18:27:50 / cg" |
|
3958 |
! |
|
3959 |
||
3960 |
glxPdr2X: x y: y in: aGLXWindowId |
|
3961 |
"add another vertex to the polygon" |
|
3962 |
||
3963 |
%{ /* NOCONTEXT */ |
|
3964 |
Coord c_x, c_y; |
|
3965 |
||
3966 |
_COORD_ (x, c_x) |
|
3967 |
_COORD_ (y, c_y) |
|
3968 |
SETWIN(aGLXWindowId) |
|
3969 |
pdr2(c_x, c_y); |
|
3970 |
RETURN (true); |
|
3971 |
%} |
|
3972 |
||
3973 |
"Modified: 19.3.1996 / 18:33:09 / cg" |
|
3974 |
! |
|
3975 |
||
3976 |
glxPdr2iX: x y: y in: aGLXWindowId |
|
3977 |
"add another vertex to the polygon" |
|
3978 |
||
3979 |
%{ /* NOCONTEXT */ |
|
3980 |
Icoord c_x, c_y; |
|
3981 |
||
3982 |
_ICOORD_ (x, c_x) |
|
3983 |
_ICOORD_ (y, c_y) |
|
3984 |
SETWIN(aGLXWindowId) |
|
3985 |
pdr2i(c_x, c_y); |
|
3986 |
RETURN (true); |
|
3987 |
%} |
|
3988 |
||
3989 |
"Modified: 19.3.1996 / 18:33:28 / cg" |
|
3990 |
! |
|
3991 |
||
3992 |
glxPdr2sX: x y: y in: aGLXWindowId |
|
3993 |
"add another vertex to the polygon" |
|
3994 |
||
3995 |
%{ /* NOCONTEXT */ |
|
3996 |
Scoord c_x, c_y; |
|
3997 |
||
3998 |
_SCOORD_ (x, c_x) |
|
3999 |
_SCOORD_ (y, c_y) |
|
4000 |
SETWIN(aGLXWindowId) |
|
4001 |
pdr2s(c_x, c_y); |
|
4002 |
RETURN (true); |
|
4003 |
%} |
|
4004 |
||
4005 |
"Modified: 19.3.1996 / 18:34:03 / cg" |
|
4006 |
! |
|
4007 |
||
4008 |
glxPdrX: x y: y z: z in: aGLXWindowId |
|
4009 |
"add another vertex to the polygon" |
|
4010 |
||
4011 |
%{ /* NOCONTEXT */ |
|
4012 |
Coord c_x, c_y, c_z; |
|
4013 |
||
4014 |
_COORD_ (x, c_x) |
|
4015 |
_COORD_ (y, c_y) |
|
4016 |
_COORD_ (z, c_z) |
|
4017 |
SETWIN(aGLXWindowId) |
|
4018 |
pdr(c_x, c_y, c_z); |
|
4019 |
RETURN (true); |
|
4020 |
%} |
|
4021 |
||
4022 |
"Modified: 19.3.1996 / 18:34:06 / cg" |
|
4023 |
! |
|
4024 |
||
4025 |
glxPdriX: x y: y z: z in: aGLXWindowId |
|
4026 |
"add another vertex to the polygon" |
|
4027 |
||
4028 |
%{ /* NOCONTEXT */ |
|
4029 |
Icoord c_x, c_y, c_z; |
|
4030 |
||
4031 |
_ICOORD_ (x, c_x) |
|
4032 |
_ICOORD_ (y, c_y) |
|
4033 |
_ICOORD_ (z, c_z) |
|
4034 |
SETWIN(aGLXWindowId) |
|
4035 |
pdri(c_x, c_y, c_z); |
|
4036 |
RETURN (true); |
|
4037 |
%} |
|
4038 |
||
4039 |
"Modified: 19.3.1996 / 18:34:11 / cg" |
|
4040 |
! |
|
4041 |
||
4042 |
glxPdrsX: x y: y z: z in: aGLXWindowId |
|
4043 |
"add another vertex to the polygon" |
|
4044 |
||
4045 |
%{ /* NOCONTEXT */ |
|
4046 |
Scoord c_x, c_y, c_z; |
|
4047 |
||
4048 |
_SCOORD_ (x, c_x) |
|
4049 |
_SCOORD_ (y, c_y) |
|
4050 |
_SCOORD_ (z, c_z) |
|
4051 |
SETWIN(aGLXWindowId) |
|
4052 |
pdrs(c_x, c_y, c_z); |
|
4053 |
RETURN (true); |
|
4054 |
%} |
|
4055 |
||
4056 |
"Modified: 19.3.1996 / 18:34:14 / cg" |
|
4057 |
! |
|
4058 |
||
4059 |
glxPmv2X: x y: y in: aGLXWindowId |
|
4060 |
"set the start position of a polygon" |
|
4061 |
||
4062 |
%{ /* NOCONTEXT */ |
|
4063 |
Coord c_x, c_y; |
|
4064 |
||
4065 |
_COORD_ (x, c_x) |
|
4066 |
_COORD_ (y, c_y) |
|
4067 |
SETWIN(aGLXWindowId) |
|
4068 |
pmv2(c_x, c_y); |
|
4069 |
RETURN (true); |
|
4070 |
%} |
|
4071 |
||
4072 |
"Modified: 19.3.1996 / 18:32:45 / cg" |
|
4073 |
! |
|
4074 |
||
4075 |
glxPmv2iX: x y: y in: aGLXWindowId |
|
4076 |
"set the start position of a polygon" |
|
4077 |
||
4078 |
%{ /* NOCONTEXT */ |
|
4079 |
Icoord c_x, c_y; |
|
4080 |
||
4081 |
_ICOORD_ (x, c_x) |
|
4082 |
_ICOORD_ (y, c_y) |
|
4083 |
SETWIN(aGLXWindowId) |
|
4084 |
pmv2i(c_x, c_y); |
|
4085 |
RETURN (true); |
|
4086 |
%} |
|
4087 |
||
4088 |
"Modified: 19.3.1996 / 18:32:42 / cg" |
|
4089 |
! |
|
4090 |
||
4091 |
glxPmv2sX: x y: y in: aGLXWindowId |
|
4092 |
"set the start position of a polygon" |
|
4093 |
||
4094 |
%{ /* NOCONTEXT */ |
|
4095 |
Scoord c_x, c_y; |
|
4096 |
||
4097 |
_SCOORD_ (x, c_x) |
|
4098 |
_SCOORD_ (y, c_y) |
|
4099 |
SETWIN(aGLXWindowId) |
|
4100 |
pmv2s(c_x, c_y); |
|
4101 |
RETURN (true); |
|
4102 |
%} |
|
4103 |
||
4104 |
"Modified: 19.3.1996 / 18:32:38 / cg" |
|
4105 |
! |
|
4106 |
||
4107 |
glxPmvX: x y: y z: z in: aGLXWindowId |
|
4108 |
"set the start position of a polygon" |
|
4109 |
||
4110 |
%{ /* NOCONTEXT */ |
|
4111 |
Coord c_x, c_y, c_z; |
|
4112 |
||
4113 |
_COORD_ (x, c_x) |
|
4114 |
_COORD_ (y, c_y) |
|
4115 |
_COORD_ (z, c_z) |
|
4116 |
SETWIN(aGLXWindowId) |
|
4117 |
pmv(c_x, c_y, c_z); |
|
4118 |
RETURN (true); |
|
4119 |
%} |
|
4120 |
||
4121 |
"Modified: 19.3.1996 / 18:31:52 / cg" |
|
4122 |
! |
|
4123 |
||
4124 |
glxPmviX: x y: y z: z in: aGLXWindowId |
|
4125 |
"set the start position of a polygon" |
|
4126 |
||
4127 |
%{ /* NOCONTEXT */ |
|
4128 |
Icoord c_x, c_y, c_z; |
|
4129 |
||
4130 |
_ICOORD_ (x, c_x) |
|
4131 |
_ICOORD_ (y, c_y) |
|
4132 |
_ICOORD_ (z, c_z) |
|
4133 |
SETWIN(aGLXWindowId) |
|
4134 |
pmvi(c_x, c_y, c_z); |
|
4135 |
RETURN (true); |
|
4136 |
%} |
|
4137 |
||
4138 |
"Modified: 19.3.1996 / 18:31:59 / cg" |
|
4139 |
! |
|
4140 |
||
4141 |
glxPmvsX: x y: y z: z in: aGLXWindowId |
|
4142 |
"set the start position of a polygon" |
|
4143 |
||
4144 |
%{ /* NOCONTEXT */ |
|
4145 |
Scoord c_x, c_y, c_z; |
|
4146 |
||
4147 |
_SCOORD_ (x, c_x) |
|
4148 |
_SCOORD_ (y, c_y) |
|
4149 |
_SCOORD_ (z, c_z) |
|
4150 |
SETWIN(aGLXWindowId) |
|
4151 |
pmvs(c_x, c_y, c_z); |
|
4152 |
RETURN (true); |
|
4153 |
%} |
|
4154 |
||
4155 |
"Modified: 19.3.1996 / 18:32:03 / cg" |
|
4156 |
! |
|
4157 |
||
4158 |
glxPolymode: mode in: aGLXWindowId |
|
4159 |
"Sets the polygon filling mode - only filled (1) or outlined (0) |
|
4160 |
are supported" |
|
4161 |
||
4162 |
%{ /* NOCONTEXT */ |
|
4163 |
SETWIN(aGLXWindowId) |
|
4164 |
polymode(_longVal(mode)); |
|
4165 |
RETURN (true); |
|
4166 |
%} |
|
4167 |
||
4168 |
"Modified: 19.3.1996 / 18:29:32 / cg" |
|
4169 |
! |
|
4170 |
||
4171 |
glxRpdr2X: x y: y in: aGLXWindowId |
|
4172 |
"add another relative vertex to the polygon" |
|
4173 |
||
4174 |
%{ /* NOCONTEXT */ |
|
4175 |
Coord c_x, c_y; |
|
4176 |
||
4177 |
_COORD_ (x, c_x) |
|
4178 |
_COORD_ (y, c_y) |
|
4179 |
SETWIN(aGLXWindowId) |
|
4180 |
rpdr2(c_x, c_y); |
|
4181 |
RETURN (true); |
|
4182 |
%} |
|
4183 |
||
4184 |
"Modified: 19.3.1996 / 18:34:31 / cg" |
|
4185 |
! |
|
4186 |
||
4187 |
glxRpdr2iX: x y: y in: aGLXWindowId |
|
4188 |
"add another relative vertex to the polygon" |
|
4189 |
||
4190 |
%{ /* NOCONTEXT */ |
|
4191 |
Icoord c_x, c_y; |
|
4192 |
||
4193 |
_ICOORD_ (x, c_x) |
|
4194 |
_ICOORD_ (y, c_y) |
|
4195 |
SETWIN(aGLXWindowId) |
|
4196 |
rpdr2i(c_x, c_y); |
|
4197 |
RETURN (true); |
|
4198 |
%} |
|
4199 |
||
4200 |
"Modified: 19.3.1996 / 18:34:36 / cg" |
|
4201 |
! |
|
4202 |
||
4203 |
glxRpdr2sX: x y: y in: aGLXWindowId |
|
4204 |
"add another relative vertex to the polygon" |
|
4205 |
||
4206 |
%{ /* NOCONTEXT */ |
|
4207 |
Scoord c_x, c_y; |
|
4208 |
||
4209 |
_SCOORD_ (x, c_x) |
|
4210 |
_SCOORD_ (y, c_y) |
|
4211 |
SETWIN(aGLXWindowId) |
|
4212 |
rpdr2s(c_x, c_y); |
|
4213 |
RETURN (true); |
|
4214 |
%} |
|
4215 |
||
4216 |
"Modified: 19.3.1996 / 18:34:40 / cg" |
|
4217 |
! |
|
4218 |
||
4219 |
glxRpdrX: x y: y z: z in: aGLXWindowId |
|
4220 |
"add another relative vertex to the polygon" |
|
4221 |
||
4222 |
%{ /* NOCONTEXT */ |
|
4223 |
Coord c_x, c_y, c_z; |
|
4224 |
||
4225 |
_COORD_ (x, c_x) |
|
4226 |
_COORD_ (y, c_y) |
|
4227 |
_COORD_ (z, c_z) |
|
4228 |
SETWIN(aGLXWindowId) |
|
4229 |
rpdr(c_x, c_y, c_z); |
|
4230 |
RETURN (true); |
|
4231 |
%} |
|
4232 |
||
4233 |
"Modified: 19.3.1996 / 18:34:48 / cg" |
|
4234 |
! |
|
4235 |
||
4236 |
glxRpdriX: x y: y z: z in: aGLXWindowId |
|
4237 |
"add another relative vertex to the polygon" |
|
4238 |
||
4239 |
%{ /* NOCONTEXT */ |
|
4240 |
Icoord c_x, c_y, c_z; |
|
4241 |
||
4242 |
_ICOORD_ (x, c_x) |
|
4243 |
_ICOORD_ (y, c_y) |
|
4244 |
_ICOORD_ (z, c_z) |
|
4245 |
SETWIN(aGLXWindowId) |
|
4246 |
rpdri(c_x, c_y, c_z); |
|
4247 |
RETURN (true); |
|
4248 |
%} |
|
4249 |
||
4250 |
"Modified: 19.3.1996 / 18:34:51 / cg" |
|
4251 |
! |
|
4252 |
||
4253 |
glxRpdrsX: x y: y z: z in: aGLXWindowId |
|
4254 |
"add another relative vertex to the polygon" |
|
4255 |
||
4256 |
%{ /* NOCONTEXT */ |
|
4257 |
Scoord c_x, c_y, c_z; |
|
4258 |
||
4259 |
_SCOORD_ (x, c_x) |
|
4260 |
_SCOORD_ (y, c_y) |
|
4261 |
_SCOORD_ (z, c_z) |
|
4262 |
SETWIN(aGLXWindowId) |
|
4263 |
rpdrs(c_x, c_y, c_z); |
|
4264 |
RETURN (true); |
|
4265 |
%} |
|
4266 |
||
4267 |
"Modified: 19.3.1996 / 18:34:55 / cg" |
|
4268 |
! |
|
4269 |
||
4270 |
glxRpmv2X: x y: y in: aGLXWindowId |
|
4271 |
"set the start position of a polygon" |
|
4272 |
||
4273 |
%{ /* NOCONTEXT */ |
|
4274 |
Coord c_x, c_y; |
|
4275 |
||
4276 |
_COORD_ (x, c_x) |
|
4277 |
_COORD_ (y, c_y) |
|
4278 |
SETWIN(aGLXWindowId) |
|
4279 |
rpmv2(c_x, c_y); |
|
4280 |
RETURN (true); |
|
4281 |
%} |
|
4282 |
||
4283 |
"Modified: 19.3.1996 / 18:37:15 / cg" |
|
4284 |
! |
|
4285 |
||
4286 |
glxRpmv2iX: x y: y in: aGLXWindowId |
|
4287 |
"set the start position of a polygon" |
|
4288 |
||
4289 |
%{ /* NOCONTEXT */ |
|
4290 |
Icoord c_x, c_y; |
|
4291 |
||
4292 |
_ICOORD_ (x, c_x) |
|
4293 |
_ICOORD_ (y, c_y) |
|
4294 |
SETWIN(aGLXWindowId) |
|
4295 |
rpmv2i(c_x, c_y); |
|
4296 |
RETURN (true); |
|
4297 |
%} |
|
4298 |
||
4299 |
"Modified: 19.3.1996 / 18:37:20 / cg" |
|
4300 |
! |
|
4301 |
||
4302 |
glxRpmv2sX: x y: y in: aGLXWindowId |
|
4303 |
"set the relative start position of a polygon" |
|
4304 |
||
4305 |
%{ /* NOCONTEXT */ |
|
4306 |
Scoord c_x, c_y; |
|
4307 |
||
4308 |
_SCOORD_ (x, c_x) |
|
4309 |
_SCOORD_ (y, c_y) |
|
4310 |
SETWIN(aGLXWindowId) |
|
4311 |
rpmv2s(c_x, c_y); |
|
4312 |
RETURN (true); |
|
4313 |
%} |
|
4314 |
||
4315 |
"Modified: 19.3.1996 / 18:38:06 / cg" |
|
4316 |
! |
|
4317 |
||
4318 |
glxRpmvX: x y: y z: z in: aGLXWindowId |
|
4319 |
"set the relative start position of a polygon" |
|
4320 |
||
4321 |
%{ /* NOCONTEXT */ |
|
4322 |
Coord c_x, c_y, c_z; |
|
4323 |
||
4324 |
_COORD_ (x, c_x) |
|
4325 |
_COORD_ (y, c_y) |
|
4326 |
_COORD_ (z, c_z) |
|
4327 |
SETWIN(aGLXWindowId) |
|
4328 |
rpmv(c_x, c_y, c_z); |
|
4329 |
RETURN (true); |
|
4330 |
%} |
|
4331 |
||
4332 |
"Modified: 19.3.1996 / 18:38:03 / cg" |
|
4333 |
! |
|
4334 |
||
4335 |
glxRpmviX: x y: y z: z in: aGLXWindowId |
|
4336 |
"set the relative start position of a polygon" |
|
4337 |
||
4338 |
%{ /* NOCONTEXT */ |
|
4339 |
Icoord c_x, c_y, c_z; |
|
4340 |
||
4341 |
_ICOORD_ (x, c_x) |
|
4342 |
_ICOORD_ (y, c_y) |
|
4343 |
_ICOORD_ (z, c_z) |
|
4344 |
SETWIN(aGLXWindowId) |
|
4345 |
rpmvi(c_x, c_y, c_z); |
|
4346 |
RETURN (true); |
|
4347 |
%} |
|
4348 |
||
4349 |
"Modified: 19.3.1996 / 18:37:53 / cg" |
|
4350 |
! |
|
4351 |
||
4352 |
glxRpmvsX: x y: y z: z in: aGLXWindowId |
|
4353 |
"set the relative start position of a polygon" |
|
4354 |
||
4355 |
%{ /* NOCONTEXT */ |
|
4356 |
Scoord c_x, c_y, c_z; |
|
4357 |
||
4358 |
_SCOORD_ (x, c_x) |
|
4359 |
_SCOORD_ (y, c_y) |
|
4360 |
_SCOORD_ (z, c_z) |
|
4361 |
SETWIN(aGLXWindowId) |
|
4362 |
rpmvs(c_x, c_y, c_z); |
|
4363 |
RETURN (true); |
|
4364 |
%} |
|
4365 |
||
4366 |
"Modified: 19.3.1996 / 18:37:58 / cg" |
|
294 | 4367 |
! ! |
4368 |
||
24 | 4369 |
!GLXWorkstation methodsFor:'queries'! |
4370 |
||
159 | 4371 |
glVersion |
4372 |
"return a string describing the GL version. |
|
4373 |
For informative use only; portable applications do not depend |
|
4374 |
on the returned string." |
|
4375 |
||
4376 |
%{ /* NOCONTEXT */ |
|
4377 |
#ifdef VGL |
|
216 | 4378 |
RETURN (__MKSTRING("vogl" COMMA_CON)); |
159 | 4379 |
#else |
4380 |
char buffer[128]; |
|
4381 |
||
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
4382 |
if (_INST(glOK) == true) { |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
4383 |
gversion(buffer); |
216 | 4384 |
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
|
4385 |
} else { |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
4386 |
RETURN (nil); |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
4387 |
} |
159 | 4388 |
#endif |
4389 |
%} |
|
4390 |
||
4391 |
" |
|
4392 |
Display glVersion |
|
4393 |
" |
|
4394 |
! |
|
4395 |
||
528 | 4396 |
glxGetplanesIn: aGLXWindowId |
4397 |
"Returns the number if bit planes available on the device." |
|
4398 |
||
4399 |
%{ /* NOCONTEXT */ |
|
4400 |
#ifdef GLX |
|
4401 |
SETWIN(aGLXWindowId) |
|
4402 |
RETURN (__MKSMALLINT(getplanes())); |
|
4403 |
#endif |
|
4404 |
%} |
|
4405 |
. |
|
4406 |
^ false |
|
4407 |
||
4408 |
"Modified: 19.3.1996 / 18:50:44 / cg" |
|
4409 |
! |
|
4410 |
||
294 | 4411 |
hasStereoExtension |
4412 |
"return true, if this workstation supports stereo GL drawing. |
|
4413 |
Both the server must support it, and the feature must have been |
|
4414 |
enabled in the smalltalk system, for true to be returned." |
|
4415 |
||
4416 |
^ hasStereoExtension |
|
4417 |
||
4418 |
" |
|
4419 |
Display hasStereoExtension |
|
4420 |
" |
|
4421 |
! |
|
4422 |
||
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4423 |
isTrueGL |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4424 |
"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
|
4425 |
|
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4426 |
%{ /* NOCONTEXT */ |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4427 |
#ifdef VGL |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4428 |
RETURN ( false ); |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4429 |
#else |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4430 |
RETURN ( true ); |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4431 |
#endif |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4432 |
%} |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4433 |
! |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4434 |
|
294 | 4435 |
maxZValue |
4436 |
"return the max. Z value (only valid if z-buffer is supported)" |
|
4437 |
%{ |
|
4438 |
#ifdef GLX |
|
4439 |
long zMax; |
|
4440 |
||
4441 |
if (_INST(glOK) == true) { |
|
4442 |
zMax = getgdesc(GD_ZMAX); |
|
4443 |
||
4444 |
if ((zMax >= _MIN_INT) && (zMax <= _MAX_INT)) { |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
4445 |
RETURN ( __MKSMALLINT(zMax) ); |
294 | 4446 |
} |
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
4447 |
RETURN ( __MKLARGEINT(zMax) ); |
294 | 4448 |
} |
4449 |
#endif |
|
4450 |
%}. |
|
4451 |
^ nil |
|
4452 |
! |
|
4453 |
||
4454 |
supportsDoubleBuffer |
|
4455 |
"return true, if this gl workstation supports double buffering. |
|
157 | 4456 |
For portable applications, always combine this with a query |
4457 |
if the display supports GL drawing at all." |
|
24 | 4458 |
|
4459 |
%{ /* NOCONTEXT */ |
|
294 | 4460 |
|
4461 |
#ifdef GLX |
|
4462 |
if (getgdesc(GD_BITS_NORM_DBL_RED) != 0) { |
|
4463 |
RETURN ( _INST(glOK) ); |
|
4464 |
} |
|
24 | 4465 |
#endif |
89 | 4466 |
%}. |
4467 |
^ false |
|
4468 |
||
4469 |
" |
|
294 | 4470 |
Display supportsDoubleBuffer |
4471 |
" |
|
4472 |
! |
|
4473 |
||
4474 |
supportsGLDrawing |
|
4475 |
"return true, if this device supports 3D GL drawing." |
|
4476 |
||
4477 |
^ glOK |
|
4478 |
||
4479 |
" |
|
4480 |
Display supportsGLDrawing |
|
89 | 4481 |
" |
64 | 4482 |
! |
4483 |
||
4484 |
supportsLight |
|
157 | 4485 |
"return true, if this gl workstation supports light sources |
4486 |
(i.e. if its a real GL). |
|
4487 |
For portable applications, always combine this with a query |
|
4488 |
if the display supports GL drawing at all." |
|
89 | 4489 |
|
4490 |
%{ /* NOCONTEXT */ |
|
64 | 4491 |
#ifdef GLX |
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
4492 |
RETURN ( _INST(glOK) ); |
64 | 4493 |
#endif |
89 | 4494 |
%}. |
4495 |
^ false |
|
4496 |
||
4497 |
" |
|
4498 |
Display supportsLight |
|
4499 |
" |
|
4500 |
! |
|
4501 |
||
294 | 4502 |
supportsRGB |
4503 |
"return true, if this gl workstation supports rgb |
|
4504 |
(in addition to indexed) colors. Actually, we return true |
|
4505 |
for a real GL engine, false for the simulator here. |
|
4506 |
For portable applications, always combine this with a query |
|
4507 |
if the display supports GL drawing at all." |
|
4508 |
||
4509 |
%{ /* NOCONTEXT */ |
|
4510 |
#ifdef GLX |
|
4511 |
RETURN ( _INST(glOK) ); |
|
4512 |
#endif |
|
4513 |
%}. |
|
4514 |
^ false |
|
4515 |
||
4516 |
" |
|
4517 |
Display supportsRGB |
|
4518 |
" |
|
4519 |
! |
|
4520 |
||
89 | 4521 |
supportsTextures |
4522 |
"return true, if this gl workstation supports texture mapping |
|
157 | 4523 |
(i.e. if its a real GL). |
4524 |
For portable applications, always combine this with a query |
|
4525 |
if the display supports GL drawing at all." |
|
89 | 4526 |
|
4527 |
%{ /* NOCONTEXT */ |
|
4528 |
#ifdef GLX |
|
4529 |
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
|
4530 |
RETURN ( _INST(glOK) ); |
89 | 4531 |
} |
4532 |
#endif |
|
4533 |
%}. |
|
4534 |
^ false |
|
4535 |
||
4536 |
" |
|
4537 |
Display supportsTextures |
|
4538 |
" |
|
4539 |
! |
|
4540 |
||
4541 |
supportsZBuffer |
|
157 | 4542 |
"return true, if this gl workstation has z buffer support. |
4543 |
For portable applications, always combine this with a query |
|
4544 |
if the display supports GL drawing at all." |
|
4545 |
||
89 | 4546 |
%{ /* NOCONTEXT */ |
4547 |
||
4548 |
#ifdef GLX |
|
4549 |
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
|
4550 |
RETURN ( _INST(glOK) ); |
89 | 4551 |
} |
4552 |
#endif |
|
4553 |
%}. |
|
4554 |
^ false |
|
4555 |
||
4556 |
" |
|
4557 |
Display supportsZBuffer |
|
4558 |
" |
|
294 | 4559 |
! ! |
4560 |
||
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4561 |
!GLXWorkstation methodsFor:'rectangles'! |
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 |
glxRectX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4564 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4565 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4566 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4567 |
rect(_coordVal(x1), _coordVal(y1), _coordVal(x2), _coordVal(y2)); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4568 |
RETURN (true); |
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 |
! |
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 |
glxRectfX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4573 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4574 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4575 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4576 |
rectf(_coordVal(x1), _coordVal(y1), _coordVal(x2), _coordVal(y2)); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4577 |
RETURN (true); |
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 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4580 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4581 |
glxRectfiX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4582 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4583 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4584 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4585 |
rectfi(_icoordVal(x1), _icoordVal(y1), _icoordVal(x2), _icoordVal(y2)); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4586 |
RETURN (true); |
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 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4590 |
glxRectfsX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4591 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4592 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4593 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4594 |
rectfs(_scoordVal(x1), _scoordVal(y1), _scoordVal(x2), _scoordVal(y2)); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4595 |
RETURN (true); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4596 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4597 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4598 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4599 |
glxRectiX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
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 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4602 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4603 |
recti(_icoordVal(x1), _icoordVal(y1), _icoordVal(x2), _icoordVal(y2)); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4604 |
RETURN (true); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4605 |
%} |
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 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4608 |
glxRectsX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4609 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4610 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4611 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4612 |
rects(_scoordVal(x1), _scoordVal(y1), _scoordVal(x2), _scoordVal(y2)); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4613 |
RETURN (true); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4614 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4615 |
! ! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4616 |
|
528 | 4617 |
!GLXWorkstation methodsFor:'spheres'! |
294 | 4618 |
|
4619 |
glxSphDraw:arrayOf4Floats in:aGLXWindowId |
|
4620 |
"argument must be an array(a matrix) of 4 floats containing the |
|
4621 |
sphere - in real GL only" |
|
4622 |
||
4623 |
%{ /* NOCONTEXT */ |
|
4624 |
#ifdef GLX |
|
4625 |
float vec[4], *v; |
|
4626 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4627 |
if (! (v = __glx_getFloatsFromInto(arrayOf4Floats, vec, 4))) RETURN(false); |
294 | 4628 |
SETWIN(aGLXWindowId) |
4629 |
sphdraw(v); |
|
4630 |
RETURN (true); |
|
4631 |
#endif |
|
4632 |
%} |
|
4633 |
. |
|
4634 |
^ false |
|
4635 |
! |
|
4636 |
||
4637 |
glxSphDrawX:x y:y z:z radius:r in:aGLXWindowId |
|
4638 |
"arguments must be convertable to floats - in real GL only" |
|
4639 |
||
4640 |
%{ /* NOCONTEXT */ |
|
4641 |
#ifdef GLX |
|
4642 |
float vec[4]; |
|
4643 |
||
4644 |
_FLOAT_(x, vec[0]) |
|
4645 |
_FLOAT_(y, vec[1]) |
|
4646 |
_FLOAT_(z, vec[2]) |
|
4647 |
_FLOAT_(r, vec[3]) |
|
4648 |
SETWIN(aGLXWindowId) |
|
4649 |
sphdraw(vec); |
|
4650 |
RETURN (true); |
|
4651 |
#endif |
|
4652 |
%} |
|
4653 |
. |
|
4654 |
^ false |
|
4655 |
! |
|
4656 |
||
4657 |
glxSphfreeIn: aGLXWindowId |
|
4658 |
||
4659 |
%{ /* NOCONTEXT */ |
|
4660 |
#ifdef GLX |
|
4661 |
SETWIN(aGLXWindowId) |
|
4662 |
sphfree(); |
|
4663 |
RETURN (true); |
|
4664 |
#endif |
|
4665 |
%} |
|
4666 |
. |
|
4667 |
^ false |
|
4668 |
! |
|
4669 |
||
4670 |
glxSphgnpolysIn: aGLXWindowId |
|
4671 |
||
4672 |
%{ /* NOCONTEXT */ |
|
4673 |
#ifdef GLX |
|
4674 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
4675 |
RETURN (__MKSMALLINT(sphgnpolys())); |
294 | 4676 |
#endif |
4677 |
%} |
|
4678 |
. |
|
4679 |
^ false |
|
4680 |
! |
|
4681 |
||
4682 |
glxSphmode: attribute value: value in: aGLXWindowId |
|
4683 |
||
4684 |
%{ /* NOCONTEXT */ |
|
4685 |
#ifdef GLX |
|
4686 |
SETWIN(aGLXWindowId) |
|
4687 |
sphmode(__intVal(attribute), __intVal(value)); |
|
4688 |
RETURN (true); |
|
4689 |
#endif |
|
4690 |
%} |
|
4691 |
. |
|
4692 |
^ false |
|
4693 |
! |
|
4694 |
||
4695 |
glxSphobj: objid in: aGLXWindowId |
|
4696 |
||
4697 |
%{ /* NOCONTEXT */ |
|
4698 |
#ifdef GLX |
|
4699 |
SETWIN(aGLXWindowId) |
|
4700 |
sphobj(_objectVal(objid)); |
|
4701 |
RETURN (true); |
|
4702 |
#endif |
|
4703 |
%} |
|
4704 |
. |
|
4705 |
^ false |
|
4706 |
! |
|
4707 |
||
4708 |
glxSphrotmatrix: mat in: aGLXWindowId |
|
4709 |
||
4710 |
%{ /* NOCONTEXT */ |
|
4711 |
#ifdef GLX |
|
4712 |
Matrix matrix, *m; |
|
4713 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4714 |
if (! (m = __glx_getFloatsFromMatrixInto(mat, &matrix))) RETURN (false); |
294 | 4715 |
SETWIN(aGLXWindowId) |
4716 |
sphrotmatrix(*m); |
|
4717 |
RETURN (true); |
|
4718 |
#endif |
|
4719 |
%} |
|
4720 |
. |
|
4721 |
^ false |
|
4722 |
! ! |
|
4723 |
||
4724 |
!GLXWorkstation methodsFor:'stereo extension'! |
|
4725 |
||
528 | 4726 |
glxLeftbuffer: bool in: aGLXWindowId |
4727 |
||
4728 |
%{ /* NOCONTEXT */ |
|
4729 |
#ifdef FULL_GLX |
|
4730 |
SETWIN(aGLXWindowId) |
|
4731 |
leftbuffer(_booleanVal(bool)); |
|
4732 |
RETURN (true); |
|
4733 |
#endif |
|
4734 |
%} |
|
4735 |
. |
|
4736 |
^ false |
|
4737 |
! |
|
4738 |
||
4739 |
glxMonobufferIn: aGLXWindowId |
|
4740 |
||
4741 |
%{ /* NOCONTEXT */ |
|
4742 |
#ifdef FULL_GLX |
|
4743 |
SETWIN(aGLXWindowId) |
|
4744 |
monobuffer(); |
|
4745 |
RETURN (true); |
|
4746 |
#endif |
|
4747 |
%} |
|
4748 |
. |
|
4749 |
^ false |
|
4750 |
! |
|
4751 |
||
4752 |
glxRightbuffer: bool in: aGLXWindowId |
|
4753 |
||
4754 |
%{ /* NOCONTEXT */ |
|
4755 |
#ifdef FULL_GLX |
|
4756 |
SETWIN(aGLXWindowId) |
|
4757 |
rightbuffer(_booleanVal(bool)); |
|
4758 |
RETURN (true); |
|
4759 |
#endif |
|
4760 |
%} |
|
4761 |
. |
|
4762 |
^ false |
|
4763 |
! |
|
4764 |
||
294 | 4765 |
stereoExtensionBuffer:aBufferSymbol for:aWindowId |
4766 |
"set the current stereo buffer; the argument may be one of: |
|
4767 |
#left -> STEREO_BUFFER_LEFT |
|
4768 |
#right -> STEREO_BUFFER_RIGHT |
|
4769 |
" |
|
4770 |
||
4771 |
%{ /* NOCONTEXT */ |
|
4772 |
#if defined(XSGIStereo) && defined(GLX) |
|
4773 |
Status status; |
|
4774 |
int buffer; |
|
4775 |
Window win; |
|
4776 |
||
4777 |
if (ISCONNECTED |
|
4778 |
&& __isExternalAddress(aWindowId)) { |
|
4779 |
win = _WindowVal(aWindowId); |
|
4780 |
if (aBufferSymbol == @symbol(left)) { |
|
4781 |
buffer = STEREO_BUFFER_LEFT; |
|
4782 |
} else { |
|
4783 |
if (aBufferSymbol == @symbol(right)) { |
|
4784 |
buffer = STEREO_BUFFER_RIGHT; |
|
4785 |
} else { |
|
4786 |
goto bad; |
|
4787 |
} |
|
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
4788 |
} |
294 | 4789 |
status = XSGISetStereoBuffer(myDpy, win, buffer); |
4790 |
RETURN ( status ? true : false); |
|
4791 |
} |
|
4792 |
bad: ; |
|
4793 |
#endif |
|
4794 |
%}. |
|
4795 |
self primitiveFailed |
|
4796 |
||
4797 |
" |
|
4798 |
|t v| |
|
4799 |
||
4800 |
t := StandardSystemView new. |
|
4801 |
t extent:300@300. |
|
4802 |
v := GLXView origin:0.0@0.0 corner:1.0@1.0 in:t. |
|
4803 |
t openAndWait. |
|
4804 |
||
4805 |
v device stereoExtensionBuffer:#left for:(v id). |
|
4806 |
(Delay forSeconds:10) wait. |
|
4807 |
v device stereoExtensionBuffer:#right for:(v id). |
|
4808 |
" |
|
4809 |
! |
|
4810 |
||
4811 |
stereoExtensionMode:aModeSymbol height:h offset:o for:aWindowId |
|
4812 |
"set the current stereo mode; the argument may be one of: |
|
4813 |
nil/false #off -> turn it off |
|
4814 |
#bottom -> STEREO_BOTTOM |
|
4815 |
#top -> STEREO_TOP |
|
4816 |
" |
|
4817 |
||
4818 |
%{ /* NOCONTEXT */ |
|
4819 |
#if defined(XSGIStereo) && defined(GLX) |
|
4820 |
Status status; |
|
4821 |
int mode; |
|
4822 |
unsigned short us_h, us_o; |
|
4823 |
Window win; |
|
4824 |
||
4825 |
if (ISCONNECTED |
|
4826 |
&& __bothSmallInteger(h, o) |
|
4827 |
&& __isExternalAddress(aWindowId)) { |
|
4828 |
win = _WindowVal(aWindowId); |
|
4829 |
if ((aModeSymbol == nil) |
|
4830 |
|| (aModeSymbol == false) |
|
4831 |
|| (aModeSymbol == @symbol(off))) { |
|
4832 |
mode = STEREO_OFF; |
|
4833 |
} else { |
|
4834 |
if (aModeSymbol == @symbol(bottom)) { |
|
4835 |
mode = STEREO_BOTTOM; |
|
4836 |
} else { |
|
4837 |
if (aModeSymbol == @symbol(top)) { |
|
4838 |
mode = STEREO_TOP; |
|
4839 |
} else { |
|
4840 |
goto bad; |
|
4841 |
} |
|
4842 |
} |
|
4843 |
} |
|
4844 |
us_h = __intVal(h); |
|
4845 |
us_o = __intVal(o); |
|
4846 |
status = XSGISetStereoMode(myDpy, win, us_h, us_o, mode); |
|
4847 |
RETURN ( status ? true : false); |
|
4848 |
} |
|
4849 |
bad: ; |
|
4850 |
#endif |
|
4851 |
%}. |
|
4852 |
self primitiveFailed |
|
4853 |
||
4854 |
" |
|
4855 |
Display stereoExtensionMode:#top height:492 offset:532 for:(Display rootWindowId). |
|
4856 |
(Delay forSeconds:10) wait. |
|
4857 |
Display stereoExtensionMode:#off height:0 offset:0 for:(Display rootWindowId). |
|
4858 |
" |
|
4859 |
! |
|
4860 |
||
4861 |
stereoExtensionModeIn:aWindowId |
|
4862 |
"return the current stereo mode for some window" |
|
4863 |
||
4864 |
%{ /* NOCONTEXT */ |
|
4865 |
#if defined(XSGIStereo) && defined(GLX) |
|
4866 |
int mode; |
|
4867 |
Window win; |
|
4868 |
||
4869 |
if (ISCONNECTED && __isExternalAddress(aWindowId)) { |
|
4870 |
win = _WindowVal(aWindowId); |
|
4871 |
mode = XSGIQueryStereoMode(myDpy, win); |
|
4872 |
switch (mode) { |
|
4873 |
case STEREO_OFF: |
|
4874 |
RETURN ( @symbol(off) ); |
|
4875 |
case STEREO_BOTTOM: |
|
4876 |
RETURN ( @symbol(bottom) ); |
|
4877 |
case STEREO_TOP: |
|
4878 |
RETURN ( @symbol(top) ); |
|
4879 |
} |
|
4880 |
RETURN ( @symbol(unsupported) ); |
|
4881 |
} |
|
4882 |
#endif |
|
4883 |
%}. |
|
4884 |
self primitiveFailed |
|
4885 |
||
4886 |
" |
|
4887 |
|v| |
|
4888 |
||
4889 |
v := StandardSystemView new. |
|
4890 |
v extent:300@300. |
|
4891 |
v openAndWait. |
|
4892 |
v device stereoExtensionModeIn:(v id) |
|
4893 |
||
4894 |
Display stereoExtensionModeIn:Display rootWindowId |
|
4895 |
" |
|
4896 |
! |
|
4897 |
||
4898 |
stereoExtensionVersion |
|
4899 |
"return the stereo extensions version as an array consisting of |
|
4900 |
major and minor numbers." |
|
4901 |
||
4902 |
%{ /* NOCONTEXT */ |
|
4903 |
#if defined(XSGIStereo) && defined(GLX) |
|
4904 |
Status status; |
|
4905 |
Display *dpy = myDpy; |
|
4906 |
int major, minor; |
|
4907 |
||
4908 |
if (ISCONNECTED) { |
|
4909 |
status = XSGIStereoQueryVersion(myDpy, &major, &minor); |
|
4910 |
if (status == True) { |
|
4911 |
RETURN ( __ARRAY_WITH2(__MKSMALLINT(major), __MKSMALLINT(minor))); |
|
4912 |
} |
|
89 | 4913 |
} |
4914 |
#endif |
|
4915 |
%}. |
|
294 | 4916 |
self primitiveFailed |
185 | 4917 |
|
4918 |
" |
|
294 | 4919 |
Display stereoExtensionVersion |
185 | 4920 |
" |
24 | 4921 |
! ! |
4922 |
||
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4923 |
!GLXWorkstation methodsFor:'texture data transfer'! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4924 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4925 |
glxT2d: v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4926 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4927 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4928 |
#ifdef GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4929 |
double vec[2], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4930 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4931 |
if (! (c_v = __glx_getDoublesFromInto(v, vec, 2))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4932 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4933 |
t2d(c_v); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4934 |
RETURN (true); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4935 |
#endif |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4936 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4937 |
. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4938 |
^ false |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4939 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4940 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4941 |
glxT2f: v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4942 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4943 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4944 |
#ifdef GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4945 |
float vec[2], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4946 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4947 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 2))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4948 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4949 |
t2f(c_v); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4950 |
RETURN (true); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4951 |
#endif |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4952 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4953 |
. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4954 |
^ false |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4955 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4956 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4957 |
glxT2i: v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4958 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4959 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4960 |
#ifdef GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4961 |
long vec[2], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4962 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4963 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 2))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4964 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4965 |
t2i(c_v); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4966 |
RETURN (true); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4967 |
#endif |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4968 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4969 |
. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4970 |
^ false |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4971 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4972 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4973 |
glxT2s: v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4974 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4975 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4976 |
#ifdef GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4977 |
short vec[2], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4978 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4979 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 2))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4980 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4981 |
t2s(c_v); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4982 |
RETURN (true); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4983 |
#endif |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4984 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4985 |
. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4986 |
^ false |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4987 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4988 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4989 |
glxT3d:v in:aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4990 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4991 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4992 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4993 |
double vec[3], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4994 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4995 |
if (! (c_v = __glx_getDoublesFromInto(v, vec, 3))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4996 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4997 |
t3d(c_v); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4998 |
RETURN (true); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4999 |
#endif |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5000 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5001 |
. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5002 |
^ false |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5003 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5004 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5005 |
glxT3f:v in:aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5006 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5007 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5008 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5009 |
float vec[3], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5010 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5011 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 3))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5012 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5013 |
t3f(c_v); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5014 |
RETURN (true); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5015 |
#endif |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5016 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5017 |
. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5018 |
^ false |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5019 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5020 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5021 |
glxT3i:v in:aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5022 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5023 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5024 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5025 |
long vec[3], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5026 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5027 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 3))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5028 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5029 |
t3i(c_v); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5030 |
RETURN (true); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5031 |
#endif |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5032 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5033 |
. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5034 |
^ false |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5035 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5036 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5037 |
glxT3s:v in:aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5038 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5039 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5040 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5041 |
short vec[3], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5042 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5043 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 3))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5044 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5045 |
t3s(c_v); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5046 |
RETURN (true); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5047 |
#endif |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5048 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5049 |
. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5050 |
^ false |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5051 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5052 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5053 |
glxT4d: v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5054 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5055 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5056 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5057 |
double vec[4], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5058 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5059 |
if (! (c_v = __glx_getDoublesFromInto(v, vec, 4))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5060 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5061 |
t4d(c_v); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5062 |
RETURN (true); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5063 |
#endif |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5064 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5065 |
. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5066 |
^ false |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5067 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5068 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5069 |
glxT4f: v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5070 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5071 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5072 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5073 |
float vec[4], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5074 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5075 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 4))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5076 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5077 |
t4f(c_v); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5078 |
RETURN (true); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5079 |
#endif |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5080 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5081 |
. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5082 |
^ false |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5083 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5084 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5085 |
glxT4i: v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5086 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5087 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5088 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5089 |
long vec[4], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5090 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5091 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 4))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5092 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5093 |
t4i(c_v); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5094 |
RETURN (true); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5095 |
#endif |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5096 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5097 |
. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5098 |
^ false |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5099 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5100 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5101 |
glxT4s: v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5102 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5103 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5104 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5105 |
short vec[4], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5106 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5107 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 4))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5108 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5109 |
t4s(c_v); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5110 |
RETURN (true); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5111 |
#endif |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5112 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5113 |
. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5114 |
^ false |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5115 |
! ! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5116 |
|
294 | 5117 |
!GLXWorkstation methodsFor:'transformations'! |
5118 |
||
5119 |
glxRotate:angle axis:axis in:aGLXWindowId |
|
5120 |
"rotate the current matrix around the axis given by the axis arg, |
|
5121 |
which must be one of the symbols: #x, #y or #z. |
|
5122 |
The angle is in degrees." |
|
5123 |
||
5124 |
%{ /* NOCONTEXT */ |
|
5125 |
||
5126 |
char c_axis; |
|
5127 |
||
5128 |
if (axis == @symbol(x)) |
|
5129 |
c_axis = 'x'; |
|
5130 |
else if (axis == @symbol(y)) |
|
5131 |
c_axis = 'y'; |
|
5132 |
else if (axis == @symbol(z)) |
|
5133 |
c_axis = 'z'; |
|
5134 |
else { |
|
5135 |
RETURN (false); |
|
5136 |
} |
|
5137 |
||
5138 |
SETWIN(aGLXWindowId) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5139 |
RETURN ( __glx_doRotate(angle, c_axis) ); |
294 | 5140 |
%} |
5141 |
! |
|
5142 |
||
5143 |
glxRotate:arrayOf3Floats in:aGLXWindowId |
|
5144 |
"rotate current matrix, given a 3-element vector (or more). |
|
5145 |
The elements of the array are degrees." |
|
5146 |
||
5147 |
%{ /* NOCONTEXT */ |
|
5148 |
||
5149 |
float vec[3], *v; |
|
5150 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5151 |
if (! (v = __glx_getFloatsFromInto(arrayOf3Floats, vec, 3))) RETURN(false); |
294 | 5152 |
|
5153 |
SETWIN(aGLXWindowId) |
|
5154 |
rot(v[0], 'x'); |
|
5155 |
rot(v[1], 'y'); |
|
5156 |
rot(v[2], 'z'); |
|
5157 |
RETURN (true); |
|
5158 |
%} |
|
5159 |
! |
|
5160 |
||
5161 |
glxRotateI:angle axis:axis in:aGLXWindowId |
|
5162 |
"rotate the current matrix around the axis given by the axis arg, |
|
5163 |
which must be one of the symbols: #x, #y or #z. |
|
5164 |
The angle is an integer specifying tenths of a degree." |
|
5165 |
||
5166 |
%{ /* NOCONTEXT */ |
|
5167 |
||
5168 |
char c_axis; |
|
5169 |
||
5170 |
if (axis == @symbol(x)) |
|
5171 |
c_axis = 'x'; |
|
5172 |
else if (axis == @symbol(y)) |
|
5173 |
c_axis = 'y'; |
|
5174 |
else if (axis == @symbol(z)) |
|
5175 |
c_axis = 'z'; |
|
5176 |
else { |
|
5177 |
RETURN (false); |
|
5178 |
} |
|
5179 |
||
5180 |
if (__isSmallInteger(angle)) { |
|
5181 |
SETWIN(aGLXWindowId) |
|
5182 |
rotate(__intVal(angle), c_axis); |
|
5183 |
RETURN (true); |
|
5184 |
} |
|
5185 |
%} |
|
5186 |
. |
|
5187 |
^ false |
|
5188 |
! |
|
5189 |
||
5190 |
glxRotateIX:angle in:aGLXWindowId |
|
5191 |
"rotate the current matrix on x axis. |
|
5192 |
The angle is an integer specifying tenths of a degree." |
|
5193 |
||
5194 |
%{ /* NOCONTEXT */ |
|
5195 |
||
5196 |
if (__isSmallInteger(angle)) { |
|
5197 |
SETWIN(aGLXWindowId) |
|
5198 |
rotate(__intVal(angle), 'x'); |
|
5199 |
RETURN (true); |
|
5200 |
} |
|
5201 |
%} |
|
5202 |
. |
|
5203 |
^ false |
|
5204 |
! |
|
5205 |
||
5206 |
glxRotateIX:xAngle y:yAngle z:zAngle in:aGLXWindowId |
|
5207 |
"rotate the current matrix on all axes, given individual x, y and z values. |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5208 |
The values are smallIntegers specifying tenths of a degree." |
294 | 5209 |
|
5210 |
%{ /* NOCONTEXT */ |
|
5211 |
||
5212 |
if (__bothSmallInteger(xAngle, yAngle) |
|
5213 |
&& __isSmallInteger(zAngle)) { |
|
5214 |
SETWIN(aGLXWindowId) |
|
5215 |
rotate(__intVal(xAngle), 'x'); |
|
5216 |
rotate(__intVal(yAngle), 'y'); |
|
5217 |
rotate(__intVal(zAngle), 'z'); |
|
5218 |
RETURN (true); |
|
5219 |
} |
|
5220 |
%} |
|
5221 |
. |
|
5222 |
^ false |
|
5223 |
! |
|
5224 |
||
5225 |
glxRotateIY:angle in:aGLXWindowId |
|
5226 |
"rotate the current matrix on x axis. |
|
5227 |
The angle is an integer specifying tenths of a degree." |
|
5228 |
||
5229 |
%{ /* NOCONTEXT */ |
|
5230 |
||
5231 |
if (__isSmallInteger(angle)) { |
|
5232 |
SETWIN(aGLXWindowId) |
|
5233 |
rotate(__intVal(angle), 'y'); |
|
5234 |
RETURN (true); |
|
5235 |
} |
|
5236 |
%} |
|
5237 |
. |
|
5238 |
^ false |
|
5239 |
! |
|
5240 |
||
5241 |
glxRotateIZ:angle in:aGLXWindowId |
|
5242 |
"rotate the current matrix on x axis. |
|
5243 |
The angle is an integer specifying tenths of a degree." |
|
5244 |
||
5245 |
%{ /* NOCONTEXT */ |
|
5246 |
||
5247 |
if (__isSmallInteger(angle)) { |
|
5248 |
SETWIN(aGLXWindowId) |
|
5249 |
rotate(__intVal(angle), 'z'); |
|
5250 |
RETURN (true); |
|
5251 |
} |
|
5252 |
%} |
|
5253 |
. |
|
5254 |
^ false |
|
5255 |
! |
|
5256 |
||
5257 |
glxRotateX:angle in:aGLXWindowId |
|
5258 |
"rotate the current matrix on x axis. |
|
5259 |
The angle is in degrees." |
|
5260 |
||
5261 |
%{ /* NOCONTEXT */ |
|
5262 |
||
5263 |
SETWIN(aGLXWindowId) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5264 |
RETURN (__glx_doRotate(angle, 'x')); |
294 | 5265 |
%} |
5266 |
! |
|
5267 |
||
5268 |
glxRotateX:xAngle y:yAngle z:zAngle in:aGLXWindowId |
|
5269 |
"rotate the current matrix on all axes, given individual x, y and z values. |
|
5270 |
The values are in degrees" |
|
5271 |
||
5272 |
%{ /* NOCONTEXT */ |
|
5273 |
||
5274 |
SETWIN(aGLXWindowId) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5275 |
if ( __glx_doRotate(xAngle, 'x') == true) { |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5276 |
if ( __glx_doRotate(yAngle, 'y') == true) { |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5277 |
RETURN (__glx_doRotate(zAngle, 'z')); |
294 | 5278 |
} |
5279 |
} |
|
5280 |
%} |
|
5281 |
. |
|
5282 |
^ false |
|
5283 |
! |
|
5284 |
||
5285 |
glxRotateY:angle in:aGLXWindowId |
|
5286 |
"rotate the current matrix on y axis. |
|
5287 |
The angle is in degrees." |
|
5288 |
||
5289 |
%{ /* NOCONTEXT */ |
|
5290 |
||
5291 |
SETWIN(aGLXWindowId) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5292 |
RETURN (__glx_doRotate(angle, 'y')); |
294 | 5293 |
%} |
5294 |
! |
|
5295 |
||
5296 |
glxRotateZ:angle in:aGLXWindowId |
|
5297 |
"rotate the current matrix on z axis. |
|
5298 |
The angle is in degrees." |
|
5299 |
||
5300 |
%{ /* NOCONTEXT */ |
|
5301 |
||
5302 |
SETWIN(aGLXWindowId) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5303 |
RETURN (__glx_doRotate(angle, 'z')); |
294 | 5304 |
%} |
5305 |
! |
|
5306 |
||
5307 |
glxScale:arrayOf3Floats in:aGLXWindowId |
|
5308 |
"scale current matrix, given a 3-element vector" |
|
5309 |
||
5310 |
%{ /* NOCONTEXT */ |
|
5311 |
||
5312 |
float vec[3], *v; |
|
5313 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5314 |
if (! (v = __glx_getFloatsFromInto(arrayOf3Floats, vec, 3))) RETURN(false); |
294 | 5315 |
|
5316 |
SETWIN(aGLXWindowId) |
|
5317 |
scale(v[0], v[1], v[2]); |
|
5318 |
RETURN (true); |
|
5319 |
%} |
|
5320 |
! |
|
5321 |
||
5322 |
glxScaleX:x in:aGLXWindowId |
|
5323 |
"scale in x direction" |
|
5324 |
||
5325 |
%{ /* NOCONTEXT */ |
|
5326 |
||
5327 |
float f_x; |
|
5328 |
||
5329 |
_FLOAT_ (x, f_x) |
|
5330 |
SETWIN(aGLXWindowId) |
|
5331 |
scale(f_x, (float)0, (float)0); |
|
5332 |
RETURN (true); |
|
5333 |
%} |
|
5334 |
! |
|
5335 |
||
5336 |
glxScaleX:x y:y z:z in:aGLXWindowId |
|
5337 |
"scale & mirror current matrix, given individual x, y and z values" |
|
5338 |
||
5339 |
%{ /* NOCONTEXT */ |
|
5340 |
||
5341 |
float f_x, f_y, f_z; |
|
5342 |
||
5343 |
_FLOAT_ (x, f_x) |
|
5344 |
_FLOAT_ (y, f_y) |
|
5345 |
_FLOAT_ (z, f_z) |
|
5346 |
SETWIN(aGLXWindowId) |
|
5347 |
scale(f_x, f_y, f_z); |
|
5348 |
RETURN (true); |
|
5349 |
%} |
|
5350 |
! |
|
5351 |
||
5352 |
glxScaleY:y in:aGLXWindowId |
|
5353 |
"scale in y direction" |
|
5354 |
||
5355 |
%{ /* NOCONTEXT */ |
|
5356 |
||
5357 |
float f_y; |
|
5358 |
||
5359 |
_FLOAT_ (y, f_y) |
|
5360 |
SETWIN(aGLXWindowId) |
|
5361 |
scale((float)0, f_y, (float)0); |
|
5362 |
RETURN (true); |
|
5363 |
%} |
|
5364 |
! |
|
5365 |
||
5366 |
glxScaleZ:z in:aGLXWindowId |
|
5367 |
"scale in z direction" |
|
5368 |
||
5369 |
%{ /* NOCONTEXT */ |
|
5370 |
||
5371 |
float f_z; |
|
5372 |
||
5373 |
_FLOAT_ (z, f_z) |
|
5374 |
SETWIN(aGLXWindowId) |
|
5375 |
scale((float)0, (float)0, f_z); |
|
5376 |
RETURN (true); |
|
5377 |
%} |
|
5378 |
! |
|
5379 |
||
5380 |
glxTranslate:arrayOf3Floats in:aGLXWindowId |
|
5381 |
"translate current matrix, given a 3-element vector" |
|
5382 |
||
5383 |
%{ /* NOCONTEXT */ |
|
5384 |
||
5385 |
float vec[3], *v; |
|
5386 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5387 |
if (! (v = __glx_getFloatsFromInto(arrayOf3Floats, vec, 3))) RETURN(false); |
294 | 5388 |
|
5389 |
SETWIN(aGLXWindowId) |
|
5390 |
translate((Coord)(v[0]), (Coord)(v[1]), (Coord)(v[2])); |
|
5391 |
RETURN (true); |
|
5392 |
%} |
|
5393 |
! |
|
5394 |
||
5395 |
glxTranslateX:x in:aGLXWindowId |
|
5396 |
"translate current matrix on X axis" |
|
5397 |
||
5398 |
%{ /* NOCONTEXT */ |
|
5399 |
||
5400 |
Coord c_x; |
|
5401 |
||
5402 |
_COORD_ (x, c_x) |
|
5403 |
SETWIN(aGLXWindowId) |
|
5404 |
translate(c_x, (Coord)0, (Coord)0); |
|
5405 |
RETURN (true); |
|
5406 |
%} |
|
5407 |
! |
|
5408 |
||
5409 |
glxTranslateX:x y:y z:z in:aGLXWindowId |
|
5410 |
"translate current matrix, given individual x, y and z values" |
|
5411 |
||
5412 |
%{ /* NOCONTEXT */ |
|
5413 |
||
5414 |
Coord c_x, c_y, c_z; |
|
5415 |
||
5416 |
_COORD_ (x, c_x) |
|
5417 |
_COORD_ (y, c_y) |
|
5418 |
_COORD_ (z, c_z) |
|
5419 |
SETWIN(aGLXWindowId) |
|
5420 |
translate(c_x, c_y, c_z); |
|
5421 |
RETURN (true); |
|
5422 |
%} |
|
5423 |
! |
|
5424 |
||
5425 |
glxTranslateY:y in:aGLXWindowId |
|
5426 |
"translate current matrix on Y axis" |
|
5427 |
||
5428 |
%{ /* NOCONTEXT */ |
|
5429 |
||
5430 |
Coord c_y; |
|
5431 |
||
5432 |
_COORD_ (y, c_y) |
|
5433 |
SETWIN(aGLXWindowId) |
|
5434 |
translate((Coord)0, c_y, (Coord)0); |
|
5435 |
RETURN (true); |
|
5436 |
%} |
|
5437 |
! |
|
5438 |
||
5439 |
glxTranslateZ:z in:aGLXWindowId |
|
5440 |
"translate current matrix on Z axis" |
|
5441 |
||
5442 |
%{ /* NOCONTEXT */ |
|
5443 |
||
5444 |
Coord c_z; |
|
5445 |
||
5446 |
_COORD_ (z, c_z) |
|
5447 |
SETWIN(aGLXWindowId) |
|
5448 |
translate((Coord)0, (Coord)0, c_z); |
|
5449 |
RETURN (true); |
|
5450 |
%} |
|
5451 |
! ! |
|
5452 |
||
5453 |
!GLXWorkstation methodsFor:'unspecified rest'! |
|
5454 |
||
5455 |
glxAcbufOp:op value:value in:aGLXWindowId |
|
5456 |
||
5457 |
%{ /* NOCONTEXT */ |
|
5458 |
#ifdef GLX |
|
5459 |
SETWIN(aGLXWindowId) |
|
5460 |
acbuf(__intVal(op), _floatVal(value)); |
|
5461 |
RETURN (true); |
|
5462 |
#endif |
|
5463 |
%} |
|
5464 |
. |
|
5465 |
^ false |
|
5466 |
! |
|
5467 |
||
5468 |
glxAcsizePlanes: planes in: aGLXWindowId |
|
5469 |
||
5470 |
%{ /* NOCONTEXT */ |
|
5471 |
#ifdef GLX |
|
5472 |
SETWIN(aGLXWindowId) |
|
5473 |
acsize(__intVal(planes)); |
|
5474 |
RETURN (true); |
|
5475 |
#endif |
|
5476 |
%} |
|
5477 |
. |
|
5478 |
^ false |
|
5479 |
! |
|
5480 |
||
5481 |
glxAfunctionRef: ref func: func in: aGLXWindowId |
|
5482 |
||
5483 |
%{ /* NOCONTEXT */ |
|
5484 |
#ifdef GLX |
|
5485 |
SETWIN(aGLXWindowId) |
|
5486 |
afunction(__intVal(ref), __intVal(func)); |
|
5487 |
RETURN (true); |
|
5488 |
#endif |
|
5489 |
%} |
|
5490 |
. |
|
5491 |
^ false |
|
5492 |
! |
|
5493 |
||
5494 |
glxBbox2Xmin: xmin ymin: ymin x1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
5495 |
||
5496 |
%{ /* NOCONTEXT */ |
|
5497 |
#ifdef GLX |
|
5498 |
Screencoord c_xmin, c_ymin; |
|
5499 |
Coord c_x1, c_y1, c_x2, c_y2; |
|
5500 |
||
5501 |
_SCREENCOORD_ (xmin, c_xmin) |
|
5502 |
_SCREENCOORD_ (ymin, c_ymin) |
|
5503 |
_COORD_ (x1, c_x1) |
|
5504 |
_COORD_ (y1, c_y1) |
|
5505 |
_COORD_ (x2, c_x2) |
|
5506 |
_COORD_ (y2, c_y2) |
|
5507 |
SETWIN(aGLXWindowId) |
|
5508 |
bbox2(c_xmin, c_ymin, c_x1, c_y1, c_x2, c_y2); |
|
5509 |
RETURN (true); |
|
5510 |
#endif |
|
5511 |
%} |
|
5512 |
. |
|
5513 |
^ false |
|
5514 |
! |
|
5515 |
||
5516 |
glxBbox2iXmin: xmin ymin: ymin x1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
5517 |
||
5518 |
%{ /* NOCONTEXT */ |
|
5519 |
#ifdef GLX |
|
5520 |
Screencoord c_xmin, c_ymin; |
|
5521 |
Icoord c_x1, c_y1, c_x2, c_y2; |
|
5522 |
||
5523 |
_SCREENCOORD_ (xmin, c_xmin) |
|
5524 |
_SCREENCOORD_ (ymin, c_ymin) |
|
5525 |
_ICOORD_ (x1, c_x1) |
|
5526 |
_ICOORD_ (y1, c_y1) |
|
5527 |
_ICOORD_ (x2, c_x2) |
|
5528 |
_ICOORD_ (y2, c_y2) |
|
5529 |
SETWIN(aGLXWindowId) |
|
5530 |
bbox2i(c_xmin, c_ymin, c_x1, c_y1, c_x2, c_y2); |
|
5531 |
RETURN (true); |
|
5532 |
#endif |
|
5533 |
%} |
|
5534 |
. |
|
5535 |
^ false |
|
5536 |
! |
|
5537 |
||
5538 |
glxBbox2sXmin: xmin ymin: ymin x1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
5539 |
||
5540 |
%{ /* NOCONTEXT */ |
|
5541 |
#ifdef GLX |
|
5542 |
Screencoord c_xmin, c_ymin; |
|
5543 |
Scoord c_x1, c_y1, c_x2, c_y2; |
|
5544 |
||
5545 |
_SCREENCOORD_ (xmin, c_xmin) |
|
5546 |
_SCREENCOORD_ (ymin, c_ymin) |
|
5547 |
_SCOORD_ (x1, c_x1) |
|
5548 |
_SCOORD_ (y1, c_y1) |
|
5549 |
_SCOORD_ (x2, c_x2) |
|
5550 |
_SCOORD_ (y2, c_y2) |
|
5551 |
SETWIN(aGLXWindowId) |
|
5552 |
bbox2s(c_xmin, c_ymin, c_x1, c_y1, c_x2, c_y2); |
|
5553 |
RETURN (true); |
|
5554 |
#endif |
|
5555 |
%} |
|
5556 |
. |
|
5557 |
^ false |
|
5558 |
! |
|
5559 |
||
5560 |
glxBeginTrimIn: aGLXWindowId |
|
5561 |
||
5562 |
%{ /* NOCONTEXT */ |
|
5563 |
#ifdef GLX |
|
5564 |
SETWIN(aGLXWindowId) |
|
5565 |
bgntrim(); |
|
5566 |
RETURN (true); |
|
5567 |
#endif |
|
5568 |
%} |
|
5569 |
. |
|
5570 |
^ false |
|
5571 |
! |
|
5572 |
||
5573 |
glxBlankscreen: b in: aGLXWindowId |
|
5574 |
||
5575 |
%{ /* NOCONTEXT */ |
|
5576 |
#ifdef GLX |
|
5577 |
SETWIN(aGLXWindowId) |
|
5578 |
blankscreen(_booleanVal(b)); |
|
5579 |
RETURN (true); |
|
5580 |
#endif |
|
5581 |
%} |
|
5582 |
. |
|
5583 |
^ false |
|
5584 |
! |
|
5585 |
||
5586 |
glxBlanktime: count in: aGLXWindowId |
|
5587 |
||
5588 |
%{ /* NOCONTEXT */ |
|
5589 |
#ifdef GLX |
|
5590 |
SETWIN(aGLXWindowId) |
|
5591 |
blanktime(__intVal(count)); |
|
5592 |
RETURN (true); |
|
5593 |
#endif |
|
5594 |
%} |
|
5595 |
. |
|
5596 |
^ false |
|
5597 |
! |
|
5598 |
||
5599 |
glxBlendcolorRed: red green: green blue: blue alpha: alpha in: aGLXWindowId |
|
5600 |
||
5601 |
%{ /* NOCONTEXT */ |
|
5602 |
#ifdef FULL_GLX |
|
5603 |
SETWIN(aGLXWindowId) |
|
5604 |
blendcolor(_floatVal(red), _floatVal(green), _floatVal(blue), _floatVal(alpha)); |
|
5605 |
RETURN (true); |
|
5606 |
#endif |
|
5607 |
%} |
|
5608 |
. |
|
5609 |
^ false |
|
5610 |
! |
|
5611 |
||
5612 |
glxBlendfunctionSfactr: sfactr dfactr: dfactr in: aGLXWindowId |
|
5613 |
||
5614 |
%{ /* NOCONTEXT */ |
|
5615 |
#ifdef GLX |
|
5616 |
SETWIN(aGLXWindowId) |
|
5617 |
blendfunction(__intVal(sfactr), __intVal(dfactr)); |
|
5618 |
RETURN (true); |
|
5619 |
#endif |
|
5620 |
%} |
|
5621 |
. |
|
5622 |
^ false |
|
5623 |
! |
|
5624 |
||
5625 |
glxBlinkRate: rate i: i red: red green: green blue: blue in: aGLXWindowId |
|
5626 |
||
5627 |
%{ /* NOCONTEXT */ |
|
5628 |
#ifdef GLX |
|
5629 |
SETWIN(aGLXWindowId) |
|
5630 |
blink(_shortVal(rate), _colorindexVal(i), |
|
5631 |
_shortVal(red), _shortVal(green), _shortVal(blue)); |
|
5632 |
RETURN (true); |
|
5633 |
#endif |
|
5634 |
%} |
|
5635 |
. |
|
5636 |
^ false |
|
5637 |
! |
|
5638 |
||
5639 |
glxBlkqreadData: data n: n in: aGLXWindowId |
|
5640 |
||
5641 |
%{ /* NOCONTEXT */ |
|
5642 |
#ifdef GLX |
|
5643 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
5644 |
RETURN (__MKSMALLINT(blkqread((short *)_indexedArea(data), __intVal(n)))); |
294 | 5645 |
#endif |
5646 |
%} |
|
5647 |
. |
|
5648 |
^ false |
|
5649 |
! |
|
5650 |
||
5651 |
glxC3f: v in: aGLXWindowId |
|
5652 |
||
5653 |
%{ /* NOCONTEXT */ |
|
5654 |
#ifdef GLX |
|
5655 |
float vec[3], *c_v; |
|
5656 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5657 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 3))) RETURN(false); |
294 | 5658 |
SETWIN(aGLXWindowId) |
5659 |
c3f(c_v); |
|
5660 |
RETURN (true); |
|
5661 |
#endif |
|
5662 |
%} |
|
5663 |
. |
|
5664 |
^ false |
|
5665 |
! |
|
5666 |
||
5667 |
glxC3i: v in: aGLXWindowId |
|
5668 |
||
5669 |
%{ /* NOCONTEXT */ |
|
5670 |
#ifdef GLX |
|
5671 |
long vec[3], *c_v; |
|
5672 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5673 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 3))) RETURN(false); |
294 | 5674 |
SETWIN(aGLXWindowId) |
5675 |
c3i(c_v); |
|
5676 |
RETURN (true); |
|
5677 |
#endif |
|
5678 |
%} |
|
5679 |
. |
|
5680 |
^ false |
|
5681 |
! |
|
5682 |
||
5683 |
glxC3s: v in: aGLXWindowId |
|
5684 |
||
5685 |
%{ /* NOCONTEXT */ |
|
5686 |
#ifdef GLX |
|
5687 |
short vec[3], *c_v; |
|
5688 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5689 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 3))) RETURN(false); |
294 | 5690 |
SETWIN(aGLXWindowId) |
5691 |
c3s(c_v); |
|
5692 |
RETURN (true); |
|
5693 |
#endif |
|
5694 |
%} |
|
5695 |
. |
|
5696 |
^ false |
|
5697 |
! |
|
5698 |
||
5699 |
glxC4f: v in: aGLXWindowId |
|
5700 |
||
5701 |
%{ /* NOCONTEXT */ |
|
5702 |
#ifdef GLX |
|
5703 |
float vec[4], *c_v; |
|
5704 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5705 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 4))) RETURN(false); |
294 | 5706 |
SETWIN(aGLXWindowId) |
5707 |
c4f(c_v); |
|
5708 |
RETURN (true); |
|
5709 |
#endif |
|
5710 |
%} |
|
5711 |
. |
|
5712 |
^ false |
|
5713 |
! |
|
5714 |
||
5715 |
glxC4i: v in: aGLXWindowId |
|
5716 |
||
5717 |
%{ /* NOCONTEXT */ |
|
5718 |
#ifdef GLX |
|
5719 |
long vec[4], *c_v; |
|
5720 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5721 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 4))) RETURN(false); |
294 | 5722 |
SETWIN(aGLXWindowId) |
5723 |
c4i(c_v); |
|
5724 |
RETURN (true); |
|
5725 |
#endif |
|
5726 |
%} |
|
5727 |
. |
|
5728 |
^ false |
|
5729 |
! |
|
5730 |
||
5731 |
glxC4s: v in: aGLXWindowId |
|
5732 |
||
5733 |
%{ /* NOCONTEXT */ |
|
5734 |
#ifdef GLX |
|
5735 |
short vec[4], *c_v; |
|
5736 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5737 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 4))) RETURN(false); |
294 | 5738 |
SETWIN(aGLXWindowId) |
5739 |
c4s(c_v); |
|
5740 |
RETURN (true); |
|
5741 |
#endif |
|
5742 |
%} |
|
5743 |
. |
|
5744 |
^ false |
|
5745 |
! |
|
5746 |
||
5747 |
glxClearhitcodeIn: aGLXWindowId |
|
5748 |
||
5749 |
%{ /* NOCONTEXT */ |
|
5750 |
#ifdef GLX |
|
5751 |
SETWIN(aGLXWindowId) |
|
5752 |
clearhitcode(); |
|
5753 |
RETURN (true); |
|
5754 |
#endif |
|
5755 |
%} |
|
5756 |
. |
|
5757 |
^ false |
|
5758 |
! |
|
5759 |
||
5760 |
glxClipplaneIndex: index mode: mode params: params in: aGLXWindowId |
|
5761 |
||
5762 |
%{ /* NOCONTEXT */ |
|
5763 |
#ifdef GLX |
|
5764 |
float vec[4], *v; |
|
5765 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5766 |
if (! (v = __glx_getFloatsFromInto(params, vec, 4))) RETURN(false); |
294 | 5767 |
SETWIN(aGLXWindowId) |
5768 |
clipplane(__intVal(index), __intVal(mode), v); |
|
5769 |
RETURN (true); |
|
5770 |
#endif |
|
5771 |
%} |
|
5772 |
. |
|
5773 |
^ false |
|
5774 |
! |
|
5775 |
||
5776 |
glxCmodeIn: aGLXWindowId |
|
5777 |
||
5778 |
%{ /* NOCONTEXT */ |
|
5779 |
#ifdef GLX |
|
5780 |
SETWIN(aGLXWindowId) |
|
5781 |
cmode(); |
|
5782 |
RETURN (true); |
|
5783 |
#endif |
|
5784 |
%} |
|
5785 |
. |
|
5786 |
^ false |
|
5787 |
! |
|
5788 |
||
5789 |
glxColorfIndex: index in: aGLXWindowId |
|
5790 |
||
5791 |
^self glxColor: index in: aGLXWindowId |
|
5792 |
! |
|
5793 |
||
5794 |
glxCuroriginN: n xorigin: xorigin yorigin: yorigin in: aGLXWindowId |
|
5795 |
||
5796 |
%{ /* NOCONTEXT */ |
|
5797 |
#ifdef GLX |
|
5798 |
SETWIN(aGLXWindowId) |
|
5799 |
curorigin(_shortVal(n), _shortVal(xorigin), _shortVal(yorigin)); |
|
5800 |
RETURN (true); |
|
5801 |
#endif |
|
5802 |
%} |
|
5803 |
. |
|
5804 |
^ false |
|
5805 |
! |
|
5806 |
||
5807 |
glxCursoffIn: aGLXWindowId |
|
5808 |
||
5809 |
%{ /* NOCONTEXT */ |
|
5810 |
#ifdef GLX |
|
5811 |
SETWIN(aGLXWindowId) |
|
5812 |
cursoff(); |
|
5813 |
RETURN (true); |
|
5814 |
#endif |
|
5815 |
%} |
|
5816 |
. |
|
5817 |
^ false |
|
5818 |
! |
|
5819 |
||
5820 |
glxCursonIn: aGLXWindowId |
|
5821 |
||
5822 |
%{ /* NOCONTEXT */ |
|
5823 |
#ifdef GLX |
|
5824 |
SETWIN(aGLXWindowId) |
|
5825 |
curson(); |
|
5826 |
RETURN (true); |
|
5827 |
#endif |
|
5828 |
%} |
|
5829 |
. |
|
5830 |
^ false |
|
5831 |
! |
|
5832 |
||
5833 |
glxCurstype: type in: aGLXWindowId |
|
5834 |
||
5835 |
%{ /* NOCONTEXT */ |
|
5836 |
#ifdef GLX |
|
5837 |
SETWIN(aGLXWindowId) |
|
5838 |
curstype(__intVal(type)); |
|
5839 |
RETURN (true); |
|
5840 |
#endif |
|
5841 |
%} |
|
5842 |
. |
|
5843 |
^ false |
|
5844 |
! |
|
5845 |
||
5846 |
glxCyclemapDuration: duration map: map nxtmap: nxtmap in: aGLXWindowId |
|
5847 |
||
5848 |
%{ /* NOCONTEXT */ |
|
5849 |
#ifdef GLX |
|
5850 |
SETWIN(aGLXWindowId) |
|
5851 |
cyclemap(_shortVal(duration), _shortVal(map), _shortVal(nxtmap)); |
|
5852 |
RETURN (true); |
|
5853 |
#endif |
|
5854 |
%} |
|
5855 |
. |
|
5856 |
^ false |
|
5857 |
! |
|
5858 |
||
5859 |
glxDefpatternN: n size: size mask: mask in: aGLXWindowId |
|
5860 |
||
5861 |
%{ /* NOCONTEXT */ |
|
5862 |
#ifdef GLX |
|
5863 |
SETWIN(aGLXWindowId) |
|
5864 |
defpattern(_shortVal(n), _shortVal(size), (unsigned short *)_indexedArea(mask)); |
|
5865 |
RETURN (true); |
|
5866 |
#endif |
|
5867 |
%} |
|
5868 |
. |
|
5869 |
^ false |
|
5870 |
! |
|
5871 |
||
5872 |
glxDeltag: t in: aGLXWindowId |
|
5873 |
||
5874 |
%{ /* NOCONTEXT */ |
|
5875 |
#ifdef GLX |
|
5876 |
SETWIN(aGLXWindowId) |
|
5877 |
deltag(_tagVal(t)); |
|
5878 |
RETURN (true); |
|
5879 |
#endif |
|
5880 |
%} |
|
5881 |
. |
|
5882 |
^ false |
|
5883 |
! |
|
5884 |
||
5885 |
glxDepthcueMode: mode in: aGLXWindowId |
|
5886 |
||
5887 |
%{ /* NOCONTEXT */ |
|
5888 |
#ifdef GLX |
|
5889 |
SETWIN(aGLXWindowId) |
|
5890 |
depthcue(_booleanVal(mode)); |
|
5891 |
RETURN (true); |
|
5892 |
#endif |
|
5893 |
%} |
|
5894 |
. |
|
5895 |
^ false |
|
5896 |
! |
|
5897 |
||
5898 |
glxDitherMode: mode in: aGLXWindowId |
|
5899 |
||
5900 |
%{ /* NOCONTEXT */ |
|
5901 |
#ifdef GLX |
|
5902 |
SETWIN(aGLXWindowId) |
|
5903 |
dither(_longVal(mode)); |
|
5904 |
RETURN (true); |
|
5905 |
#endif |
|
5906 |
%} |
|
5907 |
. |
|
5908 |
^ false |
|
5909 |
! |
|
5910 |
||
5911 |
glxDopup: pup in: aGLXWindowId |
|
5912 |
||
5913 |
%{ /* NOCONTEXT */ |
|
5914 |
#ifdef GLX |
|
5915 |
SETWIN(aGLXWindowId) |
|
5916 |
dopup(_longVal(pup)); |
|
5917 |
RETURN (true); |
|
5918 |
#endif |
|
5919 |
%} |
|
5920 |
. |
|
5921 |
^ false |
|
5922 |
! |
|
5923 |
||
5924 |
glxDrawmode: mode in: aGLXWindowId |
|
5925 |
||
5926 |
%{ /* NOCONTEXT */ |
|
5927 |
#ifdef GLX |
|
5928 |
SETWIN(aGLXWindowId) |
|
5929 |
drawmode(_longVal(mode)); |
|
5930 |
RETURN (true); |
|
5931 |
#endif |
|
5932 |
%} |
|
5933 |
. |
|
5934 |
^ false |
|
5935 |
! |
|
5936 |
||
5937 |
glxEditobj: obj in: aGLXWindowId |
|
5938 |
||
5939 |
%{ /* NOCONTEXT */ |
|
5940 |
#ifdef GLX |
|
5941 |
SETWIN(aGLXWindowId) |
|
5942 |
editobj(_objectVal(obj)); |
|
5943 |
RETURN (true); |
|
5944 |
#endif |
|
5945 |
%} |
|
5946 |
. |
|
5947 |
^ false |
|
5948 |
! |
|
5949 |
||
5950 |
glxEndTrimIn: aGLXWindowId |
|
5951 |
||
5952 |
%{ /* NOCONTEXT */ |
|
5953 |
#ifdef GLX |
|
5954 |
SETWIN(aGLXWindowId) |
|
5955 |
endtrim(); |
|
5956 |
RETURN (true); |
|
5957 |
#endif |
|
5958 |
%} |
|
5959 |
. |
|
5960 |
^ false |
|
5961 |
! |
|
5962 |
||
5963 |
glxEndfullscrnIn: aGLXWindowId |
|
5964 |
||
5965 |
%{ /* NOCONTEXT */ |
|
5966 |
#ifdef GLX |
|
5967 |
SETWIN(aGLXWindowId) |
|
5968 |
endfullscrn(); |
|
5969 |
RETURN (true); |
|
5970 |
#endif |
|
5971 |
%} |
|
5972 |
. |
|
5973 |
^ false |
|
5974 |
! |
|
5975 |
||
5976 |
glxEndpupmodeIn: aGLXWindowId |
|
5977 |
||
5978 |
%{ /* NOCONTEXT */ |
|
5979 |
#ifdef GLX |
|
5980 |
SETWIN(aGLXWindowId) |
|
5981 |
endpupmode(); |
|
5982 |
RETURN (true); |
|
5983 |
#endif |
|
5984 |
%} |
|
5985 |
. |
|
5986 |
^ false |
|
5987 |
! |
|
5988 |
||
5989 |
glxFinishIn: aGLXWindowId |
|
5990 |
||
5991 |
%{ /* NOCONTEXT */ |
|
5992 |
#ifdef GLX |
|
5993 |
SETWIN(aGLXWindowId) |
|
5994 |
finish(); |
|
5995 |
RETURN (true); |
|
5996 |
#endif |
|
5997 |
%} |
|
5998 |
. |
|
5999 |
^ false |
|
6000 |
! |
|
6001 |
||
6002 |
glxFont: fntnum in: aGLXWindowId |
|
6003 |
||
6004 |
%{ /* NOCONTEXT */ |
|
6005 |
SETWIN(aGLXWindowId) |
|
6006 |
font(_shortVal(fntnum)); |
|
6007 |
RETURN (true); |
|
6008 |
%} |
|
6009 |
! |
|
6010 |
||
6011 |
glxForegroundIn: aGLXWindowId |
|
6012 |
||
6013 |
%{ /* NOCONTEXT */ |
|
6014 |
SETWIN(aGLXWindowId) |
|
6015 |
foreground(); |
|
6016 |
RETURN (true); |
|
6017 |
%} |
|
6018 |
! |
|
6019 |
||
6020 |
glxFreepup: pup in: aGLXWindowId |
|
6021 |
||
6022 |
%{ /* NOCONTEXT */ |
|
6023 |
#ifdef GLX |
|
6024 |
SETWIN(aGLXWindowId) |
|
6025 |
freepup(_longVal(pup)); |
|
6026 |
RETURN (true); |
|
6027 |
#endif |
|
6028 |
%} |
|
6029 |
. |
|
6030 |
^ false |
|
6031 |
! |
|
6032 |
||
6033 |
glxFudgeXfudge: xfudge yfudge: yfudge in: aGLXWindowId |
|
6034 |
||
6035 |
%{ /* NOCONTEXT */ |
|
6036 |
#ifdef GLX |
|
6037 |
SETWIN(aGLXWindowId) |
|
6038 |
fudge(_longVal(xfudge), _longVal(yfudge)); |
|
6039 |
RETURN (true); |
|
6040 |
#endif |
|
6041 |
%} |
|
6042 |
. |
|
6043 |
^ false |
|
6044 |
! |
|
6045 |
||
6046 |
glxFullscrnIn: aGLXWindowId |
|
6047 |
||
6048 |
%{ /* NOCONTEXT */ |
|
6049 |
#ifdef GLX |
|
6050 |
SETWIN(aGLXWindowId) |
|
6051 |
fullscrn(); |
|
6052 |
RETURN (true); |
|
6053 |
#endif |
|
6054 |
%} |
|
6055 |
. |
|
6056 |
^ false |
|
6057 |
! |
|
6058 |
||
6059 |
glxGbeginIn: aGLXWindowId |
|
6060 |
||
6061 |
%{ /* NOCONTEXT */ |
|
6062 |
#ifdef GLX |
|
6063 |
SETWIN(aGLXWindowId) |
|
6064 |
gbegin(); |
|
6065 |
RETURN (true); |
|
6066 |
#endif |
|
6067 |
%} |
|
6068 |
. |
|
6069 |
^ false |
|
6070 |
! |
|
6071 |
||
6072 |
glxGentagIn: aGLXWindowId |
|
6073 |
||
6074 |
%{ /* NOCONTEXT */ |
|
6075 |
#ifdef GLX |
|
6076 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6077 |
RETURN (__MKSMALLINT(gentag())); |
294 | 6078 |
#endif |
6079 |
%} |
|
6080 |
. |
|
6081 |
^ false |
|
6082 |
! |
|
6083 |
||
6084 |
glxGetbackfaceIn: aGLXWindowId |
|
6085 |
||
6086 |
%{ /* NOCONTEXT */ |
|
6087 |
#ifdef GLX |
|
6088 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6089 |
RETURN (__MKSMALLINT(getbackface())); |
294 | 6090 |
#endif |
6091 |
%} |
|
6092 |
. |
|
6093 |
^ false |
|
6094 |
! |
|
6095 |
||
6096 |
glxGetbufferIn: aGLXWindowId |
|
6097 |
||
6098 |
%{ /* NOCONTEXT */ |
|
6099 |
#ifdef GLX |
|
6100 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6101 |
RETURN (__MKSMALLINT(getbuffer())); |
294 | 6102 |
#endif |
6103 |
%} |
|
6104 |
. |
|
6105 |
^ false |
|
6106 |
! |
|
6107 |
||
6108 |
glxGetbutton: num in: aGLXWindowId |
|
6109 |
||
6110 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
6111 |
#ifndef OPENGL |
294 | 6112 |
SETWIN(aGLXWindowId) |
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6113 |
RETURN (__MKSMALLINT(getbutton(_deviceVal(num)))); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
6114 |
#endif |
294 | 6115 |
%} |
6116 |
! |
|
6117 |
||
6118 |
glxGetcmmodeIn: aGLXWindowId |
|
6119 |
||
6120 |
%{ /* NOCONTEXT */ |
|
6121 |
#ifdef GLX |
|
6122 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6123 |
RETURN (__MKBOOLEAN(getcmmode())); |
294 | 6124 |
#endif |
6125 |
%} |
|
6126 |
. |
|
6127 |
^ false |
|
6128 |
! |
|
6129 |
||
6130 |
glxGetcolorIn: aGLXWindowId |
|
6131 |
"return the current drawing color" |
|
6132 |
||
6133 |
%{ /* NOCONTEXT */ |
|
6134 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6135 |
RETURN (__MKSMALLINT(getcolor())); |
294 | 6136 |
%} |
6137 |
! |
|
6138 |
||
6139 |
glxGetdcmIn: aGLXWindowId |
|
6140 |
||
6141 |
%{ /* NOCONTEXT */ |
|
6142 |
#ifdef GLX |
|
6143 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6144 |
RETURN (__MKBOOLEAN(getdcm())); |
294 | 6145 |
#endif |
6146 |
%} |
|
6147 |
. |
|
6148 |
^ false |
|
6149 |
! |
|
6150 |
||
6151 |
glxGetdescenderIn: aGLXWindowId |
|
6152 |
||
6153 |
%{ /* NOCONTEXT */ |
|
6154 |
#ifdef GLX |
|
6155 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6156 |
RETURN (__MKSMALLINT(getdescender())); |
294 | 6157 |
#endif |
6158 |
%} |
|
6159 |
. |
|
6160 |
^ false |
|
6161 |
! |
|
6162 |
||
6163 |
glxGetdisplaymodeIn: aGLXWindowId |
|
6164 |
||
6165 |
%{ /* NOCONTEXT */ |
|
6166 |
#ifdef GLX |
|
6167 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6168 |
RETURN (__MKSMALLINT(getdisplaymode())); |
294 | 6169 |
#endif |
6170 |
%} |
|
6171 |
. |
|
6172 |
^ false |
|
6173 |
! |
|
6174 |
||
6175 |
glxGetdrawmodeIn: aGLXWindowId |
|
6176 |
||
6177 |
%{ /* NOCONTEXT */ |
|
6178 |
#ifdef GLX |
|
6179 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6180 |
RETURN (__MKSMALLINT(getdrawmode())); |
294 | 6181 |
#endif |
6182 |
%} |
|
6183 |
. |
|
6184 |
^ false |
|
6185 |
! |
|
6186 |
||
6187 |
glxGetfontIn: aGLXWindowId |
|
6188 |
||
6189 |
%{ /* NOCONTEXT */ |
|
6190 |
#ifdef GLX |
|
6191 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6192 |
RETURN (__MKSMALLINT(getfont())); |
294 | 6193 |
#endif |
6194 |
%} |
|
6195 |
. |
|
6196 |
^ false |
|
6197 |
! |
|
6198 |
||
6199 |
glxGetgconfigBuffer: buffer in: aGLXWindowId |
|
6200 |
||
6201 |
%{ /* NOCONTEXT */ |
|
6202 |
#ifdef FULL_GLX |
|
6203 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6204 |
RETURN (__MKSMALLINT(getgconfig(_longVal(buffer)))); |
294 | 6205 |
#endif |
6206 |
%} |
|
6207 |
. |
|
6208 |
^ false |
|
6209 |
! |
|
6210 |
||
6211 |
glxGetgdescInquiry: inquiry in: aGLXWindowId |
|
6212 |
||
6213 |
%{ /* NOCONTEXT */ |
|
6214 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6215 |
RETURN (__MKSMALLINT(getgdesc(_longVal(inquiry)))); |
294 | 6216 |
%} |
6217 |
! |
|
6218 |
||
6219 |
glxGetheightIn: aGLXWindowId |
|
6220 |
||
6221 |
%{ /* NOCONTEXT */ |
|
6222 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6223 |
RETURN (__MKSMALLINT(getheight())); |
294 | 6224 |
%} |
6225 |
! |
|
6226 |
||
6227 |
glxGethitcodeIn: aGLXWindowId |
|
6228 |
||
6229 |
%{ /* NOCONTEXT */ |
|
6230 |
#ifdef GLX |
|
6231 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6232 |
RETURN (__MKSMALLINT(gethitcode())); |
294 | 6233 |
#endif |
6234 |
%} |
|
6235 |
. |
|
6236 |
^ false |
|
6237 |
! |
|
6238 |
||
6239 |
glxGetlsbackupIn: aGLXWindowId |
|
6240 |
||
6241 |
%{ /* NOCONTEXT */ |
|
6242 |
#ifdef GLX |
|
6243 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6244 |
RETURN (__MKBOOLEAN(getlsbackup())); |
294 | 6245 |
#endif |
6246 |
%} |
|
6247 |
. |
|
6248 |
^ false |
|
6249 |
! |
|
6250 |
||
6251 |
glxGetlsrepeatIn: aGLXWindowId |
|
6252 |
||
6253 |
%{ /* NOCONTEXT */ |
|
6254 |
#ifdef GLX |
|
6255 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6256 |
RETURN (__MKSMALLINT(getlsrepeat())); |
294 | 6257 |
#endif |
6258 |
%} |
|
6259 |
. |
|
6260 |
^ false |
|
6261 |
! |
|
6262 |
||
6263 |
glxGetlstyleIn: aGLXWindowId |
|
6264 |
||
6265 |
%{ /* NOCONTEXT */ |
|
6266 |
#ifdef GLX |
|
6267 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6268 |
RETURN (__MKSMALLINT(getlstyle())); |
294 | 6269 |
#endif |
6270 |
%} |
|
6271 |
. |
|
6272 |
^ false |
|
6273 |
! |
|
6274 |
||
6275 |
glxGetlwidthIn: aGLXWindowId |
|
6276 |
||
6277 |
%{ /* NOCONTEXT */ |
|
6278 |
#ifdef GLX |
|
6279 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6280 |
RETURN (__MKSMALLINT(getlwidth())); |
294 | 6281 |
#endif |
6282 |
%} |
|
6283 |
. |
|
6284 |
^ false |
|
6285 |
! |
|
6286 |
||
6287 |
glxGetmapIn: aGLXWindowId |
|
6288 |
||
6289 |
%{ /* NOCONTEXT */ |
|
6290 |
#ifdef GLX |
|
6291 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6292 |
RETURN (__MKSMALLINT(getmap())); |
294 | 6293 |
#endif |
6294 |
%} |
|
6295 |
. |
|
6296 |
^ false |
|
6297 |
! |
|
6298 |
||
6299 |
glxGetmmodeIn: aGLXWindowId |
|
6300 |
||
6301 |
%{ /* NOCONTEXT */ |
|
6302 |
#ifdef GLX |
|
6303 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6304 |
RETURN (__MKSMALLINT(getmmode())); |
294 | 6305 |
#endif |
6306 |
%} |
|
6307 |
. |
|
6308 |
^ false |
|
6309 |
! |
|
6310 |
||
6311 |
glxGetmonitorIn: aGLXWindowId |
|
6312 |
||
6313 |
%{ /* NOCONTEXT */ |
|
6314 |
#ifdef GLX |
|
6315 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6316 |
RETURN (__MKSMALLINT(getmonitor())); |
294 | 6317 |
#endif |
6318 |
%} |
|
6319 |
. |
|
6320 |
^ false |
|
6321 |
! |
|
6322 |
||
6323 |
glxGetmultisampleIn: aGLXWindowId |
|
6324 |
||
6325 |
%{ /* NOCONTEXT */ |
|
6326 |
#ifdef FULL_GLX |
|
6327 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6328 |
RETURN (__MKBOOLEAN(getmultisample())); |
294 | 6329 |
#endif |
6330 |
%} |
|
6331 |
. |
|
6332 |
^ false |
|
6333 |
! |
|
6334 |
||
6335 |
glxGetothermonitorIn: aGLXWindowId |
|
6336 |
||
6337 |
%{ /* NOCONTEXT */ |
|
6338 |
#ifdef GLX |
|
6339 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6340 |
RETURN (__MKSMALLINT(getothermonitor())); |
294 | 6341 |
#endif |
6342 |
%} |
|
6343 |
. |
|
6344 |
^ false |
|
6345 |
! |
|
6346 |
||
6347 |
glxGetpatternIn: aGLXWindowId |
|
6348 |
||
6349 |
%{ /* NOCONTEXT */ |
|
6350 |
#ifdef GLX |
|
6351 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6352 |
RETURN (__MKSMALLINT(getpattern())); |
294 | 6353 |
#endif |
6354 |
%} |
|
6355 |
. |
|
6356 |
^ false |
|
6357 |
! |
|
6358 |
||
6359 |
glxGetresetlsIn: aGLXWindowId |
|
6360 |
||
6361 |
%{ /* NOCONTEXT */ |
|
6362 |
#ifdef GLX |
|
6363 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6364 |
RETURN (__MKBOOLEAN(getresetls())); |
294 | 6365 |
#endif |
6366 |
%} |
|
6367 |
. |
|
6368 |
^ false |
|
6369 |
! |
|
6370 |
||
6371 |
glxGetshadeIn: aGLXWindowId |
|
6372 |
||
6373 |
%{ /* NOCONTEXT */ |
|
6374 |
#ifdef GLX |
|
6375 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6376 |
RETURN (__MKSMALLINT(getshade())); |
294 | 6377 |
#endif |
6378 |
%} |
|
6379 |
. |
|
6380 |
^ false |
|
6381 |
! |
|
6382 |
||
6383 |
glxGetsmIn: aGLXWindowId |
|
6384 |
||
6385 |
%{ /* NOCONTEXT */ |
|
6386 |
#ifdef GLX |
|
6387 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6388 |
RETURN (__MKSMALLINT(getsm())); |
294 | 6389 |
#endif |
6390 |
%} |
|
6391 |
. |
|
6392 |
^ false |
|
6393 |
! |
|
6394 |
||
6395 |
glxGetvaluator: dev in: aGLXWindowId |
|
6396 |
||
6397 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
6398 |
#ifndef OPENGL |
294 | 6399 |
SETWIN(aGLXWindowId) |
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6400 |
RETURN (__MKSMALLINT(getvaluator(_deviceVal(dev)))); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
6401 |
#endif |
294 | 6402 |
%} |
6403 |
. |
|
6404 |
^ false |
|
6405 |
! |
|
6406 |
||
6407 |
glxGetvideo: reg in: aGLXWindowId |
|
6408 |
||
6409 |
%{ /* NOCONTEXT */ |
|
6410 |
#ifdef GLX |
|
6411 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6412 |
RETURN (__MKSMALLINT(getvideo(_longVal(reg)))); |
294 | 6413 |
#endif |
6414 |
%} |
|
6415 |
. |
|
6416 |
^ false |
|
6417 |
! |
|
6418 |
||
6419 |
glxGetwritemaskIn: aGLXWindowId |
|
6420 |
||
6421 |
%{ /* NOCONTEXT */ |
|
6422 |
#ifdef GLX |
|
6423 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6424 |
RETURN (__MKSMALLINT(getwritemask())); |
294 | 6425 |
#endif |
6426 |
%} |
|
6427 |
. |
|
6428 |
^ false |
|
6429 |
! |
|
6430 |
||
6431 |
glxGetwscrnIn: aGLXWindowId |
|
6432 |
||
6433 |
%{ /* NOCONTEXT */ |
|
6434 |
#ifdef GLX |
|
6435 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6436 |
RETURN (__MKSMALLINT(getwscrn())); |
294 | 6437 |
#endif |
6438 |
%} |
|
6439 |
. |
|
6440 |
^ false |
|
6441 |
! |
|
6442 |
||
6443 |
glxGetzbufferIn: aGLXWindowId |
|
6444 |
||
6445 |
%{ /* NOCONTEXT */ |
|
6446 |
#ifdef GLX |
|
6447 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6448 |
RETURN (__MKBOOLEAN(getzbuffer())); |
294 | 6449 |
#endif |
6450 |
%} |
|
6451 |
. |
|
6452 |
^ false |
|
6453 |
! |
|
6454 |
||
6455 |
glxGexitIn: aGLXWindowId |
|
6456 |
||
6457 |
%{ /* NOCONTEXT */ |
|
6458 |
#ifdef GLX |
|
6459 |
SETWIN(aGLXWindowId) |
|
6460 |
gexit(); |
|
6461 |
RETURN (true); |
|
6462 |
#endif |
|
6463 |
%} |
|
6464 |
. |
|
6465 |
^ false |
|
6466 |
! |
|
6467 |
||
6468 |
glxGflushIn: aGLXWindowId |
|
6469 |
||
6470 |
%{ /* NOCONTEXT */ |
|
6471 |
#ifdef GLX |
|
6472 |
SETWIN(aGLXWindowId) |
|
6473 |
gflush(); |
|
6474 |
RETURN (true); |
|
6475 |
#endif |
|
6476 |
%} |
|
6477 |
. |
|
6478 |
^ false |
|
6479 |
! |
|
6480 |
||
6481 |
glxGinitIn: aGLXWindowId |
|
6482 |
||
6483 |
%{ /* NOCONTEXT */ |
|
6484 |
#ifdef GLX |
|
6485 |
SETWIN(aGLXWindowId) |
|
6486 |
ginit(); |
|
6487 |
RETURN (true); |
|
6488 |
#endif |
|
6489 |
%} |
|
6490 |
. |
|
6491 |
^ false |
|
6492 |
! |
|
6493 |
||
6494 |
glxGlcompatMode: mode value: value in: aGLXWindowId |
|
6495 |
||
6496 |
%{ /* NOCONTEXT */ |
|
6497 |
#ifdef GLX |
|
6498 |
SETWIN(aGLXWindowId) |
|
6499 |
glcompat(_longVal(mode), _longVal(value)); |
|
6500 |
RETURN (true); |
|
6501 |
#endif |
|
6502 |
%} |
|
6503 |
. |
|
6504 |
^ false |
|
6505 |
! |
|
6506 |
||
6507 |
glxGresetIn: aGLXWindowId |
|
6508 |
||
6509 |
%{ /* NOCONTEXT */ |
|
6510 |
#ifdef GLX |
|
6511 |
SETWIN(aGLXWindowId) |
|
6512 |
greset(); |
|
6513 |
RETURN (true); |
|
6514 |
#endif |
|
6515 |
%} |
|
6516 |
. |
|
6517 |
^ false |
|
6518 |
! |
|
6519 |
||
6520 |
glxGsyncIn: aGLXWindowId |
|
6521 |
||
6522 |
%{ /* NOCONTEXT */ |
|
6523 |
#ifdef GLX |
|
6524 |
SETWIN(aGLXWindowId) |
|
6525 |
gsync(); |
|
6526 |
RETURN (true); |
|
6527 |
#endif |
|
6528 |
%} |
|
6529 |
. |
|
6530 |
^ false |
|
6531 |
! |
|
6532 |
||
6533 |
glxIconsizeX: x y: y in: aGLXWindowId |
|
6534 |
||
6535 |
%{ /* NOCONTEXT */ |
|
6536 |
#ifdef GLX |
|
6537 |
SETWIN(aGLXWindowId) |
|
6538 |
iconsize(_longVal(x), _longVal(y)); |
|
6539 |
RETURN (true); |
|
6540 |
#endif |
|
6541 |
%} |
|
6542 |
. |
|
6543 |
^ false |
|
6544 |
! |
|
6545 |
||
6546 |
glxImakebackgroundIn: aGLXWindowId |
|
6547 |
||
6548 |
%{ /* NOCONTEXT */ |
|
6549 |
#ifdef GLX |
|
6550 |
SETWIN(aGLXWindowId) |
|
6551 |
imakebackground(); |
|
6552 |
RETURN (true); |
|
6553 |
#endif |
|
6554 |
%} |
|
6555 |
. |
|
6556 |
^ false |
|
6557 |
! |
|
6558 |
||
6559 |
glxInitnamesIn: aGLXWindowId |
|
6560 |
||
6561 |
%{ /* NOCONTEXT */ |
|
6562 |
#ifdef GLX |
|
6563 |
SETWIN(aGLXWindowId) |
|
6564 |
initnames(); |
|
6565 |
RETURN (true); |
|
6566 |
#endif |
|
6567 |
%} |
|
6568 |
. |
|
6569 |
^ false |
|
6570 |
! |
|
6571 |
||
6572 |
glxIsqueued: dev in: aGLXWindowId |
|
6573 |
||
6574 |
%{ /* NOCONTEXT */ |
|
6575 |
#ifdef GLX |
|
6576 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6577 |
RETURN (__MKBOOLEAN(isqueued(_deviceVal(dev)))); |
294 | 6578 |
#endif |
6579 |
%} |
|
6580 |
. |
|
6581 |
^ false |
|
6582 |
! |
|
6583 |
||
6584 |
glxIstag: t in: aGLXWindowId |
|
6585 |
||
6586 |
%{ /* NOCONTEXT */ |
|
6587 |
#ifdef GLX |
|
6588 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6589 |
RETURN (__MKBOOLEAN(istag(_tagVal(t)))); |
294 | 6590 |
#endif |
6591 |
%} |
|
6592 |
. |
|
6593 |
^ false |
|
6594 |
! |
|
6595 |
||
6596 |
glxKeepaspectX: x y: y in: aGLXWindowId |
|
6597 |
||
6598 |
%{ /* NOCONTEXT */ |
|
6599 |
#ifdef GLX |
|
6600 |
SETWIN(aGLXWindowId) |
|
6601 |
keepaspect(_longVal(x), _longVal(y)); |
|
6602 |
RETURN (true); |
|
6603 |
#endif |
|
6604 |
%} |
|
6605 |
. |
|
6606 |
^ false |
|
6607 |
! |
|
6608 |
||
6609 |
glxLinesmoothMode: mode in: aGLXWindowId |
|
6610 |
||
6611 |
%{ /* NOCONTEXT */ |
|
6612 |
#ifdef GLX |
|
6613 |
SETWIN(aGLXWindowId) |
|
6614 |
linesmooth((ulong)__intVal(mode)); |
|
6615 |
RETURN (true); |
|
6616 |
#endif |
|
6617 |
%} |
|
6618 |
. |
|
6619 |
^ false |
|
6620 |
! |
|
6621 |
||
6622 |
glxLmcolorMode: mode in: aGLXWindowId |
|
6623 |
||
6624 |
%{ /* NOCONTEXT */ |
|
6625 |
#ifdef GLX |
|
6626 |
SETWIN(aGLXWindowId) |
|
6627 |
lmcolor(_longVal(mode)); |
|
6628 |
RETURN (true); |
|
6629 |
#endif |
|
6630 |
%} |
|
6631 |
. |
|
6632 |
^ false |
|
6633 |
! |
|
6634 |
||
6635 |
glxLoadname: name in: aGLXWindowId |
|
6636 |
||
6637 |
%{ /* NOCONTEXT */ |
|
6638 |
#ifdef GLX |
|
6639 |
SETWIN(aGLXWindowId) |
|
6640 |
loadname(_shortVal(name)); |
|
6641 |
RETURN (true); |
|
6642 |
#endif |
|
6643 |
%} |
|
6644 |
. |
|
6645 |
^ false |
|
6646 |
! |
|
6647 |
||
6648 |
glxLogicop: opcode in: aGLXWindowId |
|
6649 |
||
6650 |
%{ /* NOCONTEXT */ |
|
6651 |
#ifdef GLX |
|
6652 |
SETWIN(aGLXWindowId) |
|
6653 |
logicop(_longVal(opcode)); |
|
6654 |
RETURN (true); |
|
6655 |
#endif |
|
6656 |
%} |
|
6657 |
. |
|
6658 |
^ false |
|
6659 |
! |
|
6660 |
||
6661 |
glxLsbackup: b in: aGLXWindowId |
|
6662 |
||
6663 |
%{ /* NOCONTEXT */ |
|
6664 |
#ifdef GLX |
|
6665 |
SETWIN(aGLXWindowId) |
|
6666 |
lsbackup(_booleanVal(b)); |
|
6667 |
RETURN (true); |
|
6668 |
#endif |
|
6669 |
%} |
|
6670 |
. |
|
6671 |
^ false |
|
6672 |
! |
|
6673 |
||
6674 |
glxLsetdepthNear: near far: far in: aGLXWindowId |
|
6675 |
||
6676 |
%{ /* NOCONTEXT */ |
|
6677 |
#ifdef GLX |
|
6678 |
SETWIN(aGLXWindowId) |
|
6679 |
lsetdepth(_longVal(near), _longVal(far)); |
|
6680 |
RETURN (true); |
|
6681 |
#endif |
|
6682 |
%} |
|
6683 |
. |
|
6684 |
^ false |
|
6685 |
! |
|
6686 |
||
6687 |
glxLshaderangeLowin: lowin hiwin: hiwin znear: znear zfar: zfar in: aGLXWindowId |
|
6688 |
||
6689 |
%{ /* NOCONTEXT */ |
|
6690 |
#ifdef GLX |
|
6691 |
SETWIN(aGLXWindowId) |
|
6692 |
lshaderange(_colorindexVal(lowin), _colorindexVal(hiwin), |
|
6693 |
_longVal(znear), _longVal(zfar)); |
|
6694 |
RETURN (true); |
|
6695 |
#endif |
|
6696 |
%} |
|
6697 |
. |
|
6698 |
^ false |
|
6699 |
! |
|
6700 |
||
6701 |
glxLsrepeatFactor: factor in: aGLXWindowId |
|
6702 |
||
6703 |
%{ /* NOCONTEXT */ |
|
6704 |
#ifdef GLX |
|
6705 |
SETWIN(aGLXWindowId) |
|
6706 |
lsrepeat(_longVal(factor)); |
|
6707 |
RETURN (true); |
|
6708 |
#endif |
|
6709 |
%} |
|
6710 |
. |
|
6711 |
^ false |
|
6712 |
! |
|
6713 |
||
6714 |
glxMaketag: t in: aGLXWindowId |
|
6715 |
||
6716 |
%{ /* NOCONTEXT */ |
|
6717 |
#ifdef GLX |
|
6718 |
SETWIN(aGLXWindowId) |
|
6719 |
maketag(_tagVal(t)); |
|
6720 |
RETURN (true); |
|
6721 |
#endif |
|
6722 |
%} |
|
6723 |
. |
|
6724 |
^ false |
|
6725 |
! |
|
6726 |
||
6727 |
glxMaxsizeX: x y: y in: aGLXWindowId |
|
6728 |
||
6729 |
%{ /* NOCONTEXT */ |
|
6730 |
#ifdef GLX |
|
6731 |
SETWIN(aGLXWindowId) |
|
6732 |
maxsize(_longVal(x), _longVal(y)); |
|
6733 |
RETURN (true); |
|
6734 |
#endif |
|
6735 |
%} |
|
6736 |
. |
|
6737 |
^ false |
|
6738 |
! |
|
6739 |
||
6740 |
glxMinsizeX: x y: y in: aGLXWindowId |
|
6741 |
||
6742 |
%{ /* NOCONTEXT */ |
|
6743 |
#ifdef GLX |
|
6744 |
SETWIN(aGLXWindowId) |
|
6745 |
minsize(_longVal(x), _longVal(y)); |
|
6746 |
RETURN (true); |
|
6747 |
#endif |
|
6748 |
%} |
|
6749 |
. |
|
6750 |
^ false |
|
6751 |
! |
|
6752 |
||
6753 |
glxMsalphaMode: mode in: aGLXWindowId |
|
6754 |
||
6755 |
%{ /* NOCONTEXT */ |
|
6756 |
#ifdef FULL_GLX |
|
6757 |
SETWIN(aGLXWindowId) |
|
6758 |
msalpha(_longVal(mode)); |
|
6759 |
RETURN (true); |
|
6760 |
#endif |
|
6761 |
%} |
|
6762 |
. |
|
6763 |
^ false |
|
6764 |
! |
|
6765 |
||
6766 |
glxMsmask: mask inverse: inverse in: aGLXWindowId |
|
6767 |
||
6768 |
%{ /* NOCONTEXT */ |
|
6769 |
#ifdef FULL_GLX |
|
6770 |
SETWIN(aGLXWindowId) |
|
6771 |
msmask(_floatVal(mask), _booleanVal(inverse)); |
|
6772 |
RETURN (true); |
|
6773 |
#endif |
|
6774 |
%} |
|
6775 |
. |
|
6776 |
^ false |
|
6777 |
! |
|
6778 |
||
6779 |
glxMspattern: pattern in: aGLXWindowId |
|
6780 |
||
6781 |
%{ /* NOCONTEXT */ |
|
6782 |
#ifdef FULL_GLX |
|
6783 |
SETWIN(aGLXWindowId) |
|
6784 |
mspattern(_longVal(pattern)); |
|
6785 |
RETURN (true); |
|
6786 |
#endif |
|
6787 |
%} |
|
6788 |
. |
|
6789 |
^ false |
|
6790 |
! |
|
6791 |
||
6792 |
glxMssizeSamples: samples zsize: zsize ssize: ssize in: aGLXWindowId |
|
6793 |
||
6794 |
%{ /* NOCONTEXT */ |
|
6795 |
#ifdef FULL_GLX |
|
6796 |
SETWIN(aGLXWindowId) |
|
6797 |
mssize(_longVal(samples), _longVal(zsize), _longVal(ssize)); |
|
6798 |
RETURN (true); |
|
6799 |
#endif |
|
6800 |
%} |
|
6801 |
. |
|
6802 |
^ false |
|
6803 |
! |
|
6804 |
||
6805 |
glxMswapbuffers: fbuf in: aGLXWindowId |
|
6806 |
||
6807 |
%{ /* NOCONTEXT */ |
|
6808 |
#ifdef GLX |
|
6809 |
SETWIN(aGLXWindowId) |
|
6810 |
mswapbuffers(_longVal(fbuf)); |
|
6811 |
RETURN (true); |
|
6812 |
#endif |
|
6813 |
%} |
|
6814 |
. |
|
6815 |
^ false |
|
6816 |
! |
|
6817 |
||
6818 |
glxMultimapIn: aGLXWindowId |
|
6819 |
||
6820 |
%{ /* NOCONTEXT */ |
|
6821 |
#ifdef GLX |
|
6822 |
SETWIN(aGLXWindowId) |
|
6823 |
multimap(); |
|
6824 |
RETURN (true); |
|
6825 |
#endif |
|
6826 |
%} |
|
6827 |
. |
|
6828 |
^ false |
|
6829 |
! |
|
6830 |
||
6831 |
glxMultisample: bool in: aGLXWindowId |
|
6832 |
||
6833 |
%{ /* NOCONTEXT */ |
|
6834 |
#ifdef FULL_GLX |
|
6835 |
SETWIN(aGLXWindowId) |
|
6836 |
multisample(_booleanVal(bool)); |
|
6837 |
RETURN (true); |
|
6838 |
#endif |
|
6839 |
%} |
|
6840 |
. |
|
6841 |
^ false |
|
6842 |
! |
|
6843 |
||
6844 |
glxNewpupIn: aGLXWindowId |
|
6845 |
||
6846 |
%{ /* NOCONTEXT */ |
|
6847 |
#ifdef GLX |
|
6848 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6849 |
RETURN (__MKSMALLINT(newpup())); |
294 | 6850 |
#endif |
6851 |
%} |
|
6852 |
. |
|
6853 |
^ false |
|
6854 |
! |
|
6855 |
||
6856 |
glxNewtag: newtg oldtg: oldtg offst: offst in: aGLXWindowId |
|
6857 |
||
6858 |
%{ /* NOCONTEXT */ |
|
6859 |
#ifdef GLX |
|
6860 |
SETWIN(aGLXWindowId) |
|
6861 |
newtag(_tagVal(newtg), _tagVal(oldtg), _offsetVal(offst)); |
|
6862 |
RETURN (true); |
|
6863 |
#endif |
|
6864 |
%} |
|
6865 |
. |
|
6866 |
^ false |
|
6867 |
! |
|
6868 |
||
6869 |
glxNoborderIn: aGLXWindowId |
|
6870 |
||
6871 |
%{ /* NOCONTEXT */ |
|
6872 |
#ifdef GLX |
|
6873 |
SETWIN(aGLXWindowId) |
|
6874 |
noborder(); |
|
6875 |
RETURN (true); |
|
6876 |
#endif |
|
6877 |
%} |
|
6878 |
. |
|
6879 |
^ false |
|
6880 |
! |
|
6881 |
||
6882 |
glxNoise: v delta: delta in: aGLXWindowId |
|
6883 |
||
6884 |
%{ /* NOCONTEXT */ |
|
6885 |
#ifdef GLX |
|
6886 |
SETWIN(aGLXWindowId) |
|
6887 |
noise(_deviceVal(v), _shortVal(delta)); |
|
6888 |
RETURN (true); |
|
6889 |
#endif |
|
6890 |
%} |
|
6891 |
. |
|
6892 |
^ false |
|
6893 |
! |
|
6894 |
||
6895 |
glxNoportIn: aGLXWindowId |
|
6896 |
||
6897 |
%{ /* NOCONTEXT */ |
|
6898 |
#ifdef GLX |
|
6899 |
SETWIN(aGLXWindowId) |
|
6900 |
noport(); |
|
6901 |
RETURN (true); |
|
6902 |
#endif |
|
6903 |
%} |
|
6904 |
. |
|
6905 |
^ false |
|
6906 |
! |
|
6907 |
||
6908 |
glxNurbscurveKnotCount: knotCount knotList: knotList |
|
6909 |
offset: offset ctlArray: ctlArray |
|
6910 |
order: order type: type in: aGLXWindowId |
|
6911 |
||
6912 |
| ctlPoints i | |
|
6913 |
ctlPoints := DoubleArray new: ctlArray size * (ctlArray first size). |
|
6914 |
i := 1. |
|
6915 |
ctlArray do: [:point | |
|
6916 |
point do: [:coord | |
|
6917 |
ctlPoints at: i put: coord. |
|
6918 |
i := i + 1]]. |
|
6919 |
||
6920 |
%{ /* NOCONTEXT */ |
|
6921 |
#ifdef GLX |
|
6922 |
char *knotElements, *ctlElements; |
|
6923 |
OBJ cls; |
|
6924 |
int ninstVars, nInstBytes; |
|
6925 |
||
6926 |
SETWIN(aGLXWindowId) |
|
6927 |
cls = __qClass(ctlPoints); |
|
6928 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
|
6929 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
|
6930 |
||
6931 |
ctlElements = (char *)(_InstPtr(ctlPoints)) + nInstBytes; |
|
6932 |
knotElements = (char *)(_InstPtr(knotList)) + nInstBytes; |
|
6933 |
||
6934 |
nurbscurve ( |
|
6935 |
_longVal(knotCount), (double *)knotElements, |
|
6936 |
_longVal(offset), (double *)ctlElements, |
|
6937 |
_longVal(order), _longVal(type)); |
|
6938 |
RETURN(true); |
|
6939 |
#endif |
|
6940 |
%} |
|
6941 |
. |
|
6942 |
^ false |
|
6943 |
! |
|
6944 |
||
6945 |
glxObjdeleteTag1: tag1 tag2: tag2 in: aGLXWindowId |
|
6946 |
||
6947 |
%{ /* NOCONTEXT */ |
|
6948 |
#ifdef GLX |
|
6949 |
SETWIN(aGLXWindowId) |
|
6950 |
objdelete(_tagVal(tag1), _tagVal(tag2)); |
|
6951 |
RETURN (true); |
|
6952 |
#endif |
|
6953 |
%} |
|
6954 |
. |
|
6955 |
^ false |
|
6956 |
! |
|
6957 |
||
6958 |
glxObjinsert: t in: aGLXWindowId |
|
6959 |
||
6960 |
%{ /* NOCONTEXT */ |
|
6961 |
#ifdef GLX |
|
6962 |
SETWIN(aGLXWindowId) |
|
6963 |
objinsert(_tagVal(t)); |
|
6964 |
RETURN (true); |
|
6965 |
#endif |
|
6966 |
%} |
|
6967 |
. |
|
6968 |
^ false |
|
6969 |
! |
|
6970 |
||
6971 |
glxObjreplace: t in: aGLXWindowId |
|
6972 |
||
6973 |
%{ /* NOCONTEXT */ |
|
6974 |
#ifdef GLX |
|
6975 |
SETWIN(aGLXWindowId) |
|
6976 |
objreplace(_tagVal(t)); |
|
6977 |
RETURN (true); |
|
6978 |
#endif |
|
6979 |
%} |
|
6980 |
. |
|
6981 |
^ false |
|
6982 |
! |
|
6983 |
||
6984 |
glxOnemapIn: aGLXWindowId |
|
6985 |
||
6986 |
%{ /* NOCONTEXT */ |
|
6987 |
#ifdef GLX |
|
6988 |
SETWIN(aGLXWindowId) |
|
6989 |
onemap(); |
|
6990 |
RETURN (true); |
|
6991 |
#endif |
|
6992 |
%} |
|
6993 |
. |
|
6994 |
^ false |
|
6995 |
! |
|
6996 |
||
6997 |
glxPagecolor: pcolor in: aGLXWindowId |
|
6998 |
||
6999 |
%{ /* NOCONTEXT */ |
|
7000 |
#ifdef GLX |
|
7001 |
SETWIN(aGLXWindowId) |
|
7002 |
pagecolor(_colorindexVal(pcolor)); |
|
7003 |
RETURN (true); |
|
7004 |
#endif |
|
7005 |
%} |
|
7006 |
. |
|
7007 |
^ false |
|
7008 |
! |
|
7009 |
||
7010 |
glxPassthroughToken: token in: aGLXWindowId |
|
7011 |
||
7012 |
%{ /* NOCONTEXT */ |
|
7013 |
#ifdef GLX |
|
7014 |
SETWIN(aGLXWindowId) |
|
7015 |
passthrough(_shortVal(token)); |
|
7016 |
RETURN (true); |
|
7017 |
#endif |
|
7018 |
%} |
|
7019 |
. |
|
7020 |
^ false |
|
7021 |
! |
|
7022 |
||
7023 |
glxPclosIn: aGLXWindowId |
|
7024 |
||
7025 |
%{ /* NOCONTEXT */ |
|
7026 |
#ifdef GLX |
|
7027 |
SETWIN(aGLXWindowId) |
|
7028 |
pclos(); |
|
7029 |
RETURN (true); |
|
7030 |
#endif |
|
7031 |
%} |
|
7032 |
. |
|
7033 |
^ false |
|
7034 |
! |
|
7035 |
||
7036 |
glxPicksizeX: x y: y in: aGLXWindowId |
|
7037 |
||
7038 |
%{ /* NOCONTEXT */ |
|
7039 |
#ifdef GLX |
|
7040 |
SETWIN(aGLXWindowId) |
|
7041 |
picksize(_shortVal(x), _shortVal(y)); |
|
7042 |
RETURN (true); |
|
7043 |
#endif |
|
7044 |
%} |
|
7045 |
. |
|
7046 |
^ false |
|
7047 |
! |
|
7048 |
||
7049 |
glxPixmode: mode value: value in: aGLXWindowId |
|
7050 |
||
7051 |
%{ /* NOCONTEXT */ |
|
7052 |
#ifdef GLX |
|
7053 |
SETWIN(aGLXWindowId) |
|
7054 |
pixmode(_longVal(mode), _longVal(value)); |
|
7055 |
RETURN (true); |
|
7056 |
#endif |
|
7057 |
%} |
|
7058 |
. |
|
7059 |
^ false |
|
7060 |
! |
|
7061 |
||
7062 |
glxPntsmoothMode: mode in: aGLXWindowId |
|
7063 |
||
7064 |
%{ /* NOCONTEXT */ |
|
7065 |
#ifdef GLX |
|
7066 |
SETWIN(aGLXWindowId) |
|
7067 |
pntsmooth((ulong)__intVal(mode)); |
|
7068 |
RETURN (true); |
|
7069 |
#endif |
|
7070 |
%} |
|
7071 |
. |
|
7072 |
^ false |
|
7073 |
! |
|
7074 |
||
7075 |
glxPolysmoothMode: mode in: aGLXWindowId |
|
7076 |
||
7077 |
%{ /* NOCONTEXT */ |
|
7078 |
#ifdef GLX |
|
7079 |
SETWIN(aGLXWindowId) |
|
7080 |
polysmooth(_longVal(mode)); |
|
7081 |
RETURN (true); |
|
7082 |
#endif |
|
7083 |
%} |
|
7084 |
. |
|
7085 |
^ false |
|
7086 |
! |
|
7087 |
||
7088 |
glxPopnameIn: aGLXWindowId |
|
7089 |
||
7090 |
%{ /* NOCONTEXT */ |
|
7091 |
#ifdef GLX |
|
7092 |
SETWIN(aGLXWindowId) |
|
7093 |
popname(); |
|
7094 |
RETURN (true); |
|
7095 |
#endif |
|
7096 |
%} |
|
7097 |
. |
|
7098 |
^ false |
|
7099 |
! |
|
7100 |
||
7101 |
glxPrefpositionX1: x1 x2: x2 y1: y1 y2: y2 in: aGLXWindowId |
|
7102 |
||
7103 |
%{ /* NOCONTEXT */ |
|
7104 |
SETWIN(aGLXWindowId) |
|
7105 |
prefposition(_longVal(x1), _longVal(x2), _longVal(y1), _longVal(y2)); |
|
7106 |
RETURN (true); |
|
7107 |
%} |
|
7108 |
! |
|
7109 |
||
7110 |
glxPrefsizeX: x y: y in: aGLXWindowId |
|
7111 |
||
7112 |
%{ /* NOCONTEXT */ |
|
7113 |
SETWIN(aGLXWindowId) |
|
7114 |
prefsize(_longVal(x), _longVal(y)); |
|
7115 |
RETURN (true); |
|
7116 |
%} |
|
7117 |
! |
|
7118 |
||
7119 |
glxPupmodeIn: aGLXWindowId |
|
7120 |
||
7121 |
%{ /* NOCONTEXT */ |
|
7122 |
#ifdef GLX |
|
7123 |
SETWIN(aGLXWindowId) |
|
7124 |
pupmode(); |
|
7125 |
RETURN (true); |
|
7126 |
#endif |
|
7127 |
%} |
|
7128 |
. |
|
7129 |
^ false |
|
7130 |
! |
|
7131 |
||
7132 |
glxPushname: name In: aGLXWindowId |
|
7133 |
||
7134 |
%{ /* NOCONTEXT */ |
|
7135 |
#ifdef GLX |
|
7136 |
SETWIN(aGLXWindowId) |
|
7137 |
pushname(_shortVal(name)); |
|
7138 |
RETURN (true); |
|
7139 |
#endif |
|
7140 |
%} |
|
7141 |
. |
|
7142 |
^ false |
|
7143 |
! |
|
7144 |
||
7145 |
glxQdevice: dev in: aGLXWindowId |
|
7146 |
||
7147 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
7148 |
#ifndef OPENGL |
294 | 7149 |
SETWIN(aGLXWindowId) |
7150 |
qdevice(_deviceVal(dev)); |
|
7151 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
7152 |
#endif |
294 | 7153 |
%} |
7154 |
! |
|
7155 |
||
7156 |
glxQenterDev: dev val: val in: aGLXWindowId |
|
7157 |
||
7158 |
%{ /* NOCONTEXT */ |
|
7159 |
SETWIN(aGLXWindowId) |
|
7160 |
qenter(_deviceVal(dev), _shortVal(val)); |
|
7161 |
RETURN (true); |
|
7162 |
%} |
|
7163 |
! |
|
7164 |
||
7165 |
glxQgetfdIn: aGLXWindowId |
|
7166 |
||
7167 |
%{ /* NOCONTEXT */ |
|
7168 |
#ifdef GLX |
|
7169 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
7170 |
RETURN (__MKSMALLINT(qgetfd())); |
294 | 7171 |
#endif |
7172 |
%} |
|
7173 |
. |
|
7174 |
^ false |
|
7175 |
! |
|
7176 |
||
7177 |
glxQreadIn: aGLXWindowId |
|
7178 |
||
7179 |
| dev data | |
|
7180 |
%{ |
|
7181 |
short c_data; |
|
7182 |
||
7183 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
7184 |
dev = __MKSMALLINT(qread(&c_data)); |
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
7185 |
data = __MKSMALLINT(c_data); |
294 | 7186 |
%} |
7187 |
. |
|
7188 |
^ Array with: dev with: data |
|
7189 |
! |
|
7190 |
||
7191 |
glxQresetIn: aGLXWindowId |
|
7192 |
||
7193 |
%{ /* NOCONTEXT */ |
|
7194 |
SETWIN(aGLXWindowId) |
|
7195 |
qreset(); |
|
7196 |
RETURN (true); |
|
7197 |
%} |
|
7198 |
! |
|
7199 |
||
7200 |
glxQtestIn: aGLXWindowId |
|
7201 |
||
7202 |
%{ /* NOCONTEXT */ |
|
7203 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
7204 |
RETURN (__MKSMALLINT(qtest())); |
294 | 7205 |
%} |
7206 |
! |
|
7207 |
||
7208 |
glxRGBcursorIndex: index red: red green: green blue: blue |
|
7209 |
redm: redm greenm: greenm bluem: bluem in: aGLXWindowId |
|
7210 |
||
7211 |
%{ /* NOCONTEXT */ |
|
7212 |
#ifdef GLX |
|
7213 |
SETWIN(aGLXWindowId) |
|
7214 |
RGBcursor(_shortVal(index), |
|
7215 |
_shortVal(red), _shortVal(green), _shortVal(blue), |
|
7216 |
_shortVal(redm), _shortVal(greenm), _shortVal(bluem)); |
|
7217 |
RETURN (true); |
|
7218 |
#endif |
|
7219 |
%} |
|
7220 |
. |
|
7221 |
^ false |
|
7222 |
! |
|
7223 |
||
7224 |
glxRGBwritemaskRed: red green: green blue: blue in: aGLXWindowId |
|
7225 |
||
7226 |
%{ /* NOCONTEXT */ |
|
7227 |
#ifdef GLX |
|
7228 |
SETWIN(aGLXWindowId) |
|
7229 |
RGBwritemask(_shortVal(red), _shortVal(green), _shortVal(blue)); |
|
7230 |
RETURN (true); |
|
7231 |
#endif |
|
7232 |
%} |
|
7233 |
. |
|
7234 |
^ false |
|
7235 |
! |
|
7236 |
||
7237 |
glxRectzoomX: xfactor y: yfactor in: aGLXWindowId |
|
7238 |
||
7239 |
%{ /* NOCONTEXT */ |
|
7240 |
#ifdef GLX |
|
7241 |
SETWIN(aGLXWindowId) |
|
7242 |
rectzoom(_floatVal(xfactor), _floatVal(yfactor)); |
|
7243 |
RETURN (true); |
|
7244 |
#endif |
|
7245 |
%} |
|
7246 |
. |
|
7247 |
^ false |
|
7248 |
! |
|
7249 |
||
7250 |
glxResetls: b in: aGLXWindowId |
|
7251 |
||
7252 |
%{ /* NOCONTEXT */ |
|
7253 |
#ifdef GLX |
|
7254 |
SETWIN(aGLXWindowId) |
|
7255 |
resetls(_booleanVal(b)); |
|
7256 |
RETURN (true); |
|
7257 |
#endif |
|
7258 |
%} |
|
7259 |
. |
|
7260 |
^ false |
|
7261 |
! |
|
7262 |
||
7263 |
glxRingbellIn: aGLXWindowId |
|
7264 |
||
7265 |
%{ /* NOCONTEXT */ |
|
7266 |
#ifdef GLX |
|
7267 |
SETWIN(aGLXWindowId) |
|
7268 |
ringbell(); |
|
7269 |
RETURN (true); |
|
7270 |
#endif |
|
7271 |
%} |
|
7272 |
. |
|
7273 |
^ false |
|
7274 |
! |
|
7275 |
||
7276 |
glxSboxX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
7277 |
||
7278 |
%{ /* NOCONTEXT */ |
|
7279 |
#ifdef GLX |
|
7280 |
SETWIN(aGLXWindowId) |
|
7281 |
sbox(_coordVal(x1), _coordVal(y1), _coordVal(x2), _coordVal(y2)); |
|
7282 |
RETURN (true); |
|
7283 |
#endif |
|
7284 |
%} |
|
7285 |
. |
|
7286 |
^ false |
|
7287 |
! |
|
7288 |
||
7289 |
glxSboxfX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
7290 |
||
7291 |
%{ /* NOCONTEXT */ |
|
7292 |
#ifdef GLX |
|
7293 |
SETWIN(aGLXWindowId) |
|
7294 |
sboxf(_coordVal(x1), _coordVal(y1), _coordVal(x2), _coordVal(y2)); |
|
7295 |
RETURN (true); |
|
7296 |
#endif |
|
7297 |
%} |
|
7298 |
. |
|
7299 |
^ false |
|
7300 |
! |
|
7301 |
||
7302 |
glxSboxfiX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
7303 |
||
7304 |
%{ /* NOCONTEXT */ |
|
7305 |
#ifdef GLX |
|
7306 |
SETWIN(aGLXWindowId) |
|
7307 |
sboxfi(_icoordVal(x1), _icoordVal(y1), _icoordVal(x2), _icoordVal(y2)); |
|
7308 |
RETURN (true); |
|
7309 |
#endif |
|
7310 |
%} |
|
7311 |
. |
|
7312 |
^ false |
|
7313 |
! |
|
7314 |
||
7315 |
glxSboxfsX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
7316 |
||
7317 |
%{ /* NOCONTEXT */ |
|
7318 |
#ifdef GLX |
|
7319 |
SETWIN(aGLXWindowId) |
|
7320 |
sboxfs(_scoordVal(x1), _scoordVal(y1), _scoordVal(x2), _scoordVal(y2)); |
|
7321 |
RETURN (true); |
|
7322 |
#endif |
|
7323 |
%} |
|
7324 |
. |
|
7325 |
^ false |
|
7326 |
! |
|
7327 |
||
7328 |
glxSboxiX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
7329 |
||
7330 |
%{ /* NOCONTEXT */ |
|
7331 |
#ifdef GLX |
|
7332 |
SETWIN(aGLXWindowId) |
|
7333 |
sboxi(_icoordVal(x1), _icoordVal(y1), _icoordVal(x2), _icoordVal(y2)); |
|
7334 |
RETURN (true); |
|
7335 |
#endif |
|
7336 |
%} |
|
7337 |
. |
|
7338 |
^ false |
|
7339 |
! |
|
7340 |
||
7341 |
glxSboxsX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
7342 |
||
7343 |
%{ /* NOCONTEXT */ |
|
7344 |
#ifdef GLX |
|
7345 |
SETWIN(aGLXWindowId) |
|
7346 |
sboxs(_scoordVal(x1), _scoordVal(y1), _scoordVal(x2), _scoordVal(y2)); |
|
7347 |
RETURN (true); |
|
7348 |
#endif |
|
7349 |
%} |
|
7350 |
. |
|
7351 |
^ false |
|
7352 |
! |
|
7353 |
||
7354 |
glxSclearSval: sval in: aGLXWindowId |
|
7355 |
||
7356 |
%{ /* NOCONTEXT */ |
|
7357 |
#ifdef GLX |
|
7358 |
SETWIN(aGLXWindowId) |
|
7359 |
sclear((ulong)__intVal(sval)); |
|
7360 |
RETURN (true); |
|
7361 |
#endif |
|
7362 |
%} |
|
7363 |
. |
|
7364 |
^ false |
|
7365 |
! |
|
7366 |
||
7367 |
glxScrbox: arg in: aGLXWindowId |
|
7368 |
||
7369 |
%{ /* NOCONTEXT */ |
|
7370 |
#ifdef GLX |
|
7371 |
SETWIN(aGLXWindowId) |
|
7372 |
scrbox(_longVal(arg)); |
|
7373 |
RETURN (true); |
|
7374 |
#endif |
|
7375 |
%} |
|
7376 |
. |
|
7377 |
^ false |
|
7378 |
! |
|
7379 |
||
7380 |
glxScreenspaceIn: aGLXWindowId |
|
7381 |
||
7382 |
%{ /* NOCONTEXT */ |
|
7383 |
#ifdef GLX |
|
7384 |
SETWIN(aGLXWindowId) |
|
7385 |
screenspace(); |
|
7386 |
RETURN (true); |
|
7387 |
#endif |
|
7388 |
%} |
|
7389 |
. |
|
7390 |
^ false |
|
7391 |
! |
|
7392 |
||
7393 |
glxScrmaskLeft: left right: right bottom: bottom top: top in: aGLXWindowId |
|
7394 |
||
7395 |
%{ /* NOCONTEXT */ |
|
7396 |
#ifdef GLX |
|
7397 |
SETWIN(aGLXWindowId) |
|
7398 |
scrmask(_screencoordVal(left), _screencoordVal(right), |
|
7399 |
_screencoordVal(bottom), _screencoordVal(top)); |
|
7400 |
RETURN (true); |
|
7401 |
#endif |
|
7402 |
%} |
|
7403 |
. |
|
7404 |
^ false |
|
7405 |
! |
|
7406 |
||
7407 |
glxScrnattach: gsnr in: aGLXWindowId |
|
7408 |
||
7409 |
%{ /* NOCONTEXT */ |
|
7410 |
#ifdef GLX |
|
7411 |
SETWIN(aGLXWindowId) |
|
7412 |
scrnattach(_longVal(gsnr)); |
|
7413 |
RETURN (true); |
|
7414 |
#endif |
|
7415 |
%} |
|
7416 |
. |
|
7417 |
^ false |
|
7418 |
! |
|
7419 |
||
7420 |
glxScrnselect: gsnr in: aGLXWindowId |
|
7421 |
||
7422 |
%{ /* NOCONTEXT */ |
|
7423 |
#ifdef GLX |
|
7424 |
SETWIN(aGLXWindowId) |
|
7425 |
scrnselect(_longVal(gsnr)); |
|
7426 |
RETURN (true); |
|
7427 |
#endif |
|
7428 |
%} |
|
7429 |
. |
|
7430 |
^ false |
|
7431 |
! |
|
7432 |
||
7433 |
glxSetcursorIndex: index color: color wtn: wtn in: aGLXWindowId |
|
7434 |
||
7435 |
%{ /* NOCONTEXT */ |
|
7436 |
#ifdef GLX |
|
7437 |
SETWIN(aGLXWindowId) |
|
7438 |
setcursor(_shortVal(index), _colorindexVal(color), _colorindexVal(wtn)); |
|
7439 |
RETURN (true); |
|
7440 |
#endif |
|
7441 |
%} |
|
7442 |
. |
|
7443 |
^ false |
|
7444 |
! |
|
7445 |
||
7446 |
glxSetdblightsMask: mask in: aGLXWindowId |
|
7447 |
||
7448 |
%{ /* NOCONTEXT */ |
|
7449 |
#ifdef GLX |
|
7450 |
SETWIN(aGLXWindowId) |
|
7451 |
setdblights((ulong)__intVal(mask)); |
|
7452 |
RETURN (true); |
|
7453 |
#endif |
|
7454 |
%} |
|
7455 |
. |
|
7456 |
^ false |
|
7457 |
! |
|
7458 |
||
7459 |
glxSetdepthNear: near far: far in: aGLXWindowId |
|
7460 |
||
7461 |
%{ /* NOCONTEXT */ |
|
7462 |
#ifdef GLX |
|
7463 |
SETWIN(aGLXWindowId) |
|
7464 |
setdepth(_screencoordVal(near), _screencoordVal(far)); |
|
7465 |
RETURN (true); |
|
7466 |
#endif |
|
7467 |
%} |
|
7468 |
. |
|
7469 |
^ false |
|
7470 |
! |
|
7471 |
||
7472 |
glxSetmap: mapnum in: aGLXWindowId |
|
7473 |
||
7474 |
%{ /* NOCONTEXT */ |
|
7475 |
#ifdef GLX |
|
7476 |
SETWIN(aGLXWindowId) |
|
7477 |
setmap(_shortVal(mapnum)); |
|
7478 |
RETURN (true); |
|
7479 |
#endif |
|
7480 |
%} |
|
7481 |
. |
|
7482 |
^ false |
|
7483 |
! |
|
7484 |
||
7485 |
glxSetmonitor: mtype in: aGLXWindowId |
|
7486 |
||
7487 |
%{ /* NOCONTEXT */ |
|
7488 |
#ifdef GLX |
|
7489 |
SETWIN(aGLXWindowId) |
|
7490 |
setmonitor(_shortVal(mtype)); |
|
7491 |
RETURN (true); |
|
7492 |
#endif |
|
7493 |
%} |
|
7494 |
. |
|
7495 |
^ false |
|
7496 |
! |
|
7497 |
||
7498 |
glxSetnurbsproperty: property value: value in: aGLXWindowId |
|
7499 |
||
7500 |
%{ /* NOCONTEXT */ |
|
7501 |
#ifdef GLX |
|
7502 |
SETWIN(aGLXWindowId) |
|
7503 |
setnurbsproperty(_longVal(property), _floatVal(value)); |
|
7504 |
RETURN (true); |
|
7505 |
#endif |
|
7506 |
%} |
|
7507 |
. |
|
7508 |
^ false |
|
7509 |
! |
|
7510 |
||
7511 |
glxSetpattern: index in: aGLXWindowId |
|
7512 |
||
7513 |
%{ /* NOCONTEXT */ |
|
7514 |
#ifdef GLX |
|
7515 |
SETWIN(aGLXWindowId) |
|
7516 |
setpattern(_shortVal(index)); |
|
7517 |
RETURN (true); |
|
7518 |
#endif |
|
7519 |
%} |
|
7520 |
. |
|
7521 |
^ false |
|
7522 |
! |
|
7523 |
||
7524 |
glxSetpup: pup entry: entry mode: mode in: aGLXWindowId |
|
7525 |
||
7526 |
%{ /* NOCONTEXT */ |
|
7527 |
#ifdef GLX |
|
7528 |
SETWIN(aGLXWindowId) |
|
7529 |
setpup(_longVal(pup), _longVal(entry), (ulong)__intVal(mode)); |
|
7530 |
RETURN (true); |
|
7531 |
#endif |
|
7532 |
%} |
|
7533 |
. |
|
7534 |
^ false |
|
7535 |
! |
|
7536 |
||
7537 |
glxSetvaluator: v init: init vmin: vmin vmax: vmax in: aGLXWindowId |
|
7538 |
||
7539 |
%{ /* NOCONTEXT */ |
|
7540 |
#ifdef GLX |
|
7541 |
SETWIN(aGLXWindowId) |
|
7542 |
setvaluator(_deviceVal(v), _shortVal(init), _shortVal(vmin), _shortVal(vmax)); |
|
7543 |
RETURN (true); |
|
7544 |
#endif |
|
7545 |
%} |
|
7546 |
. |
|
7547 |
^ false |
|
7548 |
! |
|
7549 |
||
7550 |
glxSetvideo: reg value: value in: aGLXWindowId |
|
7551 |
||
7552 |
%{ /* NOCONTEXT */ |
|
7553 |
#ifdef GLX |
|
7554 |
SETWIN(aGLXWindowId) |
|
7555 |
setvideo(_longVal(reg), _longVal(value)); |
|
7556 |
RETURN (true); |
|
7557 |
#endif |
|
7558 |
%} |
|
7559 |
. |
|
7560 |
^ false |
|
7561 |
! |
|
7562 |
||
7563 |
glxShademodel: model in: aGLXWindowId |
|
7564 |
||
7565 |
%{ /* NOCONTEXT */ |
|
7566 |
#ifdef GLX |
|
7567 |
SETWIN(aGLXWindowId) |
|
7568 |
shademodel(_longVal(model)); |
|
7569 |
RETURN (true); |
|
7570 |
#endif |
|
7571 |
%} |
|
7572 |
. |
|
7573 |
^ false |
|
7574 |
! |
|
7575 |
||
7576 |
glxShaderangeLowin: lowin hiwin: hiwin z1: z1 z2: z2 in: aGLXWindowId |
|
7577 |
||
7578 |
%{ /* NOCONTEXT */ |
|
7579 |
#ifdef GLX |
|
7580 |
SETWIN(aGLXWindowId) |
|
7581 |
shaderange(_colorindexVal(lowin), _colorindexVal(hiwin), |
|
7582 |
_screencoordVal(z1), _screencoordVal(z2)); |
|
7583 |
RETURN (true); |
|
7584 |
#endif |
|
7585 |
%} |
|
7586 |
. |
|
7587 |
^ false |
|
7588 |
! |
|
7589 |
||
7590 |
glxSmoothline: mode in: aGLXWindowId |
|
7591 |
||
7592 |
%{ /* NOCONTEXT */ |
|
7593 |
#ifdef GLX |
|
7594 |
SETWIN(aGLXWindowId) |
|
7595 |
smoothline(_longVal(mode)); |
|
7596 |
RETURN (true); |
|
7597 |
#endif |
|
7598 |
%} |
|
7599 |
. |
|
7600 |
^ false |
|
7601 |
! |
|
7602 |
||
7603 |
glxStencilEnable: enable ref: ref func: func mask: mask fail: fail |
|
7604 |
pass: pass zpass: zpass in: aGLXWindowId |
|
7605 |
||
7606 |
%{ /* NOCONTEXT */ |
|
7607 |
#ifdef GLX |
|
7608 |
SETWIN(aGLXWindowId) |
|
7609 |
stencil(_longVal(enable), (ulong)__intVal(ref), _longVal(func), |
|
7610 |
(ulong)__intVal(mask), _longVal(fail), _longVal(pass), _longVal(zpass)); |
|
7611 |
RETURN (true); |
|
7612 |
#endif |
|
7613 |
%} |
|
7614 |
. |
|
7615 |
^ false |
|
7616 |
! |
|
7617 |
||
7618 |
glxStensize: planes in: aGLXWindowId |
|
7619 |
||
7620 |
%{ /* NOCONTEXT */ |
|
7621 |
#ifdef GLX |
|
7622 |
SETWIN(aGLXWindowId) |
|
7623 |
stensize(_longVal(planes)); |
|
7624 |
RETURN (true); |
|
7625 |
#endif |
|
7626 |
%} |
|
7627 |
. |
|
7628 |
^ false |
|
7629 |
! |
|
7630 |
||
7631 |
glxStepunitX: x y: y in: aGLXWindowId |
|
7632 |
||
7633 |
%{ /* NOCONTEXT */ |
|
7634 |
#ifdef GLX |
|
7635 |
SETWIN(aGLXWindowId) |
|
7636 |
stepunit(_longVal(x), _longVal(y)); |
|
7637 |
RETURN (true); |
|
7638 |
#endif |
|
7639 |
%} |
|
7640 |
. |
|
7641 |
^ false |
|
7642 |
! |
|
7643 |
||
7644 |
glxSubpixel: b in: aGLXWindowId |
|
7645 |
||
7646 |
%{ /* NOCONTEXT */ |
|
7647 |
#ifdef GLX |
|
7648 |
SETWIN(aGLXWindowId) |
|
7649 |
subpixel(_booleanVal(b)); |
|
7650 |
RETURN (true); |
|
7651 |
#endif |
|
7652 |
%} |
|
7653 |
. |
|
7654 |
^ false |
|
7655 |
! |
|
7656 |
||
7657 |
glxSwapinterval: i in: aGLXWindowId |
|
7658 |
||
7659 |
%{ /* NOCONTEXT */ |
|
7660 |
#ifdef GLX |
|
7661 |
SETWIN(aGLXWindowId) |
|
7662 |
swapinterval(_shortVal(i)); |
|
7663 |
RETURN (true); |
|
7664 |
#endif |
|
7665 |
%} |
|
7666 |
. |
|
7667 |
^ false |
|
7668 |
! |
|
7669 |
||
7670 |
glxSwaptmeshIn: aGLXWindowId |
|
7671 |
||
7672 |
%{ /* NOCONTEXT */ |
|
7673 |
#ifdef GLX |
|
7674 |
SETWIN(aGLXWindowId) |
|
7675 |
swaptmesh(); |
|
7676 |
RETURN (true); |
|
7677 |
#endif |
|
7678 |
%} |
|
7679 |
. |
|
7680 |
^ false |
|
7681 |
! |
|
7682 |
||
7683 |
glxSwinopen: parent in: aGLXWindowId |
|
7684 |
||
7685 |
%{ /* NOCONTEXT */ |
|
7686 |
#ifdef GLX |
|
7687 |
SETWIN(aGLXWindowId) |
|
7688 |
swinopen(_longVal(parent)); |
|
7689 |
RETURN (true); |
|
7690 |
#endif |
|
7691 |
%} |
|
7692 |
. |
|
7693 |
^ false |
|
7694 |
! |
|
7695 |
||
7696 |
glxSwritemask: mask in: aGLXWindowId |
|
7697 |
||
7698 |
%{ /* NOCONTEXT */ |
|
7699 |
#ifdef GLX |
|
7700 |
SETWIN(aGLXWindowId) |
|
7701 |
swritemask((ulong)__intVal(mask)); |
|
7702 |
RETURN (true); |
|
7703 |
#endif |
|
7704 |
%} |
|
7705 |
. |
|
7706 |
^ false |
|
7707 |
! |
|
7708 |
||
7709 |
glxTextinitIn: aGLXWindowId |
|
7710 |
||
7711 |
%{ /* NOCONTEXT */ |
|
7712 |
#ifdef GLX |
|
7713 |
SETWIN(aGLXWindowId) |
|
7714 |
textinit(); |
|
7715 |
RETURN (true); |
|
7716 |
#endif |
|
7717 |
%} |
|
7718 |
. |
|
7719 |
^ false |
|
7720 |
! |
|
7721 |
||
7722 |
glxTextportLeft: left right: right bottom: bottom top: top in: aGLXWindowId |
|
7723 |
||
7724 |
%{ /* NOCONTEXT */ |
|
7725 |
#ifdef GLX |
|
7726 |
SETWIN(aGLXWindowId) |
|
7727 |
textport(_screencoordVal(left), _screencoordVal(right), |
|
7728 |
_screencoordVal(bottom), _screencoordVal(top)); |
|
7729 |
RETURN (true); |
|
7730 |
#endif |
|
7731 |
%} |
|
7732 |
. |
|
7733 |
^ false |
|
7734 |
! |
|
7735 |
||
7736 |
glxTieB: b v1: v1 v2: v2 in: aGLXWindowId |
|
7737 |
||
7738 |
%{ /* NOCONTEXT */ |
|
7739 |
#ifdef GLX |
|
7740 |
SETWIN(aGLXWindowId) |
|
7741 |
tie(_deviceVal(b), _deviceVal(v1), _deviceVal(v2)); |
|
7742 |
RETURN (true); |
|
7743 |
#endif |
|
7744 |
%} |
|
7745 |
. |
|
7746 |
^ false |
|
7747 |
! |
|
7748 |
||
7749 |
glxTlutbind: target index: index in: aGLXWindowId |
|
7750 |
||
7751 |
%{ /* NOCONTEXT */ |
|
7752 |
#ifdef FULL_GLX |
|
7753 |
SETWIN(aGLXWindowId) |
|
7754 |
tlutbind(_longVal(target), _longVal(index)); |
|
7755 |
RETURN (true); |
|
7756 |
#endif |
|
7757 |
%} |
|
7758 |
. |
|
7759 |
^ false |
|
7760 |
! |
|
7761 |
||
7762 |
glxTpoffIn: aGLXWindowId |
|
7763 |
||
7764 |
%{ /* NOCONTEXT */ |
|
7765 |
#ifdef GLX |
|
7766 |
SETWIN(aGLXWindowId) |
|
7767 |
tpoff(); |
|
7768 |
RETURN (true); |
|
7769 |
#endif |
|
7770 |
%} |
|
7771 |
. |
|
7772 |
^ false |
|
7773 |
! |
|
7774 |
||
7775 |
glxTponIn: aGLXWindowId |
|
7776 |
||
7777 |
%{ /* NOCONTEXT */ |
|
7778 |
#ifdef GLX |
|
7779 |
SETWIN(aGLXWindowId) |
|
7780 |
tpon(); |
|
7781 |
RETURN (true); |
|
7782 |
#endif |
|
7783 |
%} |
|
7784 |
. |
|
7785 |
^ false |
|
7786 |
! |
|
7787 |
||
7788 |
glxUnqdevice: dev in: aGLXWindowId |
|
7789 |
||
7790 |
%{ /* NOCONTEXT */ |
|
7791 |
#ifdef GLX |
|
7792 |
SETWIN(aGLXWindowId) |
|
7793 |
unqdevice(_deviceVal(dev)); |
|
7794 |
RETURN (true); |
|
7795 |
#endif |
|
7796 |
%} |
|
7797 |
. |
|
7798 |
^ false |
|
7799 |
! |
|
7800 |
||
7801 |
glxWmpack: pack in: aGLXWindowId |
|
7802 |
||
7803 |
%{ /* NOCONTEXT */ |
|
7804 |
#ifdef GLX |
|
7805 |
SETWIN(aGLXWindowId) |
|
7806 |
wmpack((ulong)__intVal(pack)); |
|
7807 |
RETURN (true); |
|
7808 |
#endif |
|
7809 |
%} |
|
7810 |
. |
|
7811 |
^ false |
|
7812 |
! |
|
7813 |
||
7814 |
glxWritemask: wtm in: aGLXWindowId |
|
7815 |
||
7816 |
%{ /* NOCONTEXT */ |
|
7817 |
#ifdef GLX |
|
7818 |
SETWIN(aGLXWindowId) |
|
7819 |
writemask(_colorindexVal(wtm)); |
|
7820 |
RETURN (true); |
|
7821 |
#endif |
|
7822 |
%} |
|
7823 |
. |
|
7824 |
^ false |
|
7825 |
! |
|
7826 |
||
7827 |
glxXfpt2X: x y: y in: aGLXWindowId |
|
7828 |
||
7829 |
%{ /* NOCONTEXT */ |
|
7830 |
#ifdef GLX |
|
7831 |
Coord c_x, c_y; |
|
7832 |
||
7833 |
_COORD_ (x, c_x) |
|
7834 |
_COORD_ (y, c_y) |
|
7835 |
SETWIN(aGLXWindowId) |
|
7836 |
xfpt2(c_x, c_y); |
|
7837 |
RETURN (true); |
|
7838 |
#endif |
|
7839 |
%} |
|
7840 |
. |
|
7841 |
^ false |
|
7842 |
! |
|
7843 |
||
7844 |
glxXfpt2iX: x y: y in: aGLXWindowId |
|
7845 |
||
7846 |
%{ /* NOCONTEXT */ |
|
7847 |
#ifdef GLX |
|
7848 |
Icoord c_x, c_y; |
|
7849 |
||
7850 |
_ICOORD_ (x, c_x) |
|
7851 |
_ICOORD_ (y, c_y) |
|
7852 |
SETWIN(aGLXWindowId) |
|
7853 |
xfpt2i(c_x, c_y); |
|
7854 |
RETURN (true); |
|
7855 |
#endif |
|
7856 |
%} |
|
7857 |
. |
|
7858 |
^ false |
|
7859 |
! |
|
7860 |
||
7861 |
glxXfpt2sX: x y: y in: aGLXWindowId |
|
7862 |
||
7863 |
%{ /* NOCONTEXT */ |
|
7864 |
#ifdef GLX |
|
7865 |
Scoord c_x, c_y; |
|
7866 |
||
7867 |
_SCOORD_ (x, c_x) |
|
7868 |
_SCOORD_ (y, c_y) |
|
7869 |
SETWIN(aGLXWindowId) |
|
7870 |
xfpt2s(c_x, c_y); |
|
7871 |
RETURN (true); |
|
7872 |
#endif |
|
7873 |
%} |
|
7874 |
. |
|
7875 |
^ false |
|
7876 |
! |
|
7877 |
||
7878 |
glxXfpt4X: x y: y z: z w: w in: aGLXWindowId |
|
7879 |
||
7880 |
%{ /* NOCONTEXT */ |
|
7881 |
#ifdef GLX |
|
7882 |
Coord c_x, c_y, c_z, c_w; |
|
7883 |
||
7884 |
_COORD_ (x, c_x) |
|
7885 |
_COORD_ (y, c_y) |
|
7886 |
_COORD_ (z, c_z) |
|
7887 |
_COORD_ (w, c_w) |
|
7888 |
SETWIN(aGLXWindowId) |
|
7889 |
xfpt4(c_x, c_y, c_z, c_w); |
|
7890 |
RETURN (true); |
|
7891 |
#endif |
|
7892 |
%} |
|
7893 |
. |
|
7894 |
^ false |
|
7895 |
! |
|
7896 |
||
7897 |
glxXfpt4iX: x y: y z: z w: w in: aGLXWindowId |
|
7898 |
||
7899 |
%{ /* NOCONTEXT */ |
|
7900 |
#ifdef GLX |
|
7901 |
Icoord c_x, c_y, c_z, c_w; |
|
7902 |
||
7903 |
_ICOORD_ (x, c_x) |
|
7904 |
_ICOORD_ (y, c_y) |
|
7905 |
_ICOORD_ (z, c_z) |
|
7906 |
_ICOORD_ (w, c_w) |
|
7907 |
SETWIN(aGLXWindowId) |
|
7908 |
xfpt4i(c_x, c_y, c_z, c_w); |
|
7909 |
RETURN (true); |
|
7910 |
#endif |
|
7911 |
%} |
|
7912 |
. |
|
7913 |
^ false |
|
7914 |
! |
|
7915 |
||
7916 |
glxXfpt4sX: x y: y z: z w: w in: aGLXWindowId |
|
7917 |
||
7918 |
%{ /* NOCONTEXT */ |
|
7919 |
#ifdef GLX |
|
7920 |
Scoord c_x, c_y, c_z, c_w; |
|
7921 |
||
7922 |
_SCOORD_ (x, c_x) |
|
7923 |
_SCOORD_ (y, c_y) |
|
7924 |
_SCOORD_ (z, c_z) |
|
7925 |
_SCOORD_ (w, c_w) |
|
7926 |
SETWIN(aGLXWindowId) |
|
7927 |
xfpt4s(c_x, c_y, c_z, c_w); |
|
7928 |
RETURN (true); |
|
7929 |
#endif |
|
7930 |
%} |
|
7931 |
. |
|
7932 |
^ false |
|
7933 |
! |
|
7934 |
||
7935 |
glxXfptX: x y: y z: z in: aGLXWindowId |
|
7936 |
||
7937 |
%{ /* NOCONTEXT */ |
|
7938 |
#ifdef GLX |
|
7939 |
Coord c_x, c_y, c_z; |
|
7940 |
||
7941 |
_COORD_ (x, c_x) |
|
7942 |
_COORD_ (y, c_y) |
|
7943 |
_COORD_ (z, c_z) |
|
7944 |
SETWIN(aGLXWindowId) |
|
7945 |
xfpt(c_x, c_y, c_z); |
|
7946 |
RETURN (true); |
|
7947 |
#endif |
|
7948 |
%} |
|
7949 |
. |
|
7950 |
^ false |
|
7951 |
! |
|
7952 |
||
7953 |
glxXfptiX: x y: y z: z in: aGLXWindowId |
|
7954 |
||
7955 |
%{ /* NOCONTEXT */ |
|
7956 |
#ifdef GLX |
|
7957 |
Icoord c_x, c_y, c_z; |
|
7958 |
||
7959 |
_ICOORD_ (x, c_x) |
|
7960 |
_ICOORD_ (y, c_y) |
|
7961 |
_ICOORD_ (z, c_z) |
|
7962 |
SETWIN(aGLXWindowId) |
|
7963 |
xfpti(c_x, c_y, c_z); |
|
7964 |
RETURN (true); |
|
7965 |
#endif |
|
7966 |
%} |
|
7967 |
. |
|
7968 |
^ false |
|
7969 |
! |
|
7970 |
||
7971 |
glxXfptsX: x y: y z: z in: aGLXWindowId |
|
7972 |
||
7973 |
%{ /* NOCONTEXT */ |
|
7974 |
#ifdef GLX |
|
7975 |
Scoord c_x, c_y, c_z; |
|
7976 |
||
7977 |
_SCOORD_ (x, c_x) |
|
7978 |
_SCOORD_ (y, c_y) |
|
7979 |
_SCOORD_ (z, c_z) |
|
7980 |
SETWIN(aGLXWindowId) |
|
7981 |
xfpts(c_x, c_y, c_z); |
|
7982 |
RETURN (true); |
|
7983 |
#endif |
|
7984 |
%} |
|
7985 |
. |
|
7986 |
^ false |
|
7987 |
! ! |
|
7988 |
||
7989 |
!GLXWorkstation methodsFor:'vertex data transfer'! |
|
7990 |
||
7991 |
glxN3f:arrayOf3Floats in:aGLXWindowId |
|
7992 |
"argument must be an array of 3 floats containing the |
|
7993 |
current vertex normal - in real GL only" |
|
7994 |
||
7995 |
%{ /* NOCONTEXT */ |
|
7996 |
#ifdef GLX |
|
7997 |
float vec[3], *v; |
|
7998 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
7999 |
if (! (v = __glx_getFloatsFromInto(arrayOf3Floats, vec, 3))) RETURN(false); |
294 | 8000 |
SETWIN(aGLXWindowId) |
8001 |
n3f(v); |
|
8002 |
RETURN (true); |
|
8003 |
#endif |
|
8004 |
%} |
|
8005 |
. |
|
8006 |
^ false |
|
8007 |
! |
|
8008 |
||
8009 |
glxV2d:v in:aGLXWindowId |
|
8010 |
"pass a vertex; v must be a vector with 2 doubles; z is taken as 0" |
|
8011 |
||
8012 |
%{ /* NOCONTEXT */ |
|
8013 |
double vec[2], *c_v; |
|
8014 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8015 |
if (! (c_v = __glx_getDoublesFromInto(v, vec, 2))) RETURN(false); |
294 | 8016 |
SETWIN(aGLXWindowId) |
8017 |
v2d(c_v); |
|
8018 |
RETURN (true); |
|
8019 |
%} |
|
8020 |
! |
|
8021 |
||
8022 |
glxV2f:v in:aGLXWindowId |
|
8023 |
"pass a vertex; v must be a vector with 2 floats; z is taken as 0" |
|
8024 |
||
8025 |
%{ /* NOCONTEXT */ |
|
8026 |
float vec[2], *c_v; |
|
8027 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8028 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 2))) RETURN(false); |
294 | 8029 |
SETWIN(aGLXWindowId) |
8030 |
v2f(c_v); |
|
8031 |
RETURN (true); |
|
8032 |
%} |
|
8033 |
! |
|
8034 |
||
8035 |
glxV2fX:x y:y in:aGLXWindowId |
|
8036 |
"pass a vertex from individual x and y values; z is taken as 0.0" |
|
8037 |
||
8038 |
%{ /* NOCONTEXT */ |
|
8039 |
float vec[2]; |
|
8040 |
||
8041 |
_FLOAT_(x, vec[0]) |
|
8042 |
_FLOAT_(y, vec[1]) |
|
8043 |
SETWIN(aGLXWindowId) |
|
8044 |
v2f(vec); |
|
8045 |
RETURN (true); |
|
8046 |
%} |
|
8047 |
! |
|
8048 |
||
8049 |
glxV2i:v in:aGLXWindowId |
|
8050 |
"pass a vertex; v must be a vector with 2 longs; z is taken as 0" |
|
8051 |
||
8052 |
%{ /* NOCONTEXT */ |
|
8053 |
long vec[2], *c_v; |
|
8054 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8055 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 2))) RETURN(false); |
294 | 8056 |
SETWIN(aGLXWindowId) |
8057 |
v2i(c_v); |
|
8058 |
RETURN (true); |
|
8059 |
%} |
|
8060 |
! |
|
8061 |
||
8062 |
glxV2s:v in:aGLXWindowId |
|
8063 |
"pass a vertex; v must be a vector with 2 shorts; z is taken as 0" |
|
8064 |
||
8065 |
%{ /* NOCONTEXT */ |
|
8066 |
short vec[2], *c_v; |
|
8067 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8068 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 2))) RETURN(false); |
294 | 8069 |
SETWIN(aGLXWindowId) |
8070 |
v2s(c_v); |
|
8071 |
RETURN (true); |
|
8072 |
%} |
|
8073 |
! |
|
8074 |
||
8075 |
glxV3d:v in:aGLXWindowId |
|
8076 |
"pass a vertex; v must be a 3-element double-vector" |
|
8077 |
||
8078 |
%{ /* NOCONTEXT */ |
|
8079 |
double vec[3], *c_v; |
|
8080 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8081 |
if (! (c_v = __glx_getDoublesFromInto(v, vec, 3))) RETURN(false); |
294 | 8082 |
SETWIN(aGLXWindowId) |
8083 |
v3d(c_v); |
|
8084 |
RETURN (true); |
|
8085 |
%} |
|
8086 |
. |
|
8087 |
^ false |
|
8088 |
! |
|
8089 |
||
8090 |
glxV3f:v in:aGLXWindowId |
|
8091 |
"pass a vertex; v must be a 3-element float-vector" |
|
8092 |
||
8093 |
%{ /* NOCONTEXT */ |
|
8094 |
float vec[3], *c_v; |
|
8095 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8096 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 3))) RETURN(false); |
294 | 8097 |
SETWIN(aGLXWindowId) |
8098 |
v3f(c_v); |
|
8099 |
RETURN (true); |
|
8100 |
%} |
|
8101 |
! |
|
8102 |
||
8103 |
glxV3fX:x y:y z:z in: aGLXWindowId |
|
8104 |
"pass a vector from individual x, y and z (float) values" |
|
8105 |
||
8106 |
%{ /* NOCONTEXT */ |
|
8107 |
float vec[3]; |
|
8108 |
||
8109 |
_FLOAT_(x, vec[0]) |
|
8110 |
_FLOAT_(y, vec[1]) |
|
8111 |
_FLOAT_(z, vec[2]) |
|
8112 |
SETWIN(aGLXWindowId) |
|
8113 |
v3f(vec); |
|
8114 |
RETURN (true); |
|
8115 |
%} |
|
8116 |
! |
|
8117 |
||
8118 |
glxV3i:v in:aGLXWindowId |
|
8119 |
"pass a vertex; v must be a vector with 3 longs" |
|
8120 |
||
8121 |
%{ /* NOCONTEXT */ |
|
8122 |
long vec[3], *c_v; |
|
8123 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8124 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 3))) RETURN(false); |
294 | 8125 |
SETWIN(aGLXWindowId) |
8126 |
v3i(c_v); |
|
8127 |
RETURN (true); |
|
8128 |
%} |
|
8129 |
! |
|
8130 |
||
8131 |
glxV3s:v in:aGLXWindowId |
|
8132 |
"pass a vertex; v must be a vector with 3 shorts" |
|
8133 |
||
8134 |
%{ /* NOCONTEXT */ |
|
8135 |
short vec[3], *c_v; |
|
8136 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8137 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 3))) RETURN(false); |
294 | 8138 |
SETWIN(aGLXWindowId) |
8139 |
v3s(c_v); |
|
8140 |
RETURN (true); |
|
8141 |
%} |
|
8142 |
! |
|
8143 |
||
8144 |
glxV4d:v in:aGLXWindowId |
|
8145 |
"pass a vertex; v must be a 4-element double-vector, |
|
8146 |
containing x, y, z and w" |
|
8147 |
||
8148 |
%{ /* NOCONTEXT */ |
|
8149 |
double vec[4], *c_v; |
|
8150 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8151 |
if (! (c_v = __glx_getDoublesFromInto(v, vec, 4))) RETURN(false); |
294 | 8152 |
SETWIN(aGLXWindowId) |
8153 |
v4d(c_v); |
|
8154 |
RETURN (true); |
|
8155 |
%} |
|
8156 |
! |
|
8157 |
||
8158 |
glxV4f:v in:aGLXWindowId |
|
8159 |
"pass a vertex; v must be a 4-element float-vector, |
|
8160 |
containing x, y, z and w" |
|
8161 |
||
8162 |
%{ /* NOCONTEXT */ |
|
8163 |
float vec[4], *c_v; |
|
8164 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8165 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 4))) RETURN(false); |
294 | 8166 |
SETWIN(aGLXWindowId) |
8167 |
v4f(c_v); |
|
8168 |
RETURN (true); |
|
8169 |
%} |
|
8170 |
! |
|
8171 |
||
8172 |
glxV4i:v in:aGLXWindowId |
|
8173 |
"pass a vertex; v must be a 4-element int-vector, |
|
8174 |
containing x, y, z and w" |
|
8175 |
||
8176 |
%{ /* NOCONTEXT */ |
|
8177 |
long vec[4], *c_v; |
|
8178 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8179 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 4))) RETURN(false); |
294 | 8180 |
SETWIN(aGLXWindowId) |
8181 |
v4i(c_v); |
|
8182 |
RETURN (true); |
|
8183 |
%} |
|
8184 |
! |
|
8185 |
||
8186 |
glxV4s:v in:aGLXWindowId |
|
8187 |
"pass a vertex; v must be a 4-element short-vector, |
|
8188 |
containing x, y, z and w" |
|
8189 |
||
8190 |
%{ /* NOCONTEXT */ |
|
8191 |
short vec[4], *c_v; |
|
8192 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8193 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 4))) RETURN(false); |
294 | 8194 |
SETWIN(aGLXWindowId) |
8195 |
v4s(c_v); |
|
8196 |
RETURN (true); |
|
8197 |
%} |
|
8198 |
! |
|
8199 |
||
8200 |
glxVOriginIn:aGLXWindowId |
|
8201 |
"pass a 0.0/0.0/0.0 vector. |
|
8202 |
This is the same as v3f:#(0.0 0.0 0.0), but, since its so |
|
8203 |
common, this somewhat faster method has been provided" |
|
8204 |
||
8205 |
%{ /* NOCONTEXT */ |
|
8206 |
static float vec[3] = {0.0, 0.0, 0.0}; |
|
8207 |
||
8208 |
SETWIN(aGLXWindowId) |
|
8209 |
v3f(vec); |
|
8210 |
RETURN (true); |
|
8211 |
%} |
|
8212 |
! |
|
8213 |
||
8214 |
glxVUnitXIn:aGLXWindowId |
|
8215 |
"pass a 1.0/0.0/0.0 vector. |
|
8216 |
This is the same as v3f:#(1.0 0.0 0.0), but, since its so |
|
8217 |
common, this somewhat faster method has been provided" |
|
8218 |
||
8219 |
%{ /* NOCONTEXT */ |
|
8220 |
static float vec[3] = {1.0, 0.0, 0.0}; |
|
8221 |
||
8222 |
SETWIN(aGLXWindowId) |
|
8223 |
v3f(vec); |
|
8224 |
RETURN (true); |
|
8225 |
%} |
|
8226 |
! |
|
8227 |
||
8228 |
glxVUnitYIn:aGLXWindowId |
|
8229 |
"pass a 0.0/1.0/0.0 vector. |
|
8230 |
This is the same as v3f:#(0.0 1.0 0.0), but, since its so |
|
8231 |
common, this somewhat faster method has been provided" |
|
8232 |
||
8233 |
%{ /* NOCONTEXT */ |
|
8234 |
static float vec[3] = {0.0, 1.0, 0.0}; |
|
8235 |
||
8236 |
SETWIN(aGLXWindowId) |
|
8237 |
v3f(vec); |
|
8238 |
RETURN (true); |
|
8239 |
%} |
|
8240 |
! |
|
8241 |
||
8242 |
glxVUnitZIn:aGLXWindowId |
|
8243 |
"pass a 0.0/0.0/1.0 vector. |
|
8244 |
This is the same as v3f:#(0.0 0.0 1.0), but, since its so |
|
8245 |
common, this somewhat faster method has been provided" |
|
8246 |
||
8247 |
%{ /* NOCONTEXT */ |
|
8248 |
static float vec[3] = {0.0, 0.0, 1.0}; |
|
8249 |
||
8250 |
SETWIN(aGLXWindowId) |
|
8251 |
v3f(vec); |
|
8252 |
RETURN (true); |
|
8253 |
%} |
|
8254 |
! ! |
|
8255 |
||
8256 |
!GLXWorkstation methodsFor:'video and planes'! |
|
8257 |
||
8258 |
glxOverlayPlanes: planes in: aGLXWindowId |
|
8259 |
||
8260 |
%{ /* NOCONTEXT */ |
|
8261 |
#ifdef GLX |
|
8262 |
SETWIN(aGLXWindowId) |
|
8263 |
overlay(_longVal(planes)); |
|
8264 |
RETURN (true); |
|
8265 |
#endif |
|
8266 |
%} |
|
8267 |
. |
|
8268 |
^ false |
|
8269 |
! |
|
8270 |
||
8271 |
glxStereobufferIn: aGLXWindowId |
|
8272 |
||
8273 |
%{ /* NOCONTEXT */ |
|
8274 |
#ifdef FULL_GLX |
|
8275 |
SETWIN(aGLXWindowId) |
|
8276 |
stereobuffer(); |
|
8277 |
RETURN (true); |
|
8278 |
#endif |
|
8279 |
%} |
|
8280 |
. |
|
8281 |
^ false |
|
8282 |
! |
|
8283 |
||
8284 |
glxUnderlay: planes in: aGLXWindowId |
|
8285 |
||
8286 |
%{ /* NOCONTEXT */ |
|
8287 |
#ifdef GLX |
|
8288 |
SETWIN(aGLXWindowId) |
|
8289 |
underlay(_longVal(planes)); |
|
8290 |
RETURN (true); |
|
8291 |
#endif |
|
8292 |
%} |
|
8293 |
. |
|
8294 |
^ false |
|
8295 |
! |
|
8296 |
||
8297 |
glxVideocmd:cmd in:aGLXWindowId |
|
8298 |
||
8299 |
%{ /* NOCONTEXT */ |
|
8300 |
#ifdef GLX |
|
8301 |
SETWIN(aGLXWindowId) |
|
8302 |
videocmd(_longVal(cmd)); |
|
8303 |
RETURN (true); |
|
8304 |
#endif |
|
8305 |
%} |
|
8306 |
. |
|
8307 |
^ false |
|
8308 |
! ! |
|
8309 |
||
8310 |
!GLXWorkstation methodsFor:'viewing'! |
|
8311 |
||
8312 |
glxLookatVx:vx vy:vy vz:vz px:px py:py pz:pz twist:twist in:aGLXWindowId |
|
8313 |
"define viewing transformation" |
|
8314 |
||
8315 |
%{ /* NOCONTEXT */ |
|
8316 |
||
8317 |
Coord f_vx, f_vy, f_vz, f_px, f_py, f_pz; |
|
8318 |
Angle a_twist; |
|
8319 |
||
8320 |
_COORD_ (vx, f_vx) |
|
8321 |
_COORD_ (vy, f_vy) |
|
8322 |
_COORD_ (vz, f_vz) |
|
8323 |
_COORD_ (px, f_px) |
|
8324 |
_COORD_ (py, f_py) |
|
8325 |
_COORD_ (pz, f_pz) |
|
8326 |
_ANGLE_ (twist, a_twist) |
|
8327 |
SETWIN(aGLXWindowId) |
|
8328 |
lookat(f_vx, f_vy, f_vz, f_px, f_py, f_pz, a_twist); |
|
8329 |
RETURN (true); |
|
8330 |
%} |
|
8331 |
! |
|
8332 |
||
8333 |
glxOrtho2Left: left right: right bottom: bottom top: top in: aGLXWindowId |
|
8334 |
"define 2D orthogonal projection" |
|
8335 |
||
8336 |
%{ /* NOCONTEXT */ |
|
8337 |
float f_left, f_right, f_top, f_bottom; |
|
8338 |
||
8339 |
SETWIN(aGLXWindowId) |
|
8340 |
_FLOAT_(left, f_left) |
|
8341 |
_FLOAT_(right, f_right) |
|
8342 |
_FLOAT_(bottom, f_bottom) |
|
8343 |
_FLOAT_(top, f_top) |
|
8344 |
ortho2(f_left, f_right, f_bottom, f_top); |
|
8345 |
%} |
|
8346 |
. |
|
8347 |
^ true |
|
8348 |
! |
|
8349 |
||
8350 |
glxOrthoLeft: left right: right bottom: bottom top: top near: near far: far in: aGLXWindowId |
|
8351 |
"define orthogonal projection" |
|
8352 |
||
8353 |
%{ /* NOCONTEXT */ |
|
8354 |
float f_left, f_right, f_bottom, f_top, |
|
8355 |
f_near, f_far; |
|
8356 |
||
8357 |
_FLOAT_(left, f_left) |
|
8358 |
_FLOAT_(right, f_right) |
|
8359 |
_FLOAT_(bottom, f_bottom) |
|
8360 |
_FLOAT_(top, f_top) |
|
8361 |
_FLOAT_(near, f_near) |
|
8362 |
_FLOAT_(far, f_far) |
|
8363 |
SETWIN(aGLXWindowId) |
|
8364 |
ortho(f_left, f_right, f_bottom, f_top, f_near, f_far); |
|
8365 |
RETURN (true); |
|
8366 |
%} |
|
8367 |
! |
|
8368 |
||
8369 |
glxPerspectiveFovy:fovy aspect:aspect near:near far:far in:aGLXWindowId |
|
8370 |
"define perspective projection" |
|
8371 |
||
8372 |
%{ /* NOCONTEXT */ |
|
8373 |
||
8374 |
Angle a_fovy; |
|
8375 |
Coord c_near, c_far; |
|
8376 |
float f_aspect; |
|
8377 |
||
8378 |
_ANGLE_ (fovy, a_fovy) |
|
8379 |
_FLOAT_ (aspect, f_aspect) |
|
8380 |
_COORD_ (near, c_near) |
|
8381 |
_COORD_ (far, c_far) |
|
8382 |
||
8383 |
SETWIN(aGLXWindowId) |
|
8384 |
perspective(a_fovy, f_aspect, c_near, c_far); |
|
8385 |
||
8386 |
RETURN (true); |
|
8387 |
%} |
|
8388 |
! |
|
8389 |
||
8390 |
glxPolarviewDist: dist azim: azim inc: inc twist: twist in: aGLXWindowId |
|
8391 |
||
8392 |
%{ /* NOCONTEXT */ |
|
8393 |
Coord c_dist; |
|
8394 |
Angle a_azim, a_inc, a_twist; |
|
8395 |
||
8396 |
_COORD_(dist, c_dist) |
|
8397 |
_ANGLE_(azim, a_azim) |
|
8398 |
_ANGLE_(inc, a_inc) |
|
8399 |
_ANGLE_(twist, a_twist) |
|
8400 |
SETWIN(aGLXWindowId) |
|
8401 |
polarview(c_dist, a_azim, a_inc, a_twist); |
|
8402 |
RETURN (true); |
|
8403 |
%} |
|
8404 |
! |
|
8405 |
||
528 | 8406 |
glxPopviewportIn: aGLXWindowId |
8407 |
"pops the top viewport off the viewport stack" |
|
8408 |
||
8409 |
%{ /* NOCONTEXT */ |
|
8410 |
SETWIN(aGLXWindowId) |
|
8411 |
popviewport(); |
|
8412 |
RETURN (true); |
|
8413 |
%} |
|
8414 |
||
8415 |
"Modified: 19.3.1996 / 18:58:24 / cg" |
|
8416 |
! |
|
8417 |
||
8418 |
glxPushviewportIn: aGLXWindowId |
|
8419 |
"pushes the current viewport on the viewport stack" |
|
8420 |
||
8421 |
%{ /* NOCONTEXT */ |
|
8422 |
SETWIN(aGLXWindowId) |
|
8423 |
pushviewport(); |
|
8424 |
RETURN (true); |
|
8425 |
%} |
|
8426 |
||
8427 |
"Modified: 19.3.1996 / 18:58:02 / cg" |
|
8428 |
! |
|
8429 |
||
294 | 8430 |
glxReshapeViewPortIn: aGLXWindowId |
8431 |
||
8432 |
%{ /* NOCONTEXT */ |
|
8433 |
SETWIN(aGLXWindowId) |
|
8434 |
reshapeviewport(); |
|
8435 |
%} |
|
8436 |
. |
|
8437 |
^ true |
|
8438 |
! |
|
8439 |
||
8440 |
glxViewportLeft:left right:right bottom:bottom top:top in:aGLXWindowId |
|
8441 |
||
8442 |
%{ /* NOCONTEXT */ |
|
8443 |
SETWIN(aGLXWindowId) |
|
8444 |
viewport(_screencoordVal(left), _screencoordVal(right), |
|
8445 |
_screencoordVal(bottom), _screencoordVal(top)); |
|
8446 |
RETURN (true); |
|
8447 |
%} |
|
8448 |
! |
|
8449 |
||
8450 |
glxWindowLeft: left right: right bottom: bottom top: top near: near far: far in: aGLXWindowId |
|
8451 |
"this one was added independently by JEFF - kept for his programs ..." |
|
8452 |
||
8453 |
self glxWindowLeft:left right:right top:top bottom:bottom near:near far:far in:aGLXWindowId |
|
8454 |
! |
|
8455 |
||
8456 |
glxWindowLeft:left right:right top:top bottom:bottom near:near far:far in:aGLXWindowId |
|
8457 |
"define perspective viewing pyramid" |
|
8458 |
||
8459 |
%{ /* NOCONTEXT */ |
|
8460 |
Coord c_left, c_right, c_top, c_bot, c_near, c_far; |
|
8461 |
||
8462 |
_COORD_ (left, c_left) |
|
8463 |
_COORD_ (right, c_right) |
|
8464 |
_COORD_ (top, c_top) |
|
8465 |
_COORD_ (bottom, c_bot) |
|
8466 |
_COORD_ (near, c_near) |
|
8467 |
_COORD_ (far, c_far) |
|
8468 |
SETWIN(aGLXWindowId) |
|
8469 |
window(c_left, c_right, c_bot, c_top, c_near, c_far); |
|
8470 |
||
8471 |
RETURN (true); |
|
8472 |
%} |
|
8473 |
! ! |
|
8474 |
||
8475 |
!GLXWorkstation methodsFor:'window control'! |
|
8476 |
||
8477 |
glxWinclose:gwid in:aGLXWindowId |
|
8478 |
||
8479 |
%{ /* NOCONTEXT */ |
|
8480 |
#ifdef GLX |
|
8481 |
SETWIN(aGLXWindowId) |
|
8482 |
winclose(_longVal(gwid)); |
|
8483 |
RETURN (true); |
|
8484 |
#endif |
|
8485 |
%} |
|
8486 |
. |
|
8487 |
^ false |
|
8488 |
! |
|
8489 |
||
8490 |
glxWinconstraintsIn: aGLXWindowId |
|
8491 |
||
8492 |
%{ /* NOCONTEXT */ |
|
8493 |
#ifdef GLX |
|
8494 |
SETWIN(aGLXWindowId) |
|
8495 |
winconstraints(); |
|
8496 |
RETURN (true); |
|
8497 |
#endif |
|
8498 |
%} |
|
8499 |
. |
|
8500 |
^ false |
|
8501 |
! |
|
8502 |
||
8503 |
glxWindepth: gwid in: aGLXWindowId |
|
8504 |
||
8505 |
%{ /* NOCONTEXT */ |
|
8506 |
#ifdef GLX |
|
8507 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
8508 |
RETURN (__MKSMALLINT(windepth(_longVal(gwid)))); |
294 | 8509 |
#endif |
8510 |
%} |
|
8511 |
. |
|
8512 |
^ false |
|
8513 |
! |
|
8514 |
||
8515 |
glxWingetIn: aGLXWindowId |
|
8516 |
||
8517 |
%{ /* NOCONTEXT */ |
|
8518 |
#ifdef GLX |
|
8519 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
8520 |
RETURN (__MKSMALLINT(winget())); |
294 | 8521 |
#endif |
8522 |
%} |
|
8523 |
. |
|
8524 |
^ false |
|
8525 |
! |
|
8526 |
||
8527 |
glxWinmoveX: x y: y in: aGLXWindowId |
|
8528 |
||
8529 |
%{ /* NOCONTEXT */ |
|
8530 |
#ifdef GLX |
|
8531 |
SETWIN(aGLXWindowId) |
|
8532 |
winmove(_longVal(x), _longVal(y)); |
|
8533 |
RETURN (true); |
|
8534 |
#endif |
|
8535 |
%} |
|
8536 |
. |
|
8537 |
^ false |
|
8538 |
! |
|
8539 |
||
8540 |
glxWinpopIn: aGLXWindowId |
|
8541 |
||
8542 |
%{ /* NOCONTEXT */ |
|
8543 |
#ifdef GLX |
|
8544 |
SETWIN(aGLXWindowId) |
|
8545 |
winpop(); |
|
8546 |
RETURN (true); |
|
8547 |
#endif |
|
8548 |
%} |
|
8549 |
. |
|
8550 |
^ false |
|
8551 |
! |
|
8552 |
||
8553 |
glxWinpositionX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
8554 |
||
8555 |
%{ /* NOCONTEXT */ |
|
8556 |
#ifdef GLX |
|
8557 |
SETWIN(aGLXWindowId) |
|
8558 |
winposition(_longVal(x1), _longVal(y1), _longVal(x2), _longVal(y2)); |
|
8559 |
RETURN (true); |
|
8560 |
#endif |
|
8561 |
%} |
|
8562 |
. |
|
8563 |
^ false |
|
8564 |
! |
|
8565 |
||
8566 |
glxWinpushIn: aGLXWindowId |
|
8567 |
||
8568 |
%{ /* NOCONTEXT */ |
|
8569 |
#ifdef GLX |
|
8570 |
SETWIN(aGLXWindowId) |
|
8571 |
winpush(); |
|
8572 |
RETURN (true); |
|
8573 |
#endif |
|
8574 |
%} |
|
8575 |
. |
|
8576 |
^ false |
|
8577 |
! |
|
8578 |
||
8579 |
glxWinset: gwid in: aGLXWindowId |
|
8580 |
||
8581 |
%{ /* NOCONTEXT */ |
|
8582 |
#ifdef GLX |
|
8583 |
SETWIN(aGLXWindowId) |
|
8584 |
winset(_longVal(gwid)); |
|
8585 |
RETURN (true); |
|
8586 |
#endif |
|
8587 |
%} |
|
8588 |
. |
|
8589 |
^ false |
|
8590 |
! ! |
|
8591 |
||
0 | 8592 |
!GLXWorkstation methodsFor:'window creation'! |
8593 |
||
12 | 8594 |
createGLXWindowFor:aView left:xpos top:ypos width:wwidth height:wheight type:glxType |
157 | 8595 |
|ext wsuperView wsuperViewId windowId| |
0 | 8596 |
|
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
8597 |
glOK ifFalse:[^ nil]. |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
8598 |
|
793 | 8599 |
wsuperView := aView superView view. |
0 | 8600 |
wsuperView notNil ifTrue:[ |
793 | 8601 |
wsuperViewId := wsuperView id |
0 | 8602 |
]. |
8603 |
||
524 | 8604 |
%{ /* CALLSSTACK: 20000 */ |
0 | 8605 |
Display *dpy = myDpy; |
185 | 8606 |
int screen = __intVal(_INST(screen)); |
0 | 8607 |
Window newWindow, parentWindow; |
12 | 8608 |
int t; |
0 | 8609 |
|
97 | 8610 |
if (__isSmallInteger(xpos) && __isSmallInteger(ypos) |
8611 |
&& __isSmallInteger(wwidth) && __isSmallInteger(wheight)) { |
|
793 | 8612 |
if (__isExternalAddress(wsuperViewId)) { |
8613 |
parentWindow = _WindowVal(wsuperViewId); |
|
8614 |
} else { |
|
8615 |
parentWindow = RootWindow(dpy, screen); |
|
8616 |
} |
|
8617 |
||
8618 |
if (glxType == @symbol(colorIndexSingleBuffer)) |
|
8619 |
t = GLXcolorIndexSingleBuffer; |
|
8620 |
else if (glxType == @symbol(colorIndexDoubleBuffer)) |
|
8621 |
t = GLXcolorIndexDoubleBuffer; |
|
8622 |
else if (glxType == @symbol(rgbSingleBuffer)) |
|
8623 |
t = GLXrgbSingleBuffer; |
|
8624 |
else if (glxType == @symbol(rgbDoubleBuffer)) |
|
8625 |
t = GLXrgbDoubleBuffer; |
|
8626 |
else { |
|
8627 |
RETURN ( nil ); |
|
8628 |
} |
|
8629 |
||
8630 |
ENTERGLX; |
|
8631 |
newWindow = __GLXCreateWindow(dpy, parentWindow, |
|
8632 |
__intVal(xpos), __intVal(ypos), |
|
8633 |
__intVal(wwidth), __intVal(wheight), |
|
8634 |
0, t); |
|
8635 |
LEAVEGLX; |
|
8636 |
||
8637 |
if (! newWindow) { |
|
8638 |
RETURN ( nil ); |
|
8639 |
} |
|
8640 |
||
8641 |
windowId = __MKOBJ(newWindow); |
|
0 | 8642 |
} |
206
4284b80bebdf
changed to use ExternalAddress handles for all Window, Font,
Claus Gittinger <cg@exept.de>
parents:
190
diff
changeset
|
8643 |
%}. |
0 | 8644 |
windowId notNil ifTrue:[ |
793 | 8645 |
self addKnownView:aView withId:windowId. |
0 | 8646 |
]. |
8647 |
^ windowId |
|
20 | 8648 |
! |
8649 |
||
8650 |
unlinkGLXView:aGLXWindowId |
|
8651 |
"remove X/GLX link" |
|
524 | 8652 |
|
8653 |
%{ /* CALLSSTACK: 20000 */ |
|
206
4284b80bebdf
changed to use ExternalAddress handles for all Window, Font,
Claus Gittinger <cg@exept.de>
parents:
190
diff
changeset
|
8654 |
if (__isExternalAddress(aGLXWindowId)) { |
134 | 8655 |
ENTERGLX; |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8656 |
__GLXUnlinkWindow(myDpy, _WindowVal(aGLXWindowId)); |
134 | 8657 |
LEAVEGLX; |
8658 |
} |
|
20 | 8659 |
%} |
0 | 8660 |
! ! |
8661 |
||
294 | 8662 |
!GLXWorkstation methodsFor:'zbuffer'! |
8663 |
||
8664 |
glxZbsize: planes in: aGLXWindowId |
|
127 | 8665 |
|
8666 |
%{ /* NOCONTEXT */ |
|
8667 |
#ifdef FULL_GLX |
|
8668 |
SETWIN(aGLXWindowId) |
|
294 | 8669 |
zbsize(_longVal(planes)); |
8670 |
RETURN (true); |
|
8671 |
#endif |
|
8672 |
%} |
|
8673 |
. |
|
8674 |
^ false |
|
8675 |
! |
|
64 | 8676 |
|
8677 |
glxZbuffer:aBoolean in:aGLXWindowId |
|
8678 |
"enable/disable z-buffer operation" |
|
8679 |
||
8680 |
%{ /* NOCONTEXT */ |
|
8681 |
#ifdef GLX |
|
8682 |
SETWIN(aGLXWindowId) |
|
8683 |
zbuffer(aBoolean == false ? FALSE : TRUE); |
|
8684 |
RETURN (true); |
|
8685 |
#endif |
|
8686 |
%} |
|
8687 |
. |
|
8688 |
^ false |
|
294 | 8689 |
! |
64 | 8690 |
|
8691 |
glxZdraw: b in: aGLXWindowId |
|
8692 |
"enable/disable drawing into the z-buffer" |
|
8693 |
||
8694 |
%{ /* NOCONTEXT */ |
|
8695 |
#ifdef GLX |
|
8696 |
SETWIN(aGLXWindowId) |
|
8697 |
zdraw(_booleanVal(b)); |
|
8698 |
RETURN (true); |
|
8699 |
#endif |
|
8700 |
%} |
|
8701 |
. |
|
8702 |
^ false |
|
294 | 8703 |
! |
64 | 8704 |
|
8705 |
glxZfunction: func in: aGLXWindowId |
|
8706 |
"set the z-buffer comparison function. |
|
8707 |
func may be either the numeric value or a symbol (preferred)" |
|
8708 |
||
8709 |
%{ /* NOCONTEXT */ |
|
8710 |
#ifdef GLX |
|
8711 |
long f; |
|
8712 |
||
8713 |
SETWIN(aGLXWindowId) |
|
8714 |
if (func == @symbol(NEVER)) |
|
77 | 8715 |
f = ZF_NEVER; |
64 | 8716 |
else if (func == @symbol(LESS)) |
77 | 8717 |
f = ZF_LESS; |
64 | 8718 |
else if (func == @symbol(EQUAL)) |
77 | 8719 |
f = ZF_EQUAL; |
64 | 8720 |
else if (func == @symbol(LEQUAL)) |
77 | 8721 |
f = ZF_LEQUAL; |
64 | 8722 |
else if (func == @symbol(GREATER)) |
77 | 8723 |
f = ZF_GREATER; |
64 | 8724 |
else if (func == @symbol(NOTEQUAL)) |
77 | 8725 |
f = ZF_NOTEQUAL; |
64 | 8726 |
else if (func == @symbol(GEQUAL)) |
77 | 8727 |
f = ZF_GEQUAL; |
64 | 8728 |
else if (func == @symbol(ALWAYS)) |
77 | 8729 |
f = ZF_ALWAYS; |
64 | 8730 |
else |
77 | 8731 |
f = _longVal(func); |
64 | 8732 |
zfunction(f); |
8733 |
RETURN (true); |
|
8734 |
#endif |
|
8735 |
%} |
|
8736 |
. |
|
8737 |
^ false |
|
294 | 8738 |
! |
64 | 8739 |
|
8740 |
glxZsource: src in: aGLXWindowId |
|
8741 |
||
8742 |
%{ /* NOCONTEXT */ |
|
8743 |
#ifdef GLX |
|
8744 |
SETWIN(aGLXWindowId) |
|
8745 |
zsource(_longVal(src)); |
|
8746 |
RETURN (true); |
|
8747 |
#endif |
|
8748 |
%} |
|
8749 |
. |
|
8750 |
^ false |
|
294 | 8751 |
! |
64 | 8752 |
|
8753 |
glxZwritemask: mask in: aGLXWindowId |
|
8754 |
||
8755 |
%{ /* NOCONTEXT */ |
|
8756 |
#ifdef GLX |
|
8757 |
SETWIN(aGLXWindowId) |
|
185 | 8758 |
zwritemask((ulong)__intVal(mask)); |
64 | 8759 |
RETURN (true); |
8760 |
#endif |
|
8761 |
%} |
|
8762 |
. |
|
8763 |
^ false |
|
8764 |
! ! |
|
8765 |
||
294 | 8766 |
!GLXWorkstation class methodsFor:'documentation'! |
8767 |
||
8768 |
version |
|
912
1fa9cb1dac83
care for systems where Object is defined (88k) - Object is also defined in VGL
Claus Gittinger <cg@exept.de>
parents:
793
diff
changeset
|
8769 |
^ '$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.58 1996-07-03 09:19:19 cg Exp $' |
89 | 8770 |
! ! |