author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Tue, 03 Oct 2017 11:38:15 +0100 | |
branch | jv |
changeset 8188 | 00df122d8bd4 |
parent 8183 | e1c6a2aa41b6 |
child 8420 | 76e39223f5ab |
child 8622 | ecb4248c23a4 |
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 |
" |
|
3214 | 12 |
"{ Package: 'stx:libview' }" |
13 |
||
7656 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
0 | 16 |
XWorkstation subclass:#GLXWorkstation |
528 | 17 |
instanceVariableNames:'activeWindow hasStereoExtension glOK' |
18 |
classVariableNames:'ForceGL' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'Interface-Graphics' |
|
294 | 21 |
! |
77 | 22 |
|
89 | 23 |
!GLXWorkstation primitiveDefinitions! |
0 | 24 |
%{ |
6617
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
25 |
#include "stxOSDefs.h" |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
26 |
|
8183
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
27 |
|
1899 | 28 |
#ifdef String |
29 |
# undef String |
|
30 |
#endif |
|
31 |
#define String GLX_String |
|
32 |
||
33 |
#ifdef Object |
|
34 |
# undef Object |
|
35 |
#endif |
|
36 |
#define Object GLX_Object |
|
37 |
||
38 |
#undef True |
|
39 |
#undef False |
|
40 |
||
2768 | 41 |
#ifdef Time |
42 |
# undef Time |
|
43 |
#endif |
|
44 |
#define Time X_Time |
|
45 |
||
2422
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
46 |
|
1899 | 47 |
#ifdef __VMS__ |
48 |
# include "vms_Xnames.h" |
|
49 |
#endif |
|
24 | 50 |
|
6617
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
51 |
#ifdef __arm__ |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
52 |
// # define _POSIX_C_SOURCE |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
53 |
#endif |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
54 |
|
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
55 |
#ifndef _STDIO_H_INCLUDED_ |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
56 |
# include <stdio.h> |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
57 |
# define _STDIO_H_INCLUDED_ |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
58 |
#endif |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
59 |
|
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
60 |
#ifdef __arm__ |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
61 |
# ifndef _SYS_TYPES_H_INCLUDED_ |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
62 |
# include <sys/types.h> |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
63 |
# define _SYS_TYPES_H_INCLUDED_ |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
64 |
# endif |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
65 |
# ifndef _SYS_SIGNAL_H_INCLUDED_ |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
66 |
# include <sys/signal.h> |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
67 |
# define _SYS_SIGNAL_H_INCLUDED_ |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
68 |
# endif |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
69 |
|
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
70 |
#endif |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
71 |
|
6254 | 72 |
#ifdef __osx__ |
73 |
# include <sys/signal.h> |
|
74 |
# define DYNAMICALLY_LOADABLE |
|
75 |
#endif |
|
168 | 76 |
|
8181
7cd36eb4b09c
X11: fixed `GLXWorkstation` to compile with OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
7657
diff
changeset
|
77 |
#ifdef __linux__ |
7cd36eb4b09c
X11: fixed `GLXWorkstation` to compile with OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
7657
diff
changeset
|
78 |
# include <signal.h> |
7cd36eb4b09c
X11: fixed `GLXWorkstation` to compile with OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
7657
diff
changeset
|
79 |
#endif |
7cd36eb4b09c
X11: fixed `GLXWorkstation` to compile with OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
7657
diff
changeset
|
80 |
|
8183
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
81 |
#include "GL/gl.h" |
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
82 |
#include "GL/glx.h" |
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
83 |
|
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
84 |
#define OPENGLCONTEXT GLXContext |
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
85 |
#define GLXMAKECURRENT(dpy, draw, con) glXMakeCurrent(dpy, draw, con) |
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
86 |
|
0 | 87 |
|
185 | 88 |
/* |
89 |
* XSGIStereo extension - if available |
|
90 |
*/ |
|
91 |
#ifdef XSGIStereo |
|
92 |
# include <X11/extensions/SGIStereo.h> |
|
93 |
#endif |
|
94 |
||
0 | 95 |
typedef enum { |
96 |
GLXcolorIndexSingleBuffer, |
|
97 |
GLXcolorIndexDoubleBuffer, |
|
98 |
GLXrgbSingleBuffer, |
|
99 |
GLXrgbDoubleBuffer |
|
100 |
} GLXWindowType; |
|
101 |
||
333 | 102 |
# define ENTERGLX __BEGIN_PROTECT_REGISTERS__ |
103 |
# define LEAVEGLX __END_PROTECT_REGISTERS__ |
|
134 | 104 |
|
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
105 |
/* |
8181
7cd36eb4b09c
X11: fixed `GLXWorkstation` to compile with OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
7657
diff
changeset
|
106 |
* stupid again - from now on, we need ST/Xs String again |
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
107 |
*/ |
0 | 108 |
#undef String |
969 | 109 |
#ifdef __DEF_String |
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
110 |
# define String __DEF_String |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
111 |
#endif |
969 | 112 |
#undef Object |
113 |
#ifdef __DEF_Object |
|
114 |
# define Object __DEF_Object |
|
115 |
#endif |
|
0 | 116 |
|
117 |
/* |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
118 |
* mhmh - openGL has its separate gl-context, |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
119 |
* which is distinct (?) from the windowID. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
120 |
* We dont want to add another instvar to View - do we ? |
0 | 121 |
*/ |
8183
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
122 |
#ifndef MAX_OPENGL_VIEWS |
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
123 |
# define MAX_OPENGL_VIEWS 50 |
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
124 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
125 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
126 |
struct windowIDToGLContextMapping { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
127 |
Window win; |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
128 |
OPENGLCONTEXT con; |
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 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
131 |
static struct windowIDToGLContextMapping windowIDToGLContextMapping[MAX_OPENGL_VIEWS]; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
132 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
133 |
static OPENGLCONTEXT |
4718 | 134 |
__glxWindowIdToGLContext(xId) |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
135 |
Window xId; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
136 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
137 |
int i; |
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 |
for (i=0; i<MAX_OPENGL_VIEWS; i++) { |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
140 |
if (windowIDToGLContextMapping[i].win == xId) { |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
141 |
return windowIDToGLContextMapping[i].con; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
142 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
143 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
144 |
return (OPENGLCONTEXT) 0; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
145 |
} |
0 | 146 |
|
157 | 147 |
/* |
148 |
* set the GLXWindow for followup drawing |
|
149 |
*/ |
|
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
150 |
#define SETWIN(aGLXWindowId) \ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
151 |
{ \ |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
152 |
OPENGLCONTEXT context; \ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
153 |
\ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
154 |
if (_INST(activeWindow) != aGLXWindowId) { \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
155 |
if (! ISCONNECTED ) { \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
156 |
RETURN (false); \ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
157 |
} \ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
158 |
if (! __isExternalAddress(aGLXWindowId)) { \ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
159 |
RETURN (false); \ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
160 |
} \ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
161 |
context = (OPENGLCONTEXT) __glxWindowIdToGLContext(_WindowVal(aGLXWindowId)); \ |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
162 |
if (! context) { \ |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
163 |
RETURN (false); \ |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
164 |
} \ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
165 |
GLXMAKECURRENT(myDpy, _WindowVal(aGLXWindowId), context ); \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
166 |
_INST(activeWindow) = aGLXWindowId; \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
167 |
__STORE(self, aGLXWindowId); \ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
168 |
} else { \ |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
169 |
if (aGLXWindowId == nil) { \ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
170 |
RETURN (false); \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
171 |
} \ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
172 |
} \ |
12 | 173 |
} |
174 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
175 |
|
8183
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
176 |
|
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
177 |
|
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
178 |
#define Boolean int |
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
179 |
#define TRUE 1 |
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
180 |
#define FALSE 0 |
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
181 |
#define Coord float |
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
182 |
#define Icoord int |
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
183 |
#define Scoord int |
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
184 |
#define Colorindex int |
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
185 |
#define Linestyle int |
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
186 |
#define Offset int |
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
187 |
#define Angle int |
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
188 |
#define Screencoord int |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
189 |
|
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 |
* some defines - tired of typing ... |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
192 |
* 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
|
193 |
* put/pack them into corresponding c variables. |
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 |
*/ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
196 |
#define myDpy (Display *)(__MKCP(_INST(displayId))) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
197 |
#define ISCONNECTED (_INST(displayId) != nil) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
198 |
#define _WindowVal(o) (Window)(__MKCP(o)) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
199 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
200 |
#define __MKBOOLEAN(b) ((b==FALSE) ? false : true) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
201 |
#define _booleanVal(b) ((b==false) ? (Boolean)FALSE : (Boolean)TRUE) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
202 |
#define _coordVal(c) ((__isFloat(c)) ? (Coord)(_floatVal(c)) : (Coord)(__intVal(c))) |
185 | 203 |
#define _icoordVal(c) ((Icoord)(__intVal(c))) |
204 |
#define _scoordVal(c) ((Scoord)(__intVal(c))) |
|
205 |
#define _screencoordVal(c) ((Screencoord)(__intVal(c))) |
|
206 |
#define _colorindexVal(c) ((Colorindex)(__intVal(c))) |
|
207 |
#define _linestyleVal(l) ((Linestyle)(__intVal(l))) |
|
208 |
#define _shortVal(l) ((short)(__intVal(l))) |
|
209 |
#define _longVal(l) ((long)(__intVal(l))) |
|
210 |
#define _deviceVal(l) ((Device)(__intVal(l))) |
|
211 |
#define _tagVal(l) ((Tag)(__intVal(l))) |
|
969 | 212 |
#define _objectVal(l) ((GLX_Object)(__intVal(l))) |
185 | 213 |
#define _offsetVal(l) ((Offset)(__intVal(l))) |
214 |
#define _rgbVal(l) ((RGBvalue)(__intVal(l))) |
|
215 |
#define _angleVal(c) ((Angle)(__intVal(c))) |
|
157 | 216 |
|
29 | 217 |
/* |
218 |
* 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
|
219 |
* ST-object must be true or false. Return from method if invalid. |
29 | 220 |
*/ |
221 |
#define _BOOLEAN_(arg, dst) \ |
|
30 | 222 |
if (arg==true) \ |
77 | 223 |
dst = (Boolean)TRUE; \ |
30 | 224 |
else if (arg==false) \ |
77 | 225 |
dst = (Boolean)FALSE; \ |
29 | 226 |
else { RETURN(false); } |
227 |
||
228 |
/* |
|
229 |
* check for and fetch a coord from ST-arg into C-dst |
|
157 | 230 |
* ST-object must be Float, SmallInteger or Fraction. |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
231 |
* Return from method if invalid. |
29 | 232 |
*/ |
0 | 233 |
#define _COORD_(arg, dst) \ |
97 | 234 |
if (__isFloat(arg)) \ |
77 | 235 |
dst = (Coord)(_floatVal(arg)); \ |
97 | 236 |
else if (__isSmallInteger(arg)) \ |
185 | 237 |
dst = (Coord)(__intVal(arg)); \ |
97 | 238 |
else if (__isFraction(arg) \ |
239 |
&& __isSmallInteger(_FractionInstPtr(arg)->f_numerator) \ |
|
240 |
&& __isSmallInteger(_FractionInstPtr(arg)->f_denominator)) { \ |
|
77 | 241 |
float n, d; \ |
242 |
\ |
|
185 | 243 |
n = (float)(__intVal(_FractionInstPtr(arg)->f_numerator)); \ |
244 |
d = (float)(__intVal(_FractionInstPtr(arg)->f_denominator)); \ |
|
77 | 245 |
dst = (Coord)(n / d); \ |
29 | 246 |
} else { RETURN(false); } |
247 |
||
248 |
/* |
|
249 |
* check for and fetch an icoord from ST-arg into C-dst |
|
4718 | 250 |
* ST-object must be SmallInteger. Return from method if invalid. |
29 | 251 |
*/ |
252 |
#define _ICOORD_(arg, dst) \ |
|
97 | 253 |
if (__isSmallInteger(arg)) \ |
185 | 254 |
dst = (Icoord)(__intVal(arg)); \ |
29 | 255 |
else { RETURN(false); } |
256 |
||
257 |
/* |
|
157 | 258 |
* check for and fetch an scoord from ST-arg into C-dst |
4718 | 259 |
* ST-object must be SmallInteger. Return from method if invalid. |
29 | 260 |
*/ |
261 |
#define _SCOORD_(arg, dst) \ |
|
97 | 262 |
if (__isSmallInteger(arg)) \ |
185 | 263 |
dst = (Scoord)(__intVal(arg)); \ |
29 | 264 |
else { RETURN(false); } |
265 |
||
266 |
#define _SCREENCOORD_(arg, dst) \ |
|
97 | 267 |
if (__isSmallInteger(arg)) \ |
185 | 268 |
dst = (Screencoord)(__intVal(arg)); \ |
29 | 269 |
else { RETURN(false); } |
270 |
||
271 |
#define _COLORINDEX_(arg, dst) \ |
|
97 | 272 |
if (__isSmallInteger(arg)) \ |
185 | 273 |
dst = (Colorindex)(__intVal(arg)); \ |
29 | 274 |
else { RETURN(false); } |
275 |
||
276 |
#define _ANGLE_(arg, dst) \ |
|
97 | 277 |
if (__isSmallInteger(arg)) \ |
185 | 278 |
dst = (Angle)(__intVal(arg)); \ |
29 | 279 |
else { RETURN(false); } |
0 | 280 |
|
281 |
#define _FLOAT_(arg, dst) \ |
|
97 | 282 |
if (__isFloat(arg)) \ |
77 | 283 |
dst = (float)(_floatVal(arg)); \ |
97 | 284 |
else if (__isSmallInteger(arg)) \ |
185 | 285 |
dst = (float)(__intVal(arg)); \ |
97 | 286 |
else if (__isFraction(arg) \ |
287 |
&& __isSmallInteger(_FractionInstPtr(arg)->f_numerator) \ |
|
288 |
&& __isSmallInteger(_FractionInstPtr(arg)->f_denominator)) { \ |
|
77 | 289 |
float n, d; \ |
290 |
\ |
|
185 | 291 |
n = (float)(__intVal(_FractionInstPtr(arg)->f_numerator)); \ |
292 |
d = (float)(__intVal(_FractionInstPtr(arg)->f_denominator)); \ |
|
77 | 293 |
dst = (float)(n / d); \ |
29 | 294 |
} else { RETURN(false); } |
0 | 295 |
|
296 |
#define _INT_(arg, dst) \ |
|
97 | 297 |
if (__isSmallInteger(arg)) \ |
185 | 298 |
dst = (int)(__intVal(arg)); \ |
29 | 299 |
else { RETURN(false); } |
300 |
||
30 | 301 |
#define _indexedArea(object) \ |
302 |
(((char *) (_InstPtr(object))) \ |
|
77 | 303 |
+ OHDR_SIZE \ |
185 | 304 |
+ (__intVal(_ClassInstPtr(__qClass(object))->c_ninstvars)) * sizeof(OBJ)) |
77 | 305 |
%} |
306 |
! ! |
|
307 |
||
168 | 308 |
!GLXWorkstation primitiveVariables! |
309 |
%{ |
|
310 |
/* |
|
311 |
* remembered info from private error handler |
|
312 |
*/ |
|
4164
390662205891
#resourceIdOfLastError return ExternalAddress as in XWorkstation
Stefan Vogel <sv@exept.de>
parents:
3743
diff
changeset
|
313 |
static char lastErrorMsg[128] = ""; |
390662205891
#resourceIdOfLastError return ExternalAddress as in XWorkstation
Stefan Vogel <sv@exept.de>
parents:
3743
diff
changeset
|
314 |
static unsigned INT lastRequestCode = 0; |
390662205891
#resourceIdOfLastError return ExternalAddress as in XWorkstation
Stefan Vogel <sv@exept.de>
parents:
3743
diff
changeset
|
315 |
static unsigned INT lastMinorCode = 0; |
390662205891
#resourceIdOfLastError return ExternalAddress as in XWorkstation
Stefan Vogel <sv@exept.de>
parents:
3743
diff
changeset
|
316 |
static unsigned INT lastResource = 0; |
168 | 317 |
|
318 |
%} |
|
319 |
! ! |
|
320 |
||
89 | 321 |
!GLXWorkstation primitiveFunctions! |
77 | 322 |
%{ |
151 | 323 |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
324 |
#ifdef DYNAMICALLY_LOADABLE |
168 | 325 |
/* |
326 |
* catch X-errors and forward as errorInterrupt:#DisplayError, |
|
4251 | 327 |
* (which itself invokes my handler and optionally raises an exception) |
168 | 328 |
* the implementation below is somewhat wrong: it will |
329 |
* report all errors for Display, even though there could be |
|
330 |
* more than one display connection. (being fixed, new errorInterrupt mechanism |
|
331 |
* allows passing an additional argument, which is the displayID ...) |
|
332 |
* |
|
4251 | 333 |
* this duplicates the functionality as found in XWorkstation; |
168 | 334 |
* the reason is to allow dynamic loading systems to load this module |
335 |
* before XWorkstation (which was not possible otherwise, due to unresolved |
|
336 |
* external references while loading this one) |
|
337 |
*/ |
|
8183
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
338 |
static int |
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
339 |
__XErrorHandler__(Display *dpy, XErrorEvent *event) |
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
340 |
; |
168 | 341 |
{ |
342 |
XGetErrorText(dpy, event->error_code, lastErrorMsg, 80); |
|
343 |
if (lastErrorMsg[0] == '\0') { |
|
4718 | 344 |
sprintf(lastErrorMsg, "code: %d", event->error_code); |
168 | 345 |
} |
346 |
lastRequestCode = event->request_code; |
|
347 |
lastMinorCode = event->minor_code; |
|
348 |
lastResource = event->resourceid; |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
349 |
if ((event->error_code == BadWindow) && (lastRequestCode == 4) && (lastMinorCode == 0)) { |
4718 | 350 |
/* |
351 |
* this is a BadWindow error for X_DestroyWindow. |
|
352 |
* ignore it here, since it results from the GC freeing windows |
|
353 |
* in non bottom-up window order. |
|
354 |
*/ |
|
355 |
return 0; |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
356 |
} |
168 | 357 |
|
218
10072d9beba5
can now turn off Xlib error messages from the errorHandler
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
358 |
if (@global(ErrorPrinting) == true) { |
4718 | 359 |
console_fprintf(stderr, "GLXWORKSTAT: x-error caught maj=%d (0x%x) min=%d (0x%x) resource=%x\n", |
360 |
event->request_code, event->request_code, |
|
361 |
event->minor_code, event->minor_code, event->resourceid); |
|
362 |
console_fprintf(stderr, "GLXWORKSTAT: x-error message is [%d] '%s'\n", event->error_code, lastErrorMsg); |
|
218
10072d9beba5
can now turn off Xlib error messages from the errorHandler
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
363 |
} |
168 | 364 |
|
207
9124817bbb03
use new c-pointer wrapper macros (based on externalAddress)
Claus Gittinger <cg@exept.de>
parents:
206
diff
changeset
|
365 |
__errorInterruptWithIDAndParameter__(@symbol(DisplayError), __MKOBJ(dpy)); |
168 | 366 |
return 0; |
367 |
} |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
368 |
#else |
8183
e1c6a2aa41b6
X11: drop suport for VOGL and old MESA in favour of OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8181
diff
changeset
|
369 |
extern int __XErrorHandler__(Display *dpy, XErrorEvent *event); |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
370 |
#endif |
168 | 371 |
|
4718 | 372 |
/* |
151 | 373 |
* begin moved from GLXsupport.c |
374 |
*/ |
|
375 |
||
376 |
/* |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
377 |
* This provides a helper function "GLXCreateWindow", which does |
4718 | 378 |
* all the necessary magic to create an X window suitable for GL drawing |
379 |
* to take place within. See the definition of GLXCreateWindow for a |
|
151 | 380 |
* description of how to call it. |
381 |
* |
|
382 |
* claus: I really had no time to look into all this, |
|
383 |
* this file has been just copied from a 4Dgifts demo .. |
|
384 |
* (will need more than a day to show more ...) |
|
385 |
*/ |
|
1932 | 386 |
#if !defined(OPENGL) |
151 | 387 |
|
1899 | 388 |
# include <X11/Xlib.h> |
389 |
# include <X11/Xutil.h> |
|
390 |
# ifndef VGL |
|
4718 | 391 |
# include <gl/glws.h> |
1899 | 392 |
# endif |
6617
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
393 |
# ifndef _SIGNAL_H_INCLUDED_ |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
394 |
# include <signal.h> |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
395 |
# endif |
1899 | 396 |
# include <setjmp.h> |
397 |
# include "stcIntern.h" |
|
151 | 398 |
|
399 |
/* |
|
400 |
* glxhelper.h: |
|
401 |
* |
|
402 |
* List of drawing modes supported by GLXCreateWindow (in glxhelper.c). |
|
4718 | 403 |
* More than this are possible with mixed model, but this is just an |
404 |
* example. You can either expand this list (and the corresponding code in |
|
405 |
* GLXCreateWindow) or call the mixed model calls yourself, using |
|
151 | 406 |
* GLXCreateWindow as an example. |
407 |
*/ |
|
408 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
409 |
static char * |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
410 |
typeToName[] = { |
151 | 411 |
"color index single buffer", |
412 |
"color index double buffer", |
|
413 |
"rgb single buffer", |
|
414 |
"rgb double buffer", |
|
415 |
}; |
|
416 |
||
1932 | 417 |
#endif /* GLX || VGL */ |
418 |
||
419 |
#if defined(GLX) && !defined(VGL) |
|
151 | 420 |
/* |
421 |
* Dorky little helper function used to build up a GLXconfig array. |
|
422 |
*/ |
|
423 |
||
4718 | 424 |
static void |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
425 |
set_entry (GLXconfig* ptr, int b, int m, int a) |
151 | 426 |
{ |
427 |
ptr->buffer = b; |
|
428 |
ptr->mode = m; |
|
429 |
ptr->arg = a; |
|
430 |
} |
|
1932 | 431 |
#endif /* GLX & not VGL */ |
151 | 432 |
|
4711 | 433 |
static stx_jmp_buf errorReturn; |
151 | 434 |
|
435 |
static void |
|
436 |
glAbort() { |
|
6002 | 437 |
stx_longjmp(errorReturn, 1); |
151 | 438 |
} |
439 |
||
440 |
/* |
|
441 |
* GLXCreateWindow(dpy, parent, x, y, w, h, boderWidth, type) |
|
442 |
* |
|
443 |
* Return value is the X window id of the newly created window. |
|
444 |
* |
|
445 |
* Arguments are: |
|
446 |
* dpy The X "Display*" returned by XOpenDisplay |
|
447 |
* parent The parent of the newly created window, |
|
448 |
* a typical value for this is |
|
449 |
* RootWindow(dpy, DefaultScreen(dpy)) |
|
450 |
* x,y The location of the window to be created, |
|
451 |
* y coordinate is measured from the top down. |
|
452 |
* w,h size of the new window |
|
453 |
* borderWidth the X border size for this window, should probably |
|
454 |
* be zero. |
|
455 |
* type the GLXWindowType (see glxhelper.h) desribing the |
|
456 |
* typer of GL drawing to be done in this window |
|
457 |
*/ |
|
4718 | 458 |
Window |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
459 |
__GLXCreateWindow(dpy, parent, x, y, w, h, borderWidth, type) |
151 | 460 |
Display* dpy; |
461 |
Window parent; |
|
462 |
GLXWindowType type; |
|
463 |
{ |
|
1932 | 464 |
#if !defined(OPENGL) |
465 |
# ifndef VGL |
|
151 | 466 |
GLXconfig params[50]; |
467 |
GLXconfig* next; |
|
468 |
GLXconfig* retconfig; |
|
469 |
Colormap cmap = DefaultColormap(dpy, DefaultScreen(dpy)); |
|
1932 | 470 |
# endif |
471 |
#endif |
|
472 |
Visual visual; |
|
151 | 473 |
XVisualInfo *vis; |
474 |
XVisualInfo template; |
|
475 |
XColor white; |
|
476 |
XSetWindowAttributes cwa; |
|
477 |
XWindowAttributes pwa; |
|
478 |
int scr, i, nret; |
|
479 |
Window win; |
|
1932 | 480 |
#ifdef HAS_SIGACTION |
6617
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
481 |
struct sigaction oldSigSegv, newSigSegv; |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
482 |
#else |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
483 |
void *oldSigSegv; |
1932 | 484 |
#endif |
485 |
||
486 |
#if !defined(OPENGL) |
|
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
487 |
__catchExit(1); |
1932 | 488 |
#endif |
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
489 |
|
6002 | 490 |
if (stx_setjmp(errorReturn)) { |
4718 | 491 |
console_fprintf(stderr, "hard error in GL - return\n"); |
6617
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
492 |
#ifdef SIGSEGV |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
493 |
# ifdef HAS_SIGACTION |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
494 |
sigaction(SIGSEGV, &oldSigSegv, 0); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
495 |
# else |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
496 |
signal(SIGSEGV, oldSigSegv); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
497 |
# endif |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
498 |
#endif |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
499 |
|
1932 | 500 |
#if !defined(OPENGL) |
4718 | 501 |
__catchExit(0); |
502 |
#endif |
|
503 |
return 0; |
|
151 | 504 |
} |
505 |
__CONT__ |
|
506 |
||
1932 | 507 |
if (w <= 0) { |
4718 | 508 |
console_fprintf(stderr, "GL: bad width: %d\n", w); |
509 |
w = 1; |
|
1932 | 510 |
} |
511 |
if (h <= 0) { |
|
4718 | 512 |
console_fprintf(stderr, "GL: bad height: %d\n", h); |
513 |
h = 1; |
|
1932 | 514 |
} |
515 |
||
516 |
#if !defined(OPENGL) |
|
1899 | 517 |
# ifdef VGL |
151 | 518 |
/* |
519 |
* I know what VGL supports; its somewhat unclean to hard code it here |
|
520 |
*/ |
|
521 |
switch (type) { |
|
522 |
case GLXcolorIndexSingleBuffer: |
|
523 |
case GLXcolorIndexDoubleBuffer: |
|
4718 | 524 |
break; |
151 | 525 |
|
526 |
case GLXrgbSingleBuffer: |
|
527 |
case GLXrgbDoubleBuffer: |
|
4718 | 528 |
console_fprintf(stderr, "Sorry, VGL can't support %s type of windows\n", typeToName[type]); |
529 |
__catchExit(0); |
|
530 |
return 0; |
|
151 | 531 |
} |
532 |
||
533 |
scr = DefaultScreen(dpy); |
|
534 |
visual.visualid = CopyFromParent; |
|
535 |
cwa.border_pixel = 0; /* Even if we don't use it, it must be something */ |
|
536 |
win = XCreateWindow(dpy, parent, x, y, w, h, |
|
4718 | 537 |
borderWidth, DisplayPlanes(dpy, scr), |
538 |
InputOutput, &visual, |
|
539 |
CWBorderPixel, &cwa); |
|
151 | 540 |
|
541 |
/* |
|
389
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
542 |
* on some, seg-violations occur in the GL, if too many |
151 | 543 |
* views are created ... just to make certain, we catch those |
544 |
* in GL too. |
|
545 |
*/ |
|
6617
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
546 |
# ifdef SIGSEGV |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
547 |
# ifdef HAS_SIGACTION |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
548 |
sigaction(SIGSEGV, (struct sigaction *)0, &oldSigSegv); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
549 |
newSigSegv = oldSigSegv; |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
550 |
newSigSegv.sa_handler = glAbort; |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
551 |
sigaction(SIGSEGV, &newSigSegv, (struct sigaction *)0); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
552 |
# else |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
553 |
oldSigSegv = signal(SIGSEGV, glAbort); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
554 |
# endif |
1899 | 555 |
# endif |
6617
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
556 |
|
151 | 557 |
i = GLXlink(dpy, win); |
6617
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
558 |
|
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
559 |
# ifdef SIGSEGV |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
560 |
# ifdef HAS_SIGACTION |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
561 |
sigaction(SIGSEGV, &oldSigSegv, (struct sigaction *)0); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
562 |
# else |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
563 |
signal(SIGSEGV, oldSigSegv); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
564 |
# endif |
1899 | 565 |
# endif |
151 | 566 |
|
567 |
if (i < 0) { |
|
4718 | 568 |
console_fprintf(stderr, "GLXlink returned %d\n", i); |
569 |
__catchExit(0); |
|
570 |
return 0; |
|
151 | 571 |
} |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
572 |
|
1899 | 573 |
# else /* not VGL */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
574 |
|
151 | 575 |
/* |
576 |
* This builds an array in "params" that describes for GLXgetconfig(3G) |
|
577 |
* the type of GL drawing that will be done. |
|
578 |
*/ |
|
579 |
next = params; |
|
580 |
switch (type) { |
|
581 |
case GLXcolorIndexSingleBuffer: |
|
4718 | 582 |
set_entry(next++, GLX_NORMAL, GLX_RGB, FALSE); |
583 |
set_entry(next++, GLX_NORMAL, GLX_DOUBLE, FALSE); |
|
584 |
break; |
|
151 | 585 |
case GLXcolorIndexDoubleBuffer: |
4718 | 586 |
set_entry(next++, GLX_NORMAL, GLX_RGB, FALSE); |
587 |
set_entry(next++, GLX_NORMAL, GLX_DOUBLE, TRUE); |
|
588 |
break; |
|
151 | 589 |
case GLXrgbSingleBuffer: |
4718 | 590 |
set_entry(next++, GLX_NORMAL, GLX_RGB, TRUE); |
591 |
set_entry(next++, GLX_NORMAL, GLX_DOUBLE, FALSE); |
|
592 |
break; |
|
151 | 593 |
case GLXrgbDoubleBuffer: |
4718 | 594 |
set_entry(next++, GLX_NORMAL, GLX_RGB, TRUE); |
595 |
set_entry(next++, GLX_NORMAL, GLX_DOUBLE, TRUE); |
|
596 |
break; |
|
151 | 597 |
} |
598 |
set_entry(next, 0, 0, 0); /* The input to GLXgetconfig is null terminated */ |
|
599 |
||
600 |
/* |
|
601 |
* Get configuration data for a window based on above parameters |
|
602 |
* First we have to find out which screen the parent window is on, |
|
603 |
* then we can call GXLgetconfig() |
|
604 |
*/ |
|
605 |
XGetWindowAttributes(dpy, parent, &pwa); |
|
606 |
retconfig = GLXgetconfig(dpy, XScreenNumberOfScreen(pwa.screen), params); |
|
607 |
if (retconfig == 0) { |
|
4718 | 608 |
console_fprintf(stderr, "Sorry, can't support %s type of windows\n", typeToName[type]); |
609 |
__catchExit(0); |
|
610 |
return 0; |
|
151 | 611 |
} |
612 |
||
613 |
/* |
|
614 |
* Scan through config info, pulling info needed to create a window |
|
615 |
* that supports the rendering mode. |
|
616 |
*/ |
|
617 |
for (next = retconfig; next->buffer; next++) { |
|
4718 | 618 |
unsigned long buffer = next->buffer; |
619 |
unsigned long mode = next->mode; |
|
620 |
unsigned long value = next->arg; |
|
621 |
switch (mode) { |
|
622 |
case GLX_COLORMAP: |
|
623 |
if (buffer == GLX_NORMAL) { |
|
624 |
cmap = value; |
|
625 |
} |
|
626 |
break; |
|
627 |
case GLX_VISUAL: |
|
628 |
if (buffer == GLX_NORMAL) { |
|
629 |
template.visualid = value; |
|
630 |
template.screen = DefaultScreen(dpy); |
|
631 |
vis = XGetVisualInfo(dpy, VisualScreenMask|VisualIDMask, |
|
632 |
&template, &nret); |
|
633 |
} |
|
634 |
break; |
|
635 |
} |
|
151 | 636 |
} |
637 |
||
638 |
/* |
|
639 |
* Create the window |
|
640 |
*/ |
|
641 |
cwa.colormap = cmap; |
|
642 |
cwa.border_pixel = 0; /* Even if we don't use it, it must be something */ |
|
643 |
win = XCreateWindow(dpy, parent, x, y, w, h, |
|
4718 | 644 |
borderWidth, vis->depth, InputOutput, vis->visual, |
645 |
CWColormap|CWBorderPixel, &cwa); |
|
151 | 646 |
|
647 |
/* |
|
648 |
* Rescan configuration info and find window slot that getconfig |
|
649 |
* provided. Fill it in with the window we just created. |
|
650 |
*/ |
|
651 |
for (next = retconfig; next->buffer; next++) { |
|
4718 | 652 |
if ((next->buffer == GLX_NORMAL) && (next->mode == GLX_WINDOW)) { |
653 |
next->arg = win; |
|
654 |
break; |
|
655 |
} |
|
151 | 656 |
} |
657 |
||
658 |
/* |
|
659 |
* Now "retconfig" contains all the information the GL needs to |
|
660 |
* configure the window and its own internal state. |
|
661 |
*/ |
|
662 |
/* |
|
389
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
663 |
* on iris, seg-violations occur in the GL, if too many |
151 | 664 |
* views are created ... |
665 |
*/ |
|
6617
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
666 |
# ifdef SIGSEGV |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
667 |
# ifdef HAS_SIGACTION |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
668 |
sigaction(SIGSEGV, (struct sigaction *)0, &oldSigSegv); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
669 |
newSigSegv = oldSigSegv; |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
670 |
newSigSegv.sa_handler = glAbort; |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
671 |
sigaction(SIGSEGV, &newSigSegv, (struct sigaction *)0); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
672 |
# else |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
673 |
oldSigSegv = signal(SIGSEGV, glAbort); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
674 |
# endif |
1899 | 675 |
# endif |
6617
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
676 |
|
151 | 677 |
i = GLXlink(dpy, retconfig); |
6617
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
678 |
|
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
679 |
# ifdef SIGSEGV |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
680 |
# ifdef HAS_SIGACTION |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
681 |
sigaction(SIGSEGV, &oldSigSegv, (struct sigaction *)0); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
682 |
# else |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
683 |
signal(SIGSEGV, oldSigSegv); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
684 |
# endif |
1899 | 685 |
# endif |
151 | 686 |
|
687 |
if (i < 0) { |
|
4718 | 688 |
console_fprintf(stderr, "GLXlink returned %d\n", i); |
689 |
__catchExit(0); |
|
690 |
return 0; |
|
151 | 691 |
} |
692 |
||
693 |
/* |
|
694 |
* The GL sets its own X error handlers, which exits - this is not what we want |
|
695 |
*/ |
|
696 |
XSetErrorHandler(__XErrorHandler__); |
|
1899 | 697 |
# endif /* not VGL */ |
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
698 |
__catchExit(0); |
1932 | 699 |
|
700 |
#else /* OPENGL | MESA */ |
|
701 |
||
702 |
scr = DefaultScreen(dpy); |
|
703 |
visual.visualid = CopyFromParent; |
|
704 |
cwa.border_pixel = 0; /* Even if we don't use it, it must be something */ |
|
705 |
win = XCreateWindow(dpy, parent, x, y, w, h, |
|
4718 | 706 |
borderWidth, DisplayPlanes(dpy, scr), |
707 |
InputOutput, &visual, |
|
708 |
CWBorderPixel, &cwa); |
|
1932 | 709 |
|
710 |
vis = XGetVisualInfo(dpy, VisualScreenMask|VisualIDMask, &visual, &nret); |
|
4718 | 711 |
console_fprintf(stderr, "vis is %x\n", vis); |
1932 | 712 |
#endif /* GLX || VGL */ |
713 |
||
151 | 714 |
return win; |
715 |
} |
|
716 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
717 |
__GLXUnlinkWindow(dpy, win) |
151 | 718 |
Display* dpy; |
719 |
Window win; |
|
720 |
{ |
|
721 |
/* |
|
722 |
* only needed for VGL - GLX does it automatically |
|
723 |
*/ |
|
1932 | 724 |
#ifdef VGL |
151 | 725 |
GLXunlink(dpy, win); |
1932 | 726 |
#endif |
151 | 727 |
} |
728 |
||
29 | 729 |
/* |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
730 |
* helper for rotation - calls rot() |
29 | 731 |
*/ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
732 |
OBJ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
733 |
__glx_doRotate(angle, axis) |
29 | 734 |
OBJ angle; |
735 |
char axis; |
|
736 |
{ |
|
737 |
float f_angle; |
|
738 |
||
35 | 739 |
if (__isFloat(angle)) { |
4718 | 740 |
f_angle = (float)(_floatVal(angle)); |
741 |
if (f_angle != 0.0) { |
|
742 |
#ifdef OPENGL |
|
743 |
#else |
|
744 |
rot(f_angle, axis); |
|
745 |
#endif |
|
746 |
} |
|
747 |
return (true); |
|
29 | 748 |
} |
35 | 749 |
if (__isFraction(angle) |
97 | 750 |
&& __isSmallInteger(_FractionInstPtr(angle)->f_numerator) |
751 |
&& __isSmallInteger(_FractionInstPtr(angle)->f_denominator)) { |
|
4718 | 752 |
float n, d; |
753 |
||
754 |
n = (float)(__intVal(_FractionInstPtr(angle)->f_numerator)); |
|
755 |
d = (float)(__intVal(_FractionInstPtr(angle)->f_denominator)); |
|
756 |
f_angle = n / d; |
|
757 |
if (f_angle != 0.0) { |
|
758 |
#ifdef OPENGL |
|
759 |
#else |
|
760 |
rot(f_angle, axis); |
|
761 |
#endif |
|
762 |
} |
|
763 |
return (true); |
|
29 | 764 |
} |
97 | 765 |
if (__isSmallInteger(angle)) { |
4718 | 766 |
f_angle = (float)(__intVal(angle)); |
767 |
if (f_angle != 0.0) { |
|
768 |
#ifdef OPENGL |
|
769 |
#else |
|
770 |
rot(f_angle, axis); |
|
771 |
#endif |
|
772 |
} |
|
773 |
return (true); |
|
29 | 774 |
} |
775 |
return false; |
|
776 |
} |
|
0 | 777 |
|
24 | 778 |
/* |
29 | 779 |
* fetch integers from an st-array (elements must be smallIntegers) |
780 |
*/ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
781 |
long * |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
782 |
__glx_getLongsFromInto(obj, vec, count) |
29 | 783 |
OBJ obj; |
784 |
long *vec; |
|
785 |
{ |
|
786 |
OBJ cls, o; |
|
787 |
int nByte, i, ninstVars, nInstBytes; |
|
788 |
char *pElem; |
|
789 |
||
790 |
if (! _isNonNilObject(obj)) return (long *)NULL; |
|
134 | 791 |
cls = __qClass(obj); |
185 | 792 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
29 | 793 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 794 |
nByte = __qSize(obj) - nInstBytes; |
29 | 795 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
796 |
if (nByte < (count * sizeof(OBJ))) return (long *)NULL; |
|
797 |
for (i=0; i<count; i++) { |
|
4718 | 798 |
o = *(OBJ *)pElem; |
799 |
if (! __isSmallInteger(o)) return (long *)NULL; |
|
800 |
vec[i] = (long)__intVal(o); |
|
801 |
pElem += sizeof(OBJ); |
|
29 | 802 |
} |
803 |
return vec; |
|
804 |
} |
|
805 |
||
806 |
/* |
|
807 |
* fetch shorts from an st-array (elements must be smallIntegers) |
|
808 |
*/ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
809 |
short * |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
810 |
__glx_getShortsFromInto(obj, vec, count) |
29 | 811 |
OBJ obj; |
812 |
short *vec; |
|
813 |
{ |
|
814 |
OBJ cls, o; |
|
815 |
int nByte, i, ninstVars, nInstBytes; |
|
816 |
char *pElem; |
|
817 |
||
818 |
if (! _isNonNilObject(obj)) return (short *)NULL; |
|
134 | 819 |
cls = __qClass(obj); |
185 | 820 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
29 | 821 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 822 |
nByte = __qSize(obj) - nInstBytes; |
29 | 823 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
824 |
if (nByte < (count * sizeof(OBJ))) return (short *)NULL; |
|
825 |
for (i=0; i<count; i++) { |
|
4718 | 826 |
o = *(OBJ *)pElem; |
827 |
if (! __isSmallInteger(o)) return (short *)NULL; |
|
828 |
vec[i] = (short)__intVal(o); |
|
829 |
pElem += sizeof(OBJ); |
|
29 | 830 |
} |
831 |
return vec; |
|
832 |
} |
|
833 |
||
834 |
/* |
|
4718 | 835 |
* fetch floats from an st-object into a c-float array |
29 | 836 |
* which may be a floatArray, doubleArray or array-of-something, |
837 |
* where something may be a float, fraction or smallInteger, |
|
24 | 838 |
*/ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
839 |
float * |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
840 |
__glx_getFloatsFromInto(obj, vec, count) |
12 | 841 |
OBJ obj; |
842 |
float *vec; |
|
843 |
{ |
|
844 |
OBJ cls; |
|
845 |
int nByte; |
|
846 |
OBJ o; |
|
847 |
int i, ninstVars, nInstBytes; |
|
848 |
char *pElem; |
|
849 |
||
850 |
if (! _isNonNilObject(obj)) return (float *)0; |
|
851 |
||
134 | 852 |
cls = __qClass(obj); |
185 | 853 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
12 | 854 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 855 |
nByte = __qSize(obj) - nInstBytes; |
12 | 856 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
857 |
||
185 | 858 |
switch (__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) { |
12 | 859 |
case FLOATARRAY: |
4718 | 860 |
/* |
861 |
* best speed for float array |
|
862 |
* - the data is already as we want it |
|
863 |
*/ |
|
864 |
if (nByte < (count * sizeof(float))) return (float *)0; |
|
865 |
return (float *)pElem; |
|
12 | 866 |
|
867 |
case DOUBLEARRAY: |
|
4718 | 868 |
/* |
869 |
* for double array, have to copy-and-cast |
|
870 |
*/ |
|
871 |
if (nByte < (count * sizeof(double))) return (float *)0; |
|
872 |
for (i=0; i<count; i++) { |
|
873 |
vec[i] = *((double *)pElem); |
|
874 |
pElem += sizeof(double); |
|
875 |
} |
|
876 |
return vec; |
|
12 | 877 |
|
878 |
case POINTERARRAY: |
|
4718 | 879 |
/* |
880 |
* for other array, have to fetch, check and store |
|
881 |
* the elements can be floats, smallintegers or fractions |
|
882 |
*/ |
|
883 |
if (nByte < (count * sizeof(OBJ))) return (float *)0; |
|
884 |
/* get elements one-by-one */ |
|
885 |
for (i=0; i<count; i++) { |
|
886 |
o = *(OBJ *)pElem; |
|
887 |
if (__isFloat(o)) { |
|
888 |
vec[i] = _floatVal(o); |
|
889 |
} else if (__isSmallInteger(o)) { |
|
890 |
vec[i] = (float)(__intVal(o)); |
|
891 |
} else if (__isFraction(o) |
|
892 |
&& __isSmallInteger(_FractionInstPtr(o)->f_numerator) |
|
893 |
&& __isSmallInteger(_FractionInstPtr(o)->f_denominator)) { |
|
894 |
float n, d; |
|
895 |
||
896 |
n = (float)(__intVal(_FractionInstPtr(o)->f_numerator)); |
|
897 |
d = (float)(__intVal(_FractionInstPtr(o)->f_denominator)); |
|
898 |
vec[i] = n / d; |
|
899 |
} else |
|
900 |
return 0; |
|
901 |
pElem += sizeof(OBJ); |
|
902 |
} |
|
903 |
return vec; |
|
12 | 904 |
} |
905 |
return (float *)0; |
|
906 |
} |
|
907 |
||
29 | 908 |
/* |
4718 | 909 |
* fetch doubles from an st-object into a c-double array |
29 | 910 |
* which may be a floatArray, doubleArray or array-of-something, |
911 |
* where something may be a float, fraction or smallInteger, |
|
912 |
*/ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
913 |
double * |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
914 |
__glx_getDoublesFromInto(obj, vec, count) |
29 | 915 |
OBJ obj; |
916 |
double *vec; |
|
917 |
{ |
|
918 |
OBJ cls, o; |
|
919 |
int nByte, i, ninstVars, nInstBytes; |
|
920 |
char *pElem; |
|
921 |
||
922 |
if (! _isNonNilObject(obj)) return (double *)0; |
|
134 | 923 |
cls = __qClass(obj); |
185 | 924 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
29 | 925 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 926 |
nByte = __qSize(obj) - nInstBytes; |
29 | 927 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
928 |
||
185 | 929 |
switch (__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) { |
29 | 930 |
case DOUBLEARRAY: |
4718 | 931 |
/* best speed for double array - the data is already as we want it */ |
932 |
if (nByte < (count * sizeof(double))) return (double *)0; |
|
933 |
return (double *)pElem; |
|
29 | 934 |
|
935 |
case FLOATARRAY: |
|
4718 | 936 |
if (nByte < (count * sizeof(float))) return (double *)0; |
937 |
for (i=0; i<count; i++) { |
|
938 |
vec[i] = *((float *)pElem); |
|
939 |
pElem += sizeof(float); |
|
940 |
} |
|
941 |
return vec; |
|
29 | 942 |
|
943 |
case POINTERARRAY: |
|
4718 | 944 |
if (nByte < (count * sizeof(OBJ))) return (double *)0; |
945 |
/* get elements one-by-one */ |
|
946 |
for (i=0; i<count; i++) { |
|
947 |
o = *(OBJ *)pElem; |
|
948 |
if (__isFloat(o)) |
|
949 |
vec[i] = _floatVal(o); |
|
950 |
else if (__isSmallInteger(o)) |
|
951 |
vec[i] = (double)(__intVal(o)); |
|
952 |
else if (__isFraction(o) |
|
953 |
&& __isSmallInteger(_FractionInstPtr(o)->f_numerator) |
|
954 |
&& __isSmallInteger(_FractionInstPtr(o)->f_denominator)) { |
|
955 |
double n, d; |
|
956 |
||
957 |
n = (double)(__intVal(_FractionInstPtr(o)->f_numerator)); |
|
958 |
d = (double)(__intVal(_FractionInstPtr(o)->f_denominator)); |
|
959 |
vec[i] = n / d; |
|
960 |
||
961 |
} else |
|
962 |
return 0; |
|
963 |
pElem += sizeof(OBJ); |
|
964 |
} |
|
965 |
return vec; |
|
29 | 966 |
} |
967 |
return (double *)0; |
|
968 |
} |
|
969 |
||
970 |
/* |
|
971 |
* move from a c-float array into an st-object, |
|
972 |
* the st-object MUST be either a float- or double array |
|
973 |
*/ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
974 |
__glx_putFloatsFromInto(vec, obj, count) |
12 | 975 |
OBJ obj; |
976 |
float *vec; |
|
977 |
{ |
|
978 |
OBJ cls; |
|
979 |
int nByte; |
|
980 |
OBJ o; |
|
981 |
int i, ninstVars, nInstBytes; |
|
982 |
char *pElem; |
|
983 |
||
984 |
if (! _isNonNilObject(obj)) return 0; |
|
985 |
||
134 | 986 |
cls = __qClass(obj); |
185 | 987 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
12 | 988 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 989 |
nByte = __qSize(obj) - nInstBytes; |
12 | 990 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
991 |
||
185 | 992 |
switch (__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) { |
12 | 993 |
case FLOATARRAY: |
4718 | 994 |
if (nByte < (count * sizeof(float))) return 0; |
995 |
for (i=0; i<count; i++) { |
|
996 |
*(float *)pElem = vec[i]; |
|
997 |
pElem += sizeof(float); |
|
998 |
} |
|
999 |
return 1; |
|
12 | 1000 |
|
1001 |
case DOUBLEARRAY: |
|
4718 | 1002 |
if (nByte < (count * sizeof(float))) return 0; |
1003 |
for (i=0; i<count; i++) { |
|
1004 |
*(double *)pElem = vec[i]; |
|
1005 |
pElem += sizeof(double); |
|
1006 |
} |
|
1007 |
return 1; |
|
12 | 1008 |
} |
1009 |
/* not implemented for others */ |
|
1010 |
||
1011 |
return 0; |
|
1012 |
} |
|
1013 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1014 |
#ifndef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1015 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1016 |
Matrix * |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1017 |
__glx_getFloatsFromMatrixInto(obj, mp) |
12 | 1018 |
OBJ obj; |
1019 |
Matrix *mp; |
|
1020 |
{ |
|
1021 |
OBJ cls; |
|
1022 |
int nByte; |
|
1023 |
OBJ o; |
|
29 | 1024 |
int ninstVars, nInstBytes; |
1025 |
char *pElem; |
|
1026 |
int x = 0; |
|
1027 |
int i,j; |
|
12 | 1028 |
|
1029 |
if (! _isNonNilObject(obj)) return (Matrix *)0; |
|
1030 |
||
134 | 1031 |
cls = __qClass(obj); |
185 | 1032 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
29 | 1033 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 1034 |
nByte = __qSize(obj) - nInstBytes; |
29 | 1035 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
1036 |
||
185 | 1037 |
switch (__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) { |
4718 | 1038 |
case FLOATARRAY: |
1039 |
/* |
|
1040 |
* very easy for FLOATARRAY objects - no copying needed |
|
1041 |
*/ |
|
1042 |
if (nByte < (16 * sizeof(float))) return (Matrix *)0; |
|
1043 |
return (Matrix *) _FloatArrayInstPtr(obj)->f_element; |
|
1044 |
||
1045 |
case DOUBLEARRAY: |
|
1046 |
/* |
|
1047 |
* for DOUBLEARRAY objects copy and cast |
|
1048 |
*/ |
|
1049 |
if (nByte < (16 * sizeof(double))) return (Matrix *)0; |
|
1050 |
for (i=0; i<4; i++) { |
|
1051 |
for (j=0; j<4; j++) { |
|
1052 |
(*mp)[i][j] = _DoubleArrayInstPtr(obj)->d_element[x]; |
|
1053 |
x++; |
|
1054 |
} |
|
1055 |
} |
|
1056 |
return mp; |
|
1057 |
||
1058 |
case POINTERARRAY: |
|
1059 |
if (nByte < (16 * sizeof(OBJ))) return (Matrix *)0; |
|
1060 |
/* |
|
1061 |
* get elements one-by-one |
|
1062 |
*/ |
|
1063 |
for (i=0; i<4; i++) { |
|
1064 |
for (j=0; j<4; j++) { |
|
1065 |
o = _ArrayInstPtr(obj)->a_element[x]; |
|
1066 |
if (__isFloat(o)) { |
|
1067 |
(*mp)[i][j] = _floatVal(o); |
|
1068 |
} else if (__isSmallInteger(o)) { |
|
1069 |
(*mp)[i][j] = (double)__intVal(o); |
|
1070 |
} else if (__isFraction(o) |
|
1071 |
&& __isSmallInteger(_FractionInstPtr(o)->f_numerator) |
|
1072 |
&& __isSmallInteger(_FractionInstPtr(o)->f_denominator)) { |
|
1073 |
double n, d; |
|
1074 |
||
1075 |
n = (double)(__intVal(_FractionInstPtr(o)->f_numerator)); |
|
1076 |
d = (double)(__intVal(_FractionInstPtr(o)->f_denominator)); |
|
1077 |
(*mp)[i][j] = n / d; |
|
1078 |
} else |
|
1079 |
return (Matrix *)0; |
|
1080 |
x++; |
|
1081 |
} |
|
1082 |
} |
|
1083 |
return mp; |
|
12 | 1084 |
} |
1085 |
return (Matrix *)0; |
|
1086 |
} |
|
1087 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1088 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1089 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1090 |
float* |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1091 |
__glx_getFloatsFromFloatArrayInto(obj, fp) |
46 | 1092 |
OBJ obj; |
1093 |
float *fp; |
|
1094 |
{ |
|
1095 |
OBJ cls; |
|
1096 |
int ninstVars; |
|
1097 |
||
1098 |
if (! _isNonNilObject(obj)) return (float *)0; |
|
134 | 1099 |
cls = __qClass(obj); |
350 | 1100 |
if (cls == @global(FloatArray)) |
4718 | 1101 |
return _FloatArrayInstPtr(obj)->f_element; |
46 | 1102 |
|
185 | 1103 |
if ((__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) == FLOATARRAY) { |
4718 | 1104 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
1105 |
return (float *) &(_InstPtr(obj)->i_instvars[ninstVars]); |
|
46 | 1106 |
} |
1107 |
||
1108 |
/* |
|
1109 |
* need more here (i.e. convert from array-of-floats) |
|
1110 |
*/ |
|
1111 |
return (float *)0; |
|
1112 |
} |
|
1113 |
||
1114 |
%} |
|
1115 |
! ! |
|
0 | 1116 |
|
294 | 1117 |
!GLXWorkstation class methodsFor:'documentation'! |
1118 |
||
1119 |
copyright |
|
1120 |
" |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1121 |
COPYRIGHT (c) 1993 by Claus Gittinger |
294 | 1122 |
All Rights Reserved |
1123 |
||
1124 |
This software is furnished under a license and may be used |
|
1125 |
only in accordance with the terms of that license and with the |
|
1126 |
inclusion of the above copyright notice. This software may not |
|
1127 |
be provided or otherwise made available to, or used by, any |
|
1128 |
other person. No title to or ownership of the software is |
|
1129 |
hereby transferred. |
|
1130 |
" |
|
1131 |
! |
|
1132 |
||
1133 |
documentation |
|
1134 |
" |
|
1135 |
this class was originally written as a demo on how an interface to |
|
1136 |
a c graphics library could be implemented. In the mean time, it has become |
|
1137 |
quite complete ... |
|
1138 |
||
1139 |
It provides an interface to either a real GL (on SGI workstations) |
|
1140 |
or a simulated VGL (i.e. GL-light; low nicotine). |
|
1141 |
The GL simulation is derived from the PD vogl library, with slight |
|
1142 |
modifictions to support multiple GL views. |
|
1143 |
||
1144 |
Most of the hard work was done by Jeff (thanks indeed) ... |
|
1145 |
||
1146 |
||
1147 |
Some notes: |
|
1148 |
||
1149 |
I do not really know what most of these functions do - for more |
|
1150 |
detail, see the GL man pages (on SGI) or the doc provided with VGL. |
|
1151 |
||
1152 |
The interface offered here provides a very very low level (i.e one-to-one) |
|
1153 |
interface to GL functions. More high-level stuff is required, to make |
|
4718 | 1154 |
3D drawing be more object-oriented. |
294 | 1155 |
(see a bit of this in 'clients/IRIS-specials') |
1156 |
||
1157 |
Some functions are duplicated, Jeff and I developed those in parallel - |
|
1158 |
for now, both will remain - finally they will be merged and duplicates removed ... |
|
1159 |
(examples are makeobj and makeObject). |
|
1160 |
||
1161 |
Also, in a hurry to implement all those methods, many do no or only |
|
1162 |
limited argument checking - make certain, that you pass the correct |
|
1163 |
arguments. |
|
1164 |
||
1165 |
There might be some confusion in the v3[sifd] functions: basically they |
|
1166 |
all do the same, and could be mapped onto one st-method (such as vertex3). |
|
7657 | 1167 |
However, the C-functions expect different argument types - I don't know if |
294 | 1168 |
one or another of these functions suffers from any performance penalties. |
1169 |
Therefore, I leave the direct 1-to-1 mapping; GL experts might know more |
|
1170 |
about this (I use v3f in all of my code). |
|
1171 |
||
1172 |
written june 93 by claus |
|
1173 |
VGL stuff dec 93 |
|
1174 |
many many additions jan 94 by Jeff McAffer <jeff@is.s.u-tokyo.ac.jp> |
|
1175 |
||
4718 | 1176 |
Since this is a demo (consider it a free add-on goody) there is |
294 | 1177 |
*** NO WARRANTY ** for this. |
1178 |
||
1179 |
Notice: this should be rewritten to use the openGL library functions |
|
1180 |
(actually, to not loose the VGL interface, another OpenGLWorkstation |
|
1181 |
class should be written) |
|
614 | 1182 |
|
1183 |
[author:] |
|
7657 | 1184 |
Claus Gittinger |
1185 |
Jeff McAffer |
|
294 | 1186 |
" |
1187 |
! ! |
|
1188 |
||
168 | 1189 |
!GLXWorkstation class methodsFor:'error handling'! |
1190 |
||
294 | 1191 |
errorStringOfLastError |
1192 |
%{ |
|
4251 | 1193 |
#ifdef DYNAMICALLY_LOADABLE |
1065
fdc5b9059d82
removed all COMMA_CON / CON_COMMA uses
Claus Gittinger <cg@exept.de>
parents:
969
diff
changeset
|
1194 |
RETURN ( __MKSTRING(lastErrorMsg) ); |
4251 | 1195 |
#endif |
1196 |
%}. |
|
1197 |
||
1198 |
^ super errorStringOfLastError. |
|
1199 |
! |
|
1200 |
||
1201 |
minorCodeOfLastError |
|
1202 |
%{ /* NOCONTEXT */ |
|
1203 |
#ifdef DYNAMICALLY_LOADABLE |
|
1204 |
RETURN ( __MKSMALLINT(lastMinorCode) ); |
|
1205 |
#endif |
|
1206 |
%}. |
|
1207 |
||
1208 |
^ super minorCodeOfLastError. |
|
1209 |
! |
|
1210 |
||
1211 |
requestCodeOfLastError |
|
1212 |
%{ /* NOCONTEXT */ |
|
1213 |
#ifdef DYNAMICALLY_LOADABLE |
|
1214 |
RETURN ( __MKSMALLINT(lastRequestCode) ); |
|
1215 |
#endif |
|
1216 |
%}. |
|
1217 |
||
1218 |
^ super requestCodeOfLastError. |
|
1219 |
! |
|
1220 |
||
1221 |
resourceIdOfLastError |
|
1222 |
%{ /* NOCONTEXT */ |
|
1223 |
#ifdef DYNAMICALLY_LOADABLE |
|
1224 |
if (lastResource != 0) { |
|
1225 |
RETURN ( __MKEXTERNALADDRESS(lastResource) ); |
|
1226 |
} |
|
1227 |
RETURN ( nil ); |
|
1228 |
#endif |
|
1229 |
%}. |
|
1230 |
||
1231 |
^ super resourceIdOfLastError. |
|
1232 |
! ! |
|
1233 |
||
1234 |
!GLXWorkstation class methodsFor:'misc'! |
|
168 | 1235 |
|
528 | 1236 |
forceGL:aBoolean |
1237 |
ForceGL := aBoolean. |
|
1238 |
AllScreens notNil ifTrue:[ |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1239 |
AllScreens do:[:screen | screen initializeScreenProperties] |
528 | 1240 |
]. |
294 | 1241 |
! ! |
1242 |
||
1243 |
!GLXWorkstation methodsFor:'arcs and circles'! |
|
1244 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1245 |
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
|
1246 |
"draw an arc at a given location. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1247 |
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
|
1248 |
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
|
1249 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1250 |
%{ /* NOCONTEXT */ |
294 | 1251 |
Coord c_x, c_y, c_radius; |
1252 |
Angle a_startang, a_endang; |
|
1253 |
||
1254 |
_COORD_(x, c_x) |
|
1255 |
_COORD_(y, c_y) |
|
1256 |
_COORD_(radius, c_radius) |
|
1257 |
_ANGLE_(startang, a_startang) |
|
1258 |
_ANGLE_(endang, a_endang) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1259 |
|
294 | 1260 |
SETWIN(aGLXWindowId) |
1932 | 1261 |
#ifdef OPENGL |
1262 |
#else |
|
294 | 1263 |
arc(c_x, c_y, c_radius, a_startang, a_endang); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1264 |
#endif |
294 | 1265 |
%} |
528 | 1266 |
|
1267 |
"Modified: 19.3.1996 / 18:43:52 / cg" |
|
294 | 1268 |
! |
1269 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1270 |
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
|
1271 |
"draw a filled arc. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1272 |
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
|
1273 |
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
|
1274 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1275 |
%{ /* NOCONTEXT */ |
294 | 1276 |
Coord c_x, c_y, c_radius; |
1277 |
Angle a_startang, a_endang; |
|
1278 |
||
1279 |
_COORD_(x, c_x) |
|
1280 |
_COORD_(y, c_y) |
|
1281 |
_COORD_(radius, c_radius) |
|
1282 |
_ANGLE_(startang, a_startang) |
|
1283 |
_ANGLE_(endang, a_endang) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1284 |
|
294 | 1285 |
SETWIN(aGLXWindowId) |
1932 | 1286 |
#ifdef OPENGL |
1287 |
#else |
|
294 | 1288 |
arcf(c_x, c_y, c_radius, a_startang, a_endang); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1289 |
#endif |
294 | 1290 |
%} |
1291 |
! |
|
1292 |
||
1293 |
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
|
1294 |
"draw a filled arc. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1295 |
All arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1296 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1297 |
%{ /* NOCONTEXT */ |
294 | 1298 |
Icoord c_x, c_y, c_radius; |
1299 |
Angle a_startang, a_endang; |
|
1300 |
||
1301 |
_ICOORD_(x, c_x) |
|
1302 |
_ICOORD_(y, c_y) |
|
1303 |
_ICOORD_(radius, c_radius) |
|
1304 |
_ANGLE_(startang, a_startang); |
|
1305 |
_ANGLE_(endang, a_endang) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1306 |
|
294 | 1307 |
SETWIN(aGLXWindowId) |
1932 | 1308 |
#ifdef OPENGL |
1309 |
#else |
|
294 | 1310 |
arcfi(c_x, c_y, c_radius, a_startang, a_endang); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1311 |
#endif |
294 | 1312 |
%} |
1313 |
! |
|
1314 |
||
1315 |
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
|
1316 |
"draw a filled arc. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1317 |
All arguments must be (16bit) smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1318 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1319 |
%{ /* NOCONTEXT */ |
294 | 1320 |
Scoord c_x, c_y, c_radius; |
1321 |
Angle a_startang, a_endang; |
|
1322 |
||
1323 |
_SCOORD_(x, c_x) |
|
1324 |
_SCOORD_(y, c_y) |
|
1325 |
_SCOORD_(radius, c_radius) |
|
1326 |
_ANGLE_(startang, a_startang) |
|
1327 |
_ANGLE_(endang, a_endang) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1328 |
|
294 | 1329 |
SETWIN(aGLXWindowId) |
1932 | 1330 |
#ifdef OPENGL |
1331 |
#else |
|
294 | 1332 |
arcfs(c_x, c_y, c_radius, a_startang, a_endang); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1333 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1334 |
%} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1335 |
! |
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 |
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
|
1338 |
"draw an (unfilled) arc. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1339 |
All arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1340 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1341 |
%{ /* NOCONTEXT */ |
294 | 1342 |
Icoord c_x, c_y, c_radius; |
1343 |
Angle a_startang, a_endang; |
|
1344 |
||
1345 |
_ICOORD_(x, c_x) |
|
1346 |
_ICOORD_(y, c_y) |
|
1347 |
_ICOORD_(radius, c_radius) |
|
1348 |
_ANGLE_(startang, a_startang) |
|
1349 |
_ANGLE_(endang, a_endang) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1350 |
|
294 | 1351 |
SETWIN(aGLXWindowId) |
1932 | 1352 |
#ifdef OPENGL |
1353 |
#else |
|
294 | 1354 |
arci(c_x, c_y, c_radius, a_startang, a_endang); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1355 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1356 |
%} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1357 |
! |
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 |
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
|
1360 |
"draw an (unfilled) arc. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1361 |
All arguments must be (16bit) smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1362 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1363 |
%{ /* NOCONTEXT */ |
1932 | 1364 |
Scoord c_x, c_y, c_radius; |
1365 |
Angle a_startang, a_endang; |
|
1366 |
||
1367 |
_SCOORD_(x, c_x) |
|
1368 |
_SCOORD_(y, c_y) |
|
1369 |
_SCOORD_(radius, c_radius) |
|
1370 |
_ANGLE_(startang, a_startang) |
|
1371 |
_ANGLE_(endang, a_endang) |
|
1372 |
||
1373 |
SETWIN(aGLXWindowId) |
|
1374 |
#ifdef OPENGL |
|
1375 |
#else |
|
1376 |
arcs(c_x, c_y, c_radius, a_startang, a_endang); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1377 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1378 |
%} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1379 |
! |
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 |
glxCircX:x y:y radius: radius in: aGLXWindowId |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1382 |
"draw a circle. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1383 |
x/y/radius may be floats, fractions or smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1384 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1385 |
%{ /* NOCONTEXT */ |
1932 | 1386 |
Coord c_x, c_y, c_radius; |
1387 |
||
1388 |
_COORD_ (x, c_x) |
|
1389 |
_COORD_ (y, c_y) |
|
1390 |
_COORD_ (radius, c_radius) |
|
1391 |
||
1392 |
SETWIN(aGLXWindowId) |
|
1393 |
#ifdef OPENGL |
|
1394 |
#else |
|
1395 |
circ(c_x, c_y, c_radius); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1396 |
#endif |
294 | 1397 |
%} |
1398 |
! |
|
1399 |
||
1400 |
glxCircfX: x y: y radius: radius in: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1401 |
"draw a filled circle. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1402 |
x/y/radius may be floats, fractions or smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1403 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1404 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1405 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1406 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1407 |
Coord c_x, c_y, c_radius; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1408 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1409 |
_COORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1410 |
_COORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1411 |
_COORD_ (radius, c_radius) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1412 |
|
1932 | 1413 |
#ifdef OPENGL |
1414 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1415 |
circf(c_x, c_y, c_radius); |
1932 | 1416 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1417 |
} |
294 | 1418 |
%} |
1419 |
! |
|
1420 |
||
1421 |
glxCircfiX: x y: y radius: radius in: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1422 |
"draw a filled circle. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1423 |
x/y/radius must be smallIntegers." |
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 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1426 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1427 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1428 |
Icoord c_x, c_y, c_radius; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1429 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1430 |
_ICOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1431 |
_ICOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1432 |
_ICOORD_ (radius, c_radius) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1433 |
|
1932 | 1434 |
#ifdef OPENGL |
1435 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1436 |
circfi(c_x, c_y, c_radius); |
1932 | 1437 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1438 |
} |
294 | 1439 |
%} |
1440 |
! |
|
1441 |
||
1442 |
glxCircfsX: x y: y radius: radius in: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1443 |
"draw a filled circle. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1444 |
x/y/radius must be (16bit) smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1445 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1446 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1447 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1448 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1449 |
Scoord c_x, c_y, c_radius; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1450 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1451 |
_SCOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1452 |
_SCOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1453 |
_SCOORD_ (radius, c_radius) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1454 |
|
1932 | 1455 |
#ifdef OPENGL |
1456 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1457 |
circfs(c_x, c_y, c_radius); |
1932 | 1458 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1459 |
} |
294 | 1460 |
%} |
1461 |
! |
|
1462 |
||
1463 |
glxCirciX: x y: y radius: radius in: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1464 |
"draw a circle (unfilled). |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1465 |
x/y/radius must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1466 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1467 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1468 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1469 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1470 |
Icoord c_x, c_y, c_radius; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1471 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1472 |
_ICOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1473 |
_ICOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1474 |
_ICOORD_ (radius, c_radius) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1475 |
|
1932 | 1476 |
#ifdef OPENGL |
1477 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1478 |
circi(c_x, c_y, c_radius); |
1932 | 1479 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1480 |
} |
294 | 1481 |
%} |
1482 |
! |
|
1483 |
||
1484 |
glxCircsX: x y: y radius: radius in: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1485 |
"draw a circle (unfilled) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1486 |
x/y/radius must be (16bit) smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1487 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1488 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1489 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1490 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1491 |
Scoord c_x, c_y, c_radius; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1492 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1493 |
_SCOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1494 |
_SCOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1495 |
_SCOORD_ (radius, c_radius) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1496 |
|
1932 | 1497 |
#ifdef OPENGL |
1498 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1499 |
circs(c_x, c_y, c_radius); |
1932 | 1500 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1501 |
} |
294 | 1502 |
%} |
1503 |
! ! |
|
1504 |
||
528 | 1505 |
!GLXWorkstation methodsFor:'attribute stack'! |
1506 |
||
1507 |
glxPopattributesIn: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1508 |
"pop (and forget) the top entry on the attribute stack" |
528 | 1509 |
|
1510 |
%{ /* NOCONTEXT */ |
|
1511 |
SETWIN(aGLXWindowId) |
|
1932 | 1512 |
#ifndef OPENGL |
528 | 1513 |
popattributes(); |
1932 | 1514 |
#endif |
528 | 1515 |
%} |
1516 |
||
1517 |
"Modified: 19.3.1996 / 18:42:53 / cg" |
|
1518 |
! |
|
1519 |
||
1520 |
glxPushattributesIn: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1521 |
"save the current attributes on the attribute stack" |
528 | 1522 |
|
1523 |
%{ /* NOCONTEXT */ |
|
1524 |
SETWIN(aGLXWindowId) |
|
1932 | 1525 |
#ifndef OPENGL |
528 | 1526 |
pushattributes(); |
1932 | 1527 |
#endif |
528 | 1528 |
%} |
1529 |
||
1530 |
"Modified: 19.3.1996 / 18:43:04 / cg" |
|
1531 |
! ! |
|
1532 |
||
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1533 |
!GLXWorkstation methodsFor:'character position'! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1534 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1535 |
glxCmov2X: x y: y in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1536 |
"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
|
1537 |
The arguments may be floats, fractions or smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1538 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1539 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1540 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1541 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1542 |
Coord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1543 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1544 |
_COORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1545 |
_COORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1546 |
|
1932 | 1547 |
#ifdef OPENGL |
1548 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1549 |
cmov2(c_x, c_y); |
1932 | 1550 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1551 |
} |
537
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 |
"Modified: 22.3.1996 / 18:17:38 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1555 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1556 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1557 |
glxCmov2iX: x y: y in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1558 |
"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
|
1559 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1560 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1561 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1562 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1563 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1564 |
Icoord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1565 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1566 |
_ICOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1567 |
_ICOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1568 |
|
1932 | 1569 |
#ifdef OPENGL |
1570 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1571 |
cmov2i(c_x, c_y); |
1932 | 1572 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1573 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1574 |
%} |
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 |
"Modified: 22.3.1996 / 18:17:43 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1577 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1578 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1579 |
glxCmov2sX: x y: y in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1580 |
"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
|
1581 |
The arguments must be (16bit) smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1582 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1583 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1584 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1585 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1586 |
Scoord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1587 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1588 |
_SCOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1589 |
_SCOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1590 |
|
1932 | 1591 |
#ifdef OPENGL |
1592 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1593 |
cmov2s(c_x, c_y); |
1932 | 1594 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1595 |
} |
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:47 / 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 |
glxCmovX: 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 may be floats, fractions or 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 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1608 |
Coord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1609 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1610 |
_COORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1611 |
_COORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1612 |
_COORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1613 |
|
1932 | 1614 |
#ifdef OPENGL |
1615 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1616 |
cmov(c_x, c_y, c_z); |
1932 | 1617 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1618 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1619 |
%} |
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 |
"Modified: 22.3.1996 / 18:17:22 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1622 |
! |
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 |
glxCmoviX: x y: y z: z in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1625 |
"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
|
1626 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1627 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1628 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1629 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1630 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1631 |
Icoord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1632 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1633 |
_ICOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1634 |
_ICOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1635 |
_ICOORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1636 |
|
1932 | 1637 |
#ifdef OPENGL |
1638 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1639 |
cmovi(c_x, c_y, c_z); |
1932 | 1640 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1641 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1642 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1643 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1644 |
"Modified: 22.3.1996 / 18:17:55 / cg" |
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 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1647 |
glxCmovsX: x y: y z: z in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1648 |
"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
|
1649 |
The arguments must be (16bit) smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1650 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1651 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1652 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1653 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1654 |
Scoord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1655 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1656 |
_SCOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1657 |
_SCOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1658 |
_SCOORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1659 |
|
1932 | 1660 |
#ifdef OPENGL |
1661 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1662 |
cmovs(c_x, c_y, c_z); |
1932 | 1663 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1664 |
} |
537
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 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1667 |
"Modified: 22.3.1996 / 18:17:59 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1668 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1669 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1670 |
glxGetcposIn: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1671 |
"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
|
1672 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1673 |
| x y | |
4718 | 1674 |
%{ |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1675 |
short s_x, s_y; |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1676 |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1677 |
SETWIN(aGLXWindowId) |
1932 | 1678 |
#ifdef OPENGL |
1679 |
#else |
|
1680 |
# ifdef GLX |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1681 |
getcpos(&s_x, &s_y); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1682 |
x = __MKSMALLINT(s_x); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1683 |
y = __MKSMALLINT(s_y); |
1932 | 1684 |
# endif |
1685 |
#endif |
|
1686 |
%}. |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1687 |
^x @ y |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1688 |
! ! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1689 |
|
294 | 1690 |
!GLXWorkstation methodsFor:'clearing'! |
1691 |
||
1692 |
glxClearIn:aGLXWindowId |
|
1693 |
"clear to current color" |
|
1694 |
||
1695 |
%{ /* NOCONTEXT */ |
|
1696 |
SETWIN(aGLXWindowId) |
|
1932 | 1697 |
#ifdef OPENGL |
1698 |
#else |
|
294 | 1699 |
clear(); |
1932 | 1700 |
#endif |
294 | 1701 |
%} |
1702 |
! |
|
1703 |
||
1704 |
glxCzclearCval:cval zval:zval in:aGLXWindowId |
|
1705 |
"clear to a color (cval) and clear z buffer to zval simultaniously" |
|
1706 |
||
1707 |
%{ /* NOCONTEXT */ |
|
1932 | 1708 |
SETWIN(aGLXWindowId) |
1709 |
#ifdef OPENGL |
|
1710 |
#else |
|
1711 |
# ifdef GLX |
|
294 | 1712 |
czclear((ulong)__intVal(cval), __intVal(zval)); |
1932 | 1713 |
# endif |
1714 |
#endif |
|
1715 |
%} |
|
294 | 1716 |
! |
1717 |
||
1718 |
glxZClearIn:aGLXWindowId |
|
1719 |
"clear z buffer" |
|
1720 |
||
1721 |
%{ /* NOCONTEXT */ |
|
1932 | 1722 |
SETWIN(aGLXWindowId) |
1723 |
#ifdef OPENGL |
|
1724 |
#else |
|
1725 |
# ifdef GLX |
|
294 | 1726 |
zclear(); |
1932 | 1727 |
# endif |
1728 |
#endif |
|
1729 |
%} |
|
294 | 1730 |
! ! |
1731 |
||
1732 |
!GLXWorkstation methodsFor:'color'! |
|
1733 |
||
1734 |
glxColor:index in:aGLXWindowId |
|
4718 | 1735 |
"set the drawing color; |
7656 | 1736 |
for non gouraud shading, we don't care if the argument is integer or float; |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1737 |
otherwise, better results are expected with float values." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1738 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1739 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1740 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1741 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1742 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1743 |
#else |
294 | 1744 |
if (__isSmallInteger(index)) { |
7656 | 1745 |
color((Colorindex)(__intVal(index))); |
1746 |
RETURN (self); |
|
294 | 1747 |
} |
1748 |
if (__isFloat(index)) { |
|
7656 | 1749 |
colorf((float)(_floatVal(index))); |
1750 |
RETURN (self); |
|
294 | 1751 |
} |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1752 |
#endif |
1932 | 1753 |
%} |
294 | 1754 |
! |
1755 |
||
1756 |
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
|
1757 |
"set the drawing color, including alpha value. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1758 |
The args must be integer values within 0..255" |
294 | 1759 |
|
1760 |
%{ /* NOCONTEXT */ |
|
1761 |
short s_r, s_g, s_b, s_a; |
|
1762 |
||
1763 |
_INT_(r, s_r); |
|
1764 |
_INT_(g, s_g); |
|
1765 |
_INT_(b, s_b); |
|
1766 |
_INT_(a, s_a); |
|
1767 |
SETWIN(aGLXWindowId) |
|
1932 | 1768 |
#ifdef GLX |
294 | 1769 |
cpack((((((s_a<<8) | s_b) << 8) | s_g) << 8) | s_r); |
1932 | 1770 |
#endif |
1771 |
%} |
|
294 | 1772 |
! |
1773 |
||
1774 |
glxColorRed:r green:g blue:b in:aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1775 |
"set the drawing color. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1776 |
The args must be integer values in 0..255" |
294 | 1777 |
|
1778 |
%{ /* NOCONTEXT */ |
|
1779 |
short s_r, s_g, s_b; |
|
1780 |
||
1781 |
_INT_(r, s_r); |
|
1782 |
_INT_(g, s_g); |
|
1783 |
_INT_(b, s_b); |
|
1784 |
SETWIN(aGLXWindowId) |
|
1932 | 1785 |
#ifdef GLX |
294 | 1786 |
RGBcolor(s_r, s_g, s_b); |
1932 | 1787 |
#endif |
1788 |
%} |
|
294 | 1789 |
! |
1790 |
||
528 | 1791 |
glxLrgbrangeRmin: rmin gmin: gmin bmin: bmin rmax: rmax gmax: gmax bmax: bmax |
1792 |
znear: znear zfar: zfar in: aGLXWindowId |
|
1793 |
||
1794 |
%{ /* NOCONTEXT */ |
|
1932 | 1795 |
SETWIN(aGLXWindowId) |
1796 |
#ifdef GLX |
|
4718 | 1797 |
lRGBrange(_shortVal(rmin), _shortVal(gmin), _shortVal(bmin), |
1798 |
_shortVal(rmax), _shortVal(gmax), _shortVal(bmax), |
|
528 | 1799 |
_longVal(znear), _longVal(zfar)); |
1932 | 1800 |
#endif |
1801 |
%} |
|
528 | 1802 |
! |
1803 |
||
1804 |
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
|
1805 |
"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
|
1806 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1807 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1808 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1809 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1810 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1811 |
#else |
528 | 1812 |
mapcolor(_colorindexVal(i), _shortVal(red), _shortVal(green), _shortVal(blue)); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1813 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1814 |
%} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1815 |
! |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1816 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1817 |
glxTextcolor:tcolor in: aGLXWindowId |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1818 |
"change the color used for text drawing" |
294 | 1819 |
|
1820 |
%{ /* NOCONTEXT */ |
|
1932 | 1821 |
SETWIN(aGLXWindowId) |
1822 |
#ifdef GLX |
|
294 | 1823 |
textcolor(_colorindexVal(tcolor)); |
1932 | 1824 |
#endif |
1825 |
%} |
|
294 | 1826 |
! ! |
1827 |
||
528 | 1828 |
!GLXWorkstation methodsFor:'curves'! |
1829 |
||
1830 |
glxCurvebasis: basid in: aGLXWindowId |
|
1831 |
"sets the basis type of curves" |
|
1832 |
||
1833 |
%{ /* NOCONTEXT */ |
|
1834 |
SETWIN(aGLXWindowId) |
|
1932 | 1835 |
#ifdef GLX |
528 | 1836 |
curvebasis(_shortVal(basid)); |
1932 | 1837 |
#endif |
528 | 1838 |
%} |
1839 |
||
1840 |
"Modified: 19.3.1996 / 18:47:09 / cg" |
|
1841 |
! |
|
1842 |
||
1843 |
glxCurveit: iterationcount in: aGLXWindowId |
|
1844 |
"Iterates the top matrix on the stack as a forward difference |
|
1845 |
matrix, drawing as it goes along." |
|
1846 |
||
1847 |
%{ /* NOCONTEXT */ |
|
1848 |
SETWIN(aGLXWindowId) |
|
1932 | 1849 |
#ifdef GLX |
528 | 1850 |
curveit(_shortVal(iterationcount)); |
1932 | 1851 |
#endif |
528 | 1852 |
%} |
1853 |
||
1854 |
"Modified: 19.3.1996 / 18:48:57 / cg" |
|
1855 |
! |
|
1856 |
||
1857 |
glxCurveprecision: nsegments in: aGLXWindowId |
|
1858 |
"sets the number of line segments that make up a curve segment" |
|
1859 |
||
1860 |
%{ /* NOCONTEXT */ |
|
1861 |
SETWIN(aGLXWindowId) |
|
1932 | 1862 |
#ifdef GLX |
528 | 1863 |
curveprecision(_shortVal(nsegments)); |
1932 | 1864 |
#endif |
528 | 1865 |
%} |
1866 |
||
1867 |
"Modified: 19.3.1996 / 18:47:43 / cg" |
|
1868 |
! ! |
|
1869 |
||
294 | 1870 |
!GLXWorkstation methodsFor:'double buffering'! |
1871 |
||
1872 |
glxBackBufferIn:aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1873 |
"switch to back buffer drawing - turning frontbuffer drawing off" |
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 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1876 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1877 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1878 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1879 |
# ifdef GLX |
294 | 1880 |
frontbuffer(FALSE); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1881 |
# endif |
294 | 1882 |
backbuffer(TRUE); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1883 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1884 |
%} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1885 |
! |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1886 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1887 |
glxBackbuffer:b in: aGLXWindowId |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1888 |
"turn backBuffer drawing on/off. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1889 |
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
|
1890 |
... enabling the backbuffer automatically disables frontbuffer drawing |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1891 |
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
|
1892 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1893 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1894 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1895 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1896 |
#else |
294 | 1897 |
backbuffer(_booleanVal(b)); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1898 |
#endif |
294 | 1899 |
%} |
528 | 1900 |
|
1901 |
"Modified: 19.3.1996 / 18:45:05 / cg" |
|
294 | 1902 |
! |
1903 |
||
1904 |
glxDoubleBufferIn:aGLXWindowId |
|
1905 |
"set double buffer mode" |
|
1906 |
||
1907 |
%{ /* NOCONTEXT */ |
|
1908 |
SETWIN(aGLXWindowId) |
|
1932 | 1909 |
#ifdef OPENGL |
1910 |
#else |
|
294 | 1911 |
doublebuffer(); |
1932 | 1912 |
#endif |
294 | 1913 |
%} |
1914 |
! |
|
1915 |
||
1916 |
glxFrontBufferIn:aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1917 |
"switch to front buffer drawing - turning backbuffer drawing off" |
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 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1920 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1921 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1922 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1923 |
# ifdef GLX |
294 | 1924 |
backbuffer(FALSE); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1925 |
# endif |
294 | 1926 |
frontbuffer(TRUE); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1927 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1928 |
%} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1929 |
! |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1930 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1931 |
glxFrontbuffer:b in: aGLXWindowId |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1932 |
"turn on/off frontbuffer drawing. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1933 |
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
|
1934 |
... enabling the backbuffer automatically disables frontbuffer drawing |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1935 |
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
|
1936 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1937 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1938 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1939 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1940 |
#else |
294 | 1941 |
frontbuffer(_booleanVal(b)); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1942 |
#endif |
294 | 1943 |
%} |
528 | 1944 |
|
1945 |
"Modified: 19.3.1996 / 18:45:31 / cg" |
|
294 | 1946 |
! |
1947 |
||
1948 |
glxSingleBufferIn: aGLXWindowId |
|
1949 |
"set single buffer mode" |
|
1950 |
||
1951 |
%{ /* NOCONTEXT */ |
|
1952 |
SETWIN(aGLXWindowId) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1953 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1954 |
#else |
294 | 1955 |
singlebuffer(); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1956 |
#endif |
294 | 1957 |
%} |
1958 |
! |
|
1959 |
||
1960 |
glxSwapBuffersIn:aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1961 |
"swap the back and front buffers. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1962 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1963 |
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
|
1964 |
displayed and swap them for every frame." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1965 |
|
1903 | 1966 |
%{ /* UNLIMITEDSTACK */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1967 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1968 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1969 |
#else |
294 | 1970 |
swapbuffers(); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1971 |
#endif |
294 | 1972 |
%} |
528 | 1973 |
|
1974 |
"Modified: 19.3.1996 / 18:45:47 / cg" |
|
294 | 1975 |
! ! |
1976 |
||
1977 |
!GLXWorkstation methodsFor:'flat drawing'! |
|
1978 |
||
1979 |
glxBeginClosedLineIn:aGLXWindowId |
|
1980 |
"start a closed line" |
|
1981 |
||
1982 |
%{ /* NOCONTEXT */ |
|
1932 | 1983 |
#ifdef OPENGL |
1984 |
#else |
|
294 | 1985 |
SETWIN(aGLXWindowId) |
1986 |
bgnclosedline(); |
|
1932 | 1987 |
#endif |
294 | 1988 |
%} |
1989 |
! |
|
1990 |
||
1991 |
glxBeginLineIn:aGLXWindowId |
|
1992 |
"start a line group" |
|
1993 |
||
2075 | 1994 |
%{ /* NOCONTEXT STACK:32000 */ |
1932 | 1995 |
#ifdef OPENGL |
1996 |
#else |
|
294 | 1997 |
SETWIN(aGLXWindowId) |
1998 |
bgnline(); |
|
1932 | 1999 |
#endif |
294 | 2000 |
%} |
2001 |
! |
|
2002 |
||
2003 |
glxBeginPointIn:aGLXWindowId |
|
2004 |
"start a point-group" |
|
2005 |
||
2006 |
%{ /* NOCONTEXT */ |
|
1932 | 2007 |
#ifdef OPENGL |
2008 |
#else |
|
294 | 2009 |
SETWIN(aGLXWindowId) |
2010 |
bgnpoint(); |
|
1932 | 2011 |
#endif |
294 | 2012 |
%} |
2013 |
! |
|
2014 |
||
2015 |
glxBeginPolygonIn:aGLXWindowId |
|
2016 |
"start a polygon" |
|
2017 |
||
2018 |
%{ /* NOCONTEXT */ |
|
1932 | 2019 |
#ifdef OPENGL |
2020 |
#else |
|
294 | 2021 |
SETWIN(aGLXWindowId) |
2022 |
bgnpolygon(); |
|
1932 | 2023 |
#endif |
294 | 2024 |
%} |
2025 |
! |
|
2026 |
||
2027 |
glxBeginQuadrilateralStripIn:aGLXWindowId |
|
2028 |
"start a quadrilateral strip" |
|
2029 |
||
2030 |
%{ /* NOCONTEXT */ |
|
1932 | 2031 |
#ifdef OPENGL |
2032 |
#else |
|
294 | 2033 |
SETWIN(aGLXWindowId) |
2034 |
bgnqstrip(); |
|
1932 | 2035 |
#endif |
294 | 2036 |
%} |
2037 |
! |
|
2038 |
||
2039 |
glxBeginTriangleMeshIn:aGLXWindowId |
|
2040 |
"start a triangle mesh" |
|
2041 |
||
2042 |
%{ /* NOCONTEXT */ |
|
1932 | 2043 |
#ifdef OPENGL |
2044 |
#else |
|
294 | 2045 |
SETWIN(aGLXWindowId) |
2046 |
bgntmesh(); |
|
1932 | 2047 |
#endif |
294 | 2048 |
%} |
2049 |
! |
|
2050 |
||
2051 |
glxEndClosedLineIn:aGLXWindowId |
|
2052 |
"end a closed line" |
|
2053 |
||
2054 |
%{ /* NOCONTEXT */ |
|
1932 | 2055 |
#ifdef OPENGL |
2056 |
#else |
|
294 | 2057 |
SETWIN(aGLXWindowId) |
2058 |
endclosedline(); |
|
1932 | 2059 |
#endif |
294 | 2060 |
%} |
2061 |
! |
|
2062 |
||
2063 |
glxEndLineIn:aGLXWindowId |
|
2064 |
"end a line group" |
|
2065 |
||
2075 | 2066 |
%{ /* NOCONTEXT STACK:32000 */ |
1932 | 2067 |
#ifdef OPENGL |
2068 |
#else |
|
294 | 2069 |
SETWIN(aGLXWindowId) |
2070 |
endline(); |
|
1932 | 2071 |
#endif |
294 | 2072 |
%} |
2073 |
! |
|
2074 |
||
2075 |
glxEndPointIn:aGLXWindowId |
|
2076 |
"end a point group" |
|
2077 |
||
2078 |
%{ /* NOCONTEXT */ |
|
1932 | 2079 |
#ifdef OPENGL |
2080 |
#else |
|
294 | 2081 |
SETWIN(aGLXWindowId) |
2082 |
endpoint(); |
|
1932 | 2083 |
#endif |
294 | 2084 |
%} |
2085 |
! |
|
2086 |
||
2087 |
glxEndPolygonIn:aGLXWindowId |
|
2088 |
"end a polygon" |
|
2089 |
||
2090 |
%{ /* NOCONTEXT */ |
|
1932 | 2091 |
#ifdef OPENGL |
2092 |
#else |
|
294 | 2093 |
SETWIN(aGLXWindowId) |
2094 |
endpolygon(); |
|
1932 | 2095 |
#endif |
294 | 2096 |
%} |
2097 |
! |
|
2098 |
||
2099 |
glxEndQuadrilateralStripIn:aGLXWindowId |
|
2100 |
"end a quadrilateral strip" |
|
2101 |
||
2102 |
%{ /* NOCONTEXT */ |
|
1932 | 2103 |
#ifdef OPENGL |
2104 |
#else |
|
294 | 2105 |
SETWIN(aGLXWindowId) |
2106 |
endqstrip(); |
|
1932 | 2107 |
#endif |
294 | 2108 |
%} |
2109 |
! |
|
2110 |
||
2111 |
glxEndTriangleMeshIn:aGLXWindowId |
|
2112 |
"end a triangle mesh" |
|
2113 |
||
2114 |
%{ /* NOCONTEXT */ |
|
1932 | 2115 |
#ifdef OPENGL |
2116 |
#else |
|
294 | 2117 |
SETWIN(aGLXWindowId) |
2118 |
endtmesh(); |
|
1932 | 2119 |
#endif |
168 | 2120 |
%} |
2121 |
! ! |
|
2122 |
||
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2123 |
!GLXWorkstation methodsFor:'graphics position'! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2124 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2125 |
glxMove2:v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2126 |
"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
|
2127 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2128 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2129 |
float vec[2], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2130 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2131 |
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
|
2132 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2133 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2134 |
#else |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2135 |
move2((Coord)(c_v[0]), (Coord)(c_v[1])); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2136 |
RETURN (true); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2137 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2138 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2139 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2140 |
"Modified: 22.3.1996 / 18:15:23 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2141 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2142 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2143 |
glxMove2X: x y: y in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2144 |
"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
|
2145 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2146 |
%{ /* NOCONTEXT */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2147 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2148 |
Coord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2149 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2150 |
_COORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2151 |
_COORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2152 |
SETWIN(aGLXWindowId) |
1932 | 2153 |
#ifdef OPENGL |
2154 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2155 |
move2(c_x, c_y); |
1932 | 2156 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2157 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2158 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2159 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2160 |
"Modified: 22.3.1996 / 18:15:02 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2161 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2162 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2163 |
glxMove2iX: x y: y in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2164 |
"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
|
2165 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2166 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2167 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2168 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2169 |
Icoord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2170 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2171 |
_ICOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2172 |
_ICOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2173 |
SETWIN(aGLXWindowId) |
1932 | 2174 |
#ifdef OPENGL |
2175 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2176 |
move2i(c_x, c_y); |
1932 | 2177 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2178 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2179 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2180 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2181 |
"Modified: 22.3.1996 / 18:15:08 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2182 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2183 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2184 |
glxMove2sX: x y: y in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2185 |
"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
|
2186 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2187 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2188 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2189 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2190 |
Scoord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2191 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2192 |
_SCOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2193 |
_SCOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2194 |
SETWIN(aGLXWindowId) |
1932 | 2195 |
#ifdef OPENGL |
2196 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2197 |
move2s(c_x, c_y); |
1932 | 2198 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2199 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2200 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2201 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2202 |
"Modified: 22.3.1996 / 18:15:13 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2203 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2204 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2205 |
glxMove:v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2206 |
"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
|
2207 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2208 |
%{ /* NOCONTEXT */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2209 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2210 |
float vec[3], *c_v; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2211 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2212 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 3))) RETURN(false); |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2213 |
SETWIN(aGLXWindowId) |
1932 | 2214 |
#ifdef OPENGL |
2215 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2216 |
move((Coord)(c_v[0]), (Coord)(c_v[1]), (Coord)(c_v[2])); |
1932 | 2217 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2218 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2219 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2220 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2221 |
"Modified: 22.3.1996 / 18:14:29 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2222 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2223 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2224 |
glxMoveX: x y: y z: z in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2225 |
"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
|
2226 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2227 |
%{ /* NOCONTEXT */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2228 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2229 |
Coord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2230 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2231 |
_COORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2232 |
_COORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2233 |
_COORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2234 |
SETWIN(aGLXWindowId) |
1932 | 2235 |
#ifdef OPENGL |
2236 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2237 |
move(c_x, c_y, c_z); |
1932 | 2238 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2239 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2240 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2241 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2242 |
"Modified: 22.3.1996 / 18:14:38 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2243 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2244 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2245 |
glxMoveiX: x y: y z: z in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2246 |
"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
|
2247 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2248 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2249 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2250 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2251 |
Icoord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2252 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2253 |
_ICOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2254 |
_ICOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2255 |
_ICOORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2256 |
SETWIN(aGLXWindowId) |
1932 | 2257 |
#ifdef OPENGL |
2258 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2259 |
movei(c_x, c_y, c_z); |
1932 | 2260 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2261 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2262 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2263 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2264 |
"Modified: 22.3.1996 / 18:14:44 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2265 |
! |
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 |
glxMovesX: x y: y z: z in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2268 |
"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
|
2269 |
The arguments must be smallIntegers." |
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 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2272 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2273 |
Scoord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2274 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2275 |
_SCOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2276 |
_SCOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2277 |
_SCOORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2278 |
SETWIN(aGLXWindowId) |
1932 | 2279 |
#ifdef OPENGL |
2280 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2281 |
moves(c_x, c_y, c_z); |
1932 | 2282 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2283 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2284 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2285 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2286 |
"Modified: 22.3.1996 / 18:14:48 / cg" |
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 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2289 |
glxRmv2:v in: aGLXWindowId |
4718 | 2290 |
"change the graphics position to a 2D point, |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2291 |
the relative distance is passed in vector v" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2292 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2293 |
%{ /* NOCONTEXT */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2294 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2295 |
float vec[2], *c_v; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2296 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2297 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 2))) RETURN(false); |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2298 |
SETWIN(aGLXWindowId) |
1932 | 2299 |
#ifdef OPENGL |
2300 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2301 |
rmv2((Coord)(c_v[0]), (Coord)(c_v[1])); |
1932 | 2302 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2303 |
} |
537
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 |
"Modified: 22.3.1996 / 18:15:57 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2307 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2308 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2309 |
glxRmv2X: x y: y in: aGLXWindowId |
4718 | 2310 |
"change the graphics position to a 2D point, |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2311 |
the relative distance is passed in x/y" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2312 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2313 |
%{ /* NOCONTEXT */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2314 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2315 |
Coord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2316 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2317 |
_COORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2318 |
_COORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2319 |
SETWIN(aGLXWindowId) |
1932 | 2320 |
#ifdef OPENGL |
2321 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2322 |
rmv2(c_x, c_y); |
1932 | 2323 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2324 |
} |
537
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 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2327 |
"Modified: 22.3.1996 / 18:16:42 / cg" |
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 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2330 |
glxRmv2iX: x y: y in: aGLXWindowId |
4718 | 2331 |
"change the graphics position to a 2D point, |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2332 |
the relative distance is passed in x/y. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2333 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2334 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2335 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2336 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2337 |
Icoord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2338 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2339 |
_ICOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2340 |
_ICOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2341 |
SETWIN(aGLXWindowId) |
1932 | 2342 |
#ifdef OPENGL |
2343 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2344 |
rmv2i(c_x, c_y); |
1932 | 2345 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2346 |
} |
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:39 / 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 |
glxRmv2sX: x y: y in: aGLXWindowId |
4718 | 2353 |
"change the graphics position to a 2D point, |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2354 |
the relative distance is passed in x/y. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2355 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2356 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2357 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2358 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2359 |
Scoord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2360 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2361 |
_SCOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2362 |
_SCOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2363 |
SETWIN(aGLXWindowId) |
1932 | 2364 |
#ifdef OPENGL |
2365 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2366 |
rmv2s(c_x, c_y); |
1932 | 2367 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2368 |
} |
537
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 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2371 |
"Modified: 22.3.1996 / 18:16:33 / cg" |
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 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2374 |
glxRmv:v in: aGLXWindowId |
4718 | 2375 |
"change the graphics position to a 3D point, |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2376 |
the relative distance is passed in vector v" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2377 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2378 |
%{ /* NOCONTEXT */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2379 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2380 |
float vec[3], *c_v; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2381 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2382 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 3))) RETURN(false); |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2383 |
SETWIN(aGLXWindowId) |
1932 | 2384 |
#ifdef OPENGL |
2385 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2386 |
rmv((Coord)(c_v[0]), (Coord)(c_v[1]), (Coord)(c_v[2])); |
1932 | 2387 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2388 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2389 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2390 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2391 |
"Modified: 22.3.1996 / 18:16:08 / cg" |
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 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2394 |
glxRmvX: x y: y z: z in: aGLXWindowId |
4718 | 2395 |
"change the graphics position to a 3D point, |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2396 |
the relative distance is passed in x/y/z" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2397 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2398 |
%{ /* NOCONTEXT */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2399 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2400 |
Coord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2401 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2402 |
_COORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2403 |
_COORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2404 |
_COORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2405 |
SETWIN(aGLXWindowId) |
1932 | 2406 |
#ifdef OPENGL |
2407 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2408 |
rmv(c_x, c_y, c_z); |
1932 | 2409 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2410 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2411 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2412 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2413 |
"Modified: 22.3.1996 / 18:16:16 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2414 |
! |
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 |
glxRmviX: x y: y z: z in: aGLXWindowId |
4718 | 2417 |
"change the graphics position to a 3D point, |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2418 |
the relative distance is passed in x/y/z. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2419 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2420 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2421 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2422 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2423 |
Icoord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2424 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2425 |
_ICOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2426 |
_ICOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2427 |
_ICOORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2428 |
SETWIN(aGLXWindowId) |
1932 | 2429 |
#ifdef OPENGL |
2430 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2431 |
rmvi(c_x, c_y, c_z); |
1932 | 2432 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2433 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2434 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2435 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2436 |
"Modified: 22.3.1996 / 18:16:21 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2437 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2438 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2439 |
glxRmvsX: x y: y z: z in: aGLXWindowId |
4718 | 2440 |
"change the graphics position to a 3D point, |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2441 |
the relative distance is passed in x/y/z. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2442 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2443 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2444 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2445 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2446 |
Scoord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2447 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2448 |
_SCOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2449 |
_SCOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2450 |
_SCOORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2451 |
SETWIN(aGLXWindowId) |
1932 | 2452 |
#ifdef OPENGL |
2453 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2454 |
rmvs(c_x, c_y, c_z); |
1932 | 2455 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2456 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2457 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2458 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2459 |
"Modified: 22.3.1996 / 18:16:25 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2460 |
! ! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2461 |
|
168 | 2462 |
!GLXWorkstation methodsFor:'initialization'! |
2463 |
||
2464 |
initializeFor:aDisplayName |
|
169 | 2465 |
(super initializeFor:aDisplayName) isNil ifTrue:[^ nil]. |
168 | 2466 |
%{ |
2467 |
if (_INST(displayId) != nil) { |
|
185 | 2468 |
XSetErrorHandler(__XErrorHandler__); |
2469 |
} |
|
2470 |
%} |
|
2471 |
! |
|
2472 |
||
2473 |
initializeScreenProperties |
|
2474 |
super initializeScreenProperties. |
|
2475 |
||
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
2476 |
"/ 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
|
2477 |
"/ 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
|
2478 |
"/ 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
|
2479 |
"/ 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
|
2480 |
"/ 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
|
2481 |
"/ 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
|
2482 |
"/ 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
|
2483 |
"/ have no documentation). |
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
2484 |
"/ Late note: setting the ForceGL classVar overrides above behavior. |
4718 | 2485 |
"/ it may be set from a startupScript with: 'GLXWorkstation forceGL:true' |
2486 |
"/ however: be careful: only set it to true, if you are certain that remoteGL works |
|
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
2487 |
|
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
2488 |
(self isTrueGL and:[ForceGL ~~ true]) ifTrue:[ |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
2489 |
glOK := (displayName = ':0') or:[displayName = ':0.0']. |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
2490 |
] ifFalse:[ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2491 |
glOK := true. |
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
2492 |
]. |
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
2493 |
|
185 | 2494 |
%{ |
2495 |
Display *dpy = myDpy; |
|
2496 |
int dummy; |
|
2497 |
||
2498 |
if (ISCONNECTED) { |
|
290
f9397ade6677
fix for sgi - need displayName to be set for initScreenProps
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
2499 |
_INST(hasStereoExtension) = false; |
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
2500 |
|
1932 | 2501 |
#if defined(XSGIStereo) && defined(GLX) |
290
f9397ade6677
fix for sgi - need displayName to be set for initScreenProps
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
2502 |
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
|
2503 |
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
|
2504 |
_INST(hasStereoExtension) = true; |
290
f9397ade6677
fix for sgi - need displayName to be set for initScreenProps
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
2505 |
} |
f9397ade6677
fix for sgi - need displayName to be set for initScreenProps
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
2506 |
#endif |
168 | 2507 |
} |
2508 |
%} |
|
2509 |
! ! |
|
2510 |
||
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2511 |
!GLXWorkstation methodsFor:'lines'! |
528 | 2512 |
|
2513 |
glxDeflinestyleN: n ls: ls in: aGLXWindowId |
|
2514 |
"define a line style" |
|
2515 |
||
2516 |
%{ /* NOCONTEXT */ |
|
1932 | 2517 |
SETWIN(aGLXWindowId) |
2518 |
#ifdef OPENGL |
|
2519 |
#else |
|
528 | 2520 |
deflinestyle(_shortVal(n), _linestyleVal(ls)); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2521 |
#endif |
528 | 2522 |
%} |
2523 |
! |
|
2524 |
||
2525 |
glxDraw2:v in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2526 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2527 |
to a new 2D position, passed in vector v." |
528 | 2528 |
|
2529 |
%{ /* NOCONTEXT */ |
|
2530 |
float vec[2], *c_v; |
|
2531 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2532 |
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
|
2533 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2534 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2535 |
#else |
528 | 2536 |
draw2((Coord)(c_v[0]), (Coord)(c_v[1])); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2537 |
#endif |
528 | 2538 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2539 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2540 |
"Modified: 22.3.1996 / 18:03:29 / cg" |
528 | 2541 |
! |
2542 |
||
2543 |
glxDraw2X: x y: y in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2544 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2545 |
to a new 2D position, passed in x/y." |
528 | 2546 |
|
2547 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2548 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2549 |
Coord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2550 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2551 |
_COORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2552 |
_COORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2553 |
SETWIN(aGLXWindowId) |
1932 | 2554 |
#ifdef OPENGL |
2555 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2556 |
draw2(c_x, c_y); |
1932 | 2557 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2558 |
} |
528 | 2559 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2560 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2561 |
"Modified: 22.3.1996 / 18:03:50 / cg" |
528 | 2562 |
! |
2563 |
||
2564 |
glxDraw2iX: x y: y in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2565 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2566 |
to a new 2D position, passed in x/y." |
528 | 2567 |
|
2568 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2569 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2570 |
Icoord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2571 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2572 |
_ICOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2573 |
_ICOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2574 |
SETWIN(aGLXWindowId) |
1932 | 2575 |
#ifdef OPENGL |
2576 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2577 |
draw2i(c_x, c_y); |
1932 | 2578 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2579 |
} |
528 | 2580 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2581 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2582 |
"Modified: 22.3.1996 / 18:04:07 / cg" |
528 | 2583 |
! |
2584 |
||
2585 |
glxDraw2sX: x y: y in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2586 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2587 |
to a new 2D position, passed in x/y." |
528 | 2588 |
|
2589 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2590 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2591 |
Scoord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2592 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2593 |
_SCOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2594 |
_SCOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2595 |
SETWIN(aGLXWindowId) |
1932 | 2596 |
#ifdef OPENGL |
2597 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2598 |
draw2s(c_x, c_y); |
1932 | 2599 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2600 |
} |
528 | 2601 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2602 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2603 |
"Modified: 22.3.1996 / 18:04:19 / cg" |
528 | 2604 |
! |
2605 |
||
2606 |
glxDraw:v in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2607 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2608 |
to a new 3D position, passed in vector v." |
528 | 2609 |
|
2610 |
%{ /* NOCONTEXT */ |
|
2611 |
float vec[3], *c_v; |
|
2612 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2613 |
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
|
2614 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2615 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2616 |
#else |
528 | 2617 |
draw((Coord)(c_v[0]), (Coord)(c_v[1]), (Coord)(c_v[2])); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2618 |
#endif |
528 | 2619 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2620 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2621 |
"Modified: 22.3.1996 / 18:04:34 / cg" |
528 | 2622 |
! |
2623 |
||
2624 |
glxDrawX: x y: y z: z in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2625 |
"draw a line from the current graphics position |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2626 |
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
|
2627 |
The arguments may be floats, fractions or smallIntegers" |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2628 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2629 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2630 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2631 |
Coord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2632 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2633 |
_COORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2634 |
_COORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2635 |
_COORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2636 |
SETWIN(aGLXWindowId) |
1932 | 2637 |
#ifdef OPENGL |
2638 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2639 |
draw(c_x, c_y, c_z); |
1932 | 2640 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2641 |
} |
528 | 2642 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2643 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2644 |
"Modified: 22.3.1996 / 18:04:46 / cg" |
528 | 2645 |
! |
2646 |
||
2647 |
glxDrawiX: x y: y z: z in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2648 |
"draw a line from the current graphics position |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2649 |
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
|
2650 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2651 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2652 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2653 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2654 |
Icoord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2655 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2656 |
_ICOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2657 |
_ICOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2658 |
_ICOORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2659 |
SETWIN(aGLXWindowId) |
1932 | 2660 |
#ifdef OPENGL |
2661 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2662 |
drawi(c_x, c_y, c_z); |
1932 | 2663 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2664 |
} |
528 | 2665 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2666 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2667 |
"Modified: 22.3.1996 / 18:04:54 / cg" |
528 | 2668 |
! |
2669 |
||
2670 |
glxDrawsX: x y: y z: z in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2671 |
"draw a line from the current graphics position |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2672 |
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
|
2673 |
The arguments must be (16bit) smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2674 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2675 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2676 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2677 |
Scoord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2678 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2679 |
_SCOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2680 |
_SCOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2681 |
_SCOORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2682 |
SETWIN(aGLXWindowId) |
1932 | 2683 |
#ifdef OPENGL |
2684 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2685 |
draws(c_x, c_y, c_z); |
1932 | 2686 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2687 |
} |
528 | 2688 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2689 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2690 |
"Modified: 22.3.1996 / 18:05:01 / cg" |
528 | 2691 |
! |
2692 |
||
2693 |
glxLinewidth: n in: aGLXWindowId |
|
2694 |
"set the linewidth" |
|
2695 |
||
2696 |
%{ /* NOCONTEXT */ |
|
2697 |
SETWIN(aGLXWindowId) |
|
1932 | 2698 |
#ifdef OPENGL |
2699 |
#else |
|
528 | 2700 |
linewidth(_shortVal(n)); |
1932 | 2701 |
#endif |
528 | 2702 |
%} |
2703 |
! |
|
2704 |
||
2705 |
glxLinewidthf: n in: aGLXWindowId |
|
2706 |
"set the linewidth" |
|
2707 |
||
2708 |
%{ /* NOCONTEXT */ |
|
2709 |
SETWIN(aGLXWindowId) |
|
1932 | 2710 |
#ifdef OPENGL |
2711 |
#else |
|
528 | 2712 |
linewidthf(_floatVal(n)); |
1932 | 2713 |
#endif |
528 | 2714 |
RETURN (true); |
2715 |
%} |
|
2716 |
! |
|
2717 |
||
2718 |
glxRdr2:v in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2719 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2720 |
to a new 2D position, passing the relative distance in the vector v." |
528 | 2721 |
|
2722 |
%{ /* NOCONTEXT */ |
|
2723 |
float vec[2], *c_v; |
|
2724 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2725 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 2))) RETURN(false); |
528 | 2726 |
SETWIN(aGLXWindowId) |
1932 | 2727 |
#ifdef OPENGL |
2728 |
#else |
|
528 | 2729 |
rdr2((Coord)(c_v[0]), (Coord)(c_v[1])); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2730 |
#endif |
528 | 2731 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2732 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2733 |
"Modified: 22.3.1996 / 18:05:54 / cg" |
528 | 2734 |
! |
2735 |
||
2736 |
glxRdr2X: x y: y in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2737 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2738 |
to a new 2D position, passing the relative distance in x/y." |
528 | 2739 |
|
2740 |
%{ /* NOCONTEXT */ |
|
2741 |
Coord c_x, c_y; |
|
2742 |
||
2743 |
_COORD_ (x, c_x) |
|
2744 |
_COORD_ (y, c_y) |
|
2745 |
SETWIN(aGLXWindowId) |
|
1932 | 2746 |
#ifdef OPENGL |
2747 |
#else |
|
528 | 2748 |
rdr2(c_x, c_y); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2749 |
#endif |
528 | 2750 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2751 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2752 |
"Modified: 22.3.1996 / 18:06:20 / cg" |
528 | 2753 |
! |
2754 |
||
2755 |
glxRdr2iX: x y: y in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2756 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2757 |
to a new 2D position, passing the relative distance in x/y." |
528 | 2758 |
|
2759 |
%{ /* NOCONTEXT */ |
|
2760 |
Icoord c_x, c_y; |
|
2761 |
||
2762 |
_ICOORD_ (x, c_x) |
|
2763 |
_ICOORD_ (y, c_y) |
|
2764 |
SETWIN(aGLXWindowId) |
|
1932 | 2765 |
#ifdef OPENGL |
2766 |
#else |
|
528 | 2767 |
rdr2i(c_x, c_y); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2768 |
#endif |
528 | 2769 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2770 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2771 |
"Modified: 22.3.1996 / 18:06:28 / cg" |
528 | 2772 |
! |
2773 |
||
2774 |
glxRdr2sX: x y: y in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2775 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2776 |
to a new 2D position, passing the relative distance in x/y." |
528 | 2777 |
|
2778 |
%{ /* NOCONTEXT */ |
|
2779 |
Scoord c_x, c_y; |
|
2780 |
||
2781 |
_SCOORD_ (x, c_x) |
|
2782 |
_SCOORD_ (y, c_y) |
|
2783 |
SETWIN(aGLXWindowId) |
|
1932 | 2784 |
#ifdef OPENGL |
2785 |
#else |
|
528 | 2786 |
rdr2s(c_x, c_y); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2787 |
#endif |
528 | 2788 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2789 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2790 |
"Modified: 22.3.1996 / 18:06:34 / cg" |
528 | 2791 |
! |
2792 |
||
2793 |
glxRdr:v in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2794 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2795 |
to a new 3D position, passing the relative distance in the vector v." |
528 | 2796 |
|
2797 |
%{ /* NOCONTEXT */ |
|
2798 |
float vec[3], *c_v; |
|
2799 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2800 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 3))) RETURN(false); |
528 | 2801 |
SETWIN(aGLXWindowId) |
1932 | 2802 |
#ifdef OPENGL |
2803 |
#else |
|
528 | 2804 |
rdr((Coord)(c_v[0]), (Coord)(c_v[1]), (Coord)(c_v[2])); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2805 |
#endif |
528 | 2806 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2807 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2808 |
"Modified: 22.3.1996 / 18:06:07 / cg" |
528 | 2809 |
! |
2810 |
||
2811 |
glxRdrX: x y: y z: z in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2812 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2813 |
to a new 3D position, passing the relative distance in x/y/z." |
528 | 2814 |
|
2815 |
%{ /* NOCONTEXT */ |
|
2816 |
Coord c_x, c_y, c_z; |
|
2817 |
||
2818 |
_COORD_ (x, c_x) |
|
2819 |
_COORD_ (y, c_y) |
|
2820 |
_COORD_ (z, c_z) |
|
2821 |
SETWIN(aGLXWindowId) |
|
1932 | 2822 |
#ifdef OPENGL |
2823 |
#else |
|
528 | 2824 |
rdr(c_x, c_y, c_z); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2825 |
#endif |
528 | 2826 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2827 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2828 |
"Modified: 22.3.1996 / 18:06:44 / cg" |
528 | 2829 |
! |
2830 |
||
2831 |
glxRdriX: x y: y z: z in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2832 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2833 |
to a new 3D position, passing the relative distance in x/y/z." |
528 | 2834 |
|
2835 |
%{ /* NOCONTEXT */ |
|
2836 |
Icoord c_x, c_y, c_z; |
|
2837 |
||
2838 |
_ICOORD_ (x, c_x) |
|
2839 |
_ICOORD_ (y, c_y) |
|
2840 |
_ICOORD_ (z, c_z) |
|
2841 |
SETWIN(aGLXWindowId) |
|
1932 | 2842 |
#ifdef OPENGL |
2843 |
#else |
|
528 | 2844 |
rdri(c_x, c_y, c_z); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2845 |
#endif |
528 | 2846 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2847 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2848 |
"Modified: 22.3.1996 / 18:06:51 / cg" |
528 | 2849 |
! |
2850 |
||
2851 |
glxRdrsX: x y: y z: z in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2852 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2853 |
to a new 3D position, passing the relative distance in x/y/z." |
528 | 2854 |
|
2855 |
%{ /* NOCONTEXT */ |
|
2856 |
Scoord c_x, c_y, c_z; |
|
2857 |
||
2858 |
_SCOORD_ (x, c_x) |
|
2859 |
_SCOORD_ (y, c_y) |
|
2860 |
_SCOORD_ (z, c_z) |
|
2861 |
SETWIN(aGLXWindowId) |
|
1932 | 2862 |
#ifdef OPENGL |
2863 |
#else |
|
528 | 2864 |
rdrs(c_x, c_y, c_z); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2865 |
#endif |
528 | 2866 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2867 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2868 |
"Modified: 22.3.1996 / 18:06:55 / cg" |
528 | 2869 |
! |
2870 |
||
2871 |
glxSetlinestyle: index in: aGLXWindowId |
|
2872 |
"set the linestyle" |
|
2873 |
||
2874 |
%{ /* NOCONTEXT */ |
|
2875 |
SETWIN(aGLXWindowId) |
|
1932 | 2876 |
#ifdef OPENGL |
2877 |
#else |
|
528 | 2878 |
setlinestyle(_shortVal(index)); |
1932 | 2879 |
#endif |
2880 |
%} |
|
528 | 2881 |
! ! |
2882 |
||
294 | 2883 |
!GLXWorkstation methodsFor:'materials & lights'! |
2884 |
||
2885 |
glxLmbind:target index:index in:aGLXWindowId |
|
2886 |
"select a material, light or lighting model. |
|
2887 |
target must be a symbol from: #material, #backMaterial, |
|
2888 |
#light0-light7 or #lightModel." |
|
2889 |
||
2890 |
%{ /* NOCONTEXT */ |
|
2891 |
#ifdef GLX |
|
2892 |
short defType; |
|
2893 |
short i_index; |
|
2894 |
||
2895 |
if (target == @symbol(material)) |
|
2896 |
defType = MATERIAL; |
|
2897 |
else if (target == @symbol(backMaterial)) |
|
2898 |
defType = BACKMATERIAL; |
|
2899 |
else if (target == @symbol(light0)) |
|
2900 |
defType = LIGHT0; |
|
2901 |
else if (target == @symbol(light1)) |
|
2902 |
defType = LIGHT1; |
|
2903 |
else if (target == @symbol(light2)) |
|
2904 |
defType = LIGHT2; |
|
2905 |
else if (target == @symbol(light3)) |
|
2906 |
defType = LIGHT3; |
|
2907 |
else if (target == @symbol(light4)) |
|
2908 |
defType = LIGHT4; |
|
2909 |
else if (target == @symbol(light5)) |
|
2910 |
defType = LIGHT5; |
|
2911 |
else if (target == @symbol(light6)) |
|
2912 |
defType = LIGHT6; |
|
2913 |
else if (target == @symbol(light7)) |
|
2914 |
defType = LIGHT7; |
|
2915 |
else if (target == @symbol(lightModel)) |
|
2916 |
defType = LMODEL; |
|
4718 | 2917 |
else { |
2918 |
RETURN (nil); |
|
294 | 2919 |
} |
2920 |
||
2921 |
_INT_ (index, i_index); |
|
2922 |
SETWIN(aGLXWindowId) |
|
2923 |
lmbind(defType, i_index); |
|
1932 | 2924 |
#endif |
2925 |
%} |
|
294 | 2926 |
! |
2927 |
||
2928 |
glxLmdef:what index:index np:np props:props in:aGLXWindowId |
|
2929 |
"define a material, light source or lighting model; |
|
2930 |
what must be one of #material, #light or #lightModel. |
|
2931 |
props must be a FloatArray or a subclass of FloatArray" |
|
2932 |
||
2933 |
%{ /* NOCONTEXT */ |
|
2934 |
#ifdef GLX |
|
2935 |
short defType; |
|
2936 |
short i_index, i_np; |
|
2937 |
float *fp; |
|
2938 |
OBJ cls; |
|
2939 |
int ninstVars, nInstBytes; |
|
2940 |
||
2941 |
if (what == @symbol(material)) |
|
2942 |
defType = DEFMATERIAL; |
|
2943 |
else if (what == @symbol(light)) |
|
2944 |
defType = DEFLIGHT; |
|
2945 |
else if (what == @symbol(lightModel)) |
|
2946 |
defType = DEFLMODEL; |
|
2947 |
else { |
|
1932 | 2948 |
RETURN (nil); |
294 | 2949 |
} |
2950 |
||
2951 |
_INT_ (index, i_index); |
|
2952 |
_INT_ (np, i_np); |
|
2953 |
||
2954 |
if (! _isNonNilObject(props)) fp = NULL; |
|
2955 |
else { |
|
2956 |
cls = __qClass(props); |
|
350 | 2957 |
if (cls == @global(FloatArray)) |
294 | 2958 |
fp = _FloatArrayInstPtr(props)->f_element; |
2959 |
else { |
|
2960 |
if ((__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) == FLOATARRAY) { |
|
2961 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
|
2962 |
fp = (float *) &(_InstPtr(props)->i_instvars[ninstVars]); |
|
2963 |
} else { |
|
1932 | 2964 |
RETURN (nil); |
294 | 2965 |
} |
4718 | 2966 |
} |
294 | 2967 |
} |
2968 |
SETWIN(aGLXWindowId) |
|
2969 |
lmdef(defType, i_index, i_np, fp); |
|
1932 | 2970 |
#endif |
2971 |
%} |
|
294 | 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 { |
|
1932 | 2988 |
RETURN (nil); |
294 | 2989 |
} |
2990 |
} |
|
2991 |
SETWIN(aGLXWindowId) |
|
2992 |
tevbind(t, __intVal(index)); |
|
1932 | 2993 |
#endif |
2994 |
%} |
|
294 | 2995 |
! |
2996 |
||
2997 |
glxTevdef:index np:np props:props in:aGLXWindowId |
|
2998 |
||
2999 |
%{ /* NOCONTEXT */ |
|
3000 |
#ifdef GLX |
|
3001 |
const float *fp; |
|
3002 |
float fbuff[30]; |
|
3003 |
||
3004 |
SETWIN(aGLXWindowId) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3005 |
fp = __glx_getFloatsFromFloatArrayInto(props, fbuff); |
294 | 3006 |
tevdef(__intVal(index), __intVal(np), fp); |
1932 | 3007 |
#endif |
3008 |
%} |
|
294 | 3009 |
! |
3010 |
||
3011 |
glxTexDef2d:index nc:nc width:w height:h bits:image np:np props:props in:aGLXWindowId |
|
3012 |
"define a 2D texture. index is the 'name' of the texture; |
|
3013 |
nc is the number of components (1-4) per pixel; |
|
3014 |
w/h define the size of the texture; bits is a byteArray containing the |
|
3015 |
long-word aligned pixel data; np is the number of props found in |
|
3016 |
the floatArray props. Props must be delimited by a 0.0 entry." |
|
3017 |
||
3018 |
%{ /* NOCONTEXT */ |
|
6254 | 3019 |
#ifdef GLX |
294 | 3020 |
unsigned char *cp; |
3021 |
const float *fp; |
|
3022 |
OBJ cls; |
|
3023 |
float fbuff[30]; |
|
3024 |
||
5479
ae6b3ac21920
__isByteArray() to __isByteArrayLike() in primitive code
Stefan Vogel <sv@exept.de>
parents:
4718
diff
changeset
|
3025 |
if (__isByteArrayLike(image)) { |
6254 | 3026 |
cp = _ByteArrayInstPtr(image)->ba_element; |
3027 |
fp = __glx_getFloatsFromFloatArrayInto(props, fbuff); |
|
3028 |
||
3029 |
SETWIN(aGLXWindowId) |
|
3030 |
texdef2d(__intVal(index), __intVal(nc), __intVal(w), __intVal(h), |
|
3031 |
(const unsigned long *)cp, __intVal(np), fp); |
|
294 | 3032 |
} |
3033 |
#endif |
|
3034 |
%} |
|
3035 |
! |
|
3036 |
||
3037 |
glxTexDef3d:index nc:nc width:w height:h depth:d bits:image np:np props:props in:aGLXWindowId |
|
3038 |
"define a 3D texture. index is the 'name' of the texture; |
|
3039 |
nc is the number of components (1-4) per pixel; |
|
3040 |
w/h/d define the size of the texture; bits is a byteArray containing the |
|
3041 |
long-word aligned pixel data; np is the number of props found in |
|
3042 |
the floatArray props. Props must be delimited by a 0.0 entry." |
|
3043 |
||
3044 |
%{ /* NOCONTEXT */ |
|
3045 |
#ifdef GLX |
|
3046 |
unsigned char *cp; |
|
3047 |
const float *fp; |
|
3048 |
OBJ cls; |
|
3049 |
float fbuff[30]; |
|
3050 |
||
5479
ae6b3ac21920
__isByteArray() to __isByteArrayLike() in primitive code
Stefan Vogel <sv@exept.de>
parents:
4718
diff
changeset
|
3051 |
if (__isByteArrayLike(image)) { |
6254 | 3052 |
cp = _ByteArrayInstPtr(image)->ba_element; |
3053 |
fp = __glx_getFloatsFromFloatArrayInto(props, fbuff); |
|
3054 |
||
3055 |
SETWIN(aGLXWindowId) |
|
3056 |
texdef3d(__intVal(index), __intVal(nc), __intVal(w), __intVal(h), |
|
3057 |
__intVal(d), |
|
3058 |
(const unsigned long *)cp, __intVal(np), fp); |
|
294 | 3059 |
} |
3060 |
#endif |
|
3061 |
%} |
|
3062 |
! |
|
3063 |
||
3064 |
glxTexbind:target index:index in:aGLXWindowId |
|
3065 |
"bind a texture; target must be an integer or one |
|
3066 |
of the symbols #texture0, #textureDetail or #textureIdle." |
|
3067 |
||
3068 |
%{ /* NOCONTEXT */ |
|
3069 |
#ifdef GLX |
|
3070 |
long t; |
|
3071 |
||
3072 |
if (__isSmallInteger(target)) { |
|
3073 |
t = __intVal(target); |
|
3074 |
} else { |
|
3075 |
if (target == @symbol(texture0)) { |
|
3076 |
t = TX_TEXTURE_0; |
|
3077 |
} else if (target == @symbol(textureDetail)) { |
|
3078 |
t = TX_TEXTURE_DETAIL; |
|
3079 |
} else if (target == @symbol(textureIdle)) { |
|
3080 |
t = TX_TEXTURE_IDLE; |
|
3081 |
} else { |
|
1932 | 3082 |
RETURN (nil); |
294 | 3083 |
} |
3084 |
} |
|
3085 |
SETWIN(aGLXWindowId) |
|
3086 |
texbind(t, __intVal(index)); |
|
1932 | 3087 |
#endif |
3088 |
%} |
|
294 | 3089 |
! ! |
3090 |
||
3091 |
!GLXWorkstation methodsFor:'matrix stack'! |
|
3092 |
||
3093 |
glxGetMatrix:arrayOf16Floats in:aGLXWindowId |
|
3094 |
"argument must be an array (a matrix) of 16 floats. The current matrix |
|
3095 |
will be stored into that." |
|
3096 |
||
3097 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3098 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3099 |
#else |
294 | 3100 |
Matrix matrix; |
3101 |
||
3102 |
SETWIN(aGLXWindowId) |
|
3103 |
getmatrix(matrix); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3104 |
if (! __glx_putFloatsFromInto(matrix, arrayOf16Floats, 16)) RETURN(false); |
1932 | 3105 |
#endif |
3106 |
%} |
|
294 | 3107 |
! |
3108 |
||
3109 |
glxLoadMatrix:arrayOf16Floats in:aGLXWindowId |
|
3110 |
"argument must be an array(a matrix) of 16 floats. The current matrix |
|
3111 |
will be loaded from that." |
|
3112 |
||
3113 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3114 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3115 |
#else |
294 | 3116 |
Matrix matrix; |
3117 |
Matrix *m; |
|
3118 |
||
2814 | 3119 |
if (! (m = __glx_getFloatsFromMatrixInto(arrayOf16Floats, matrix))) RETURN (false); |
294 | 3120 |
SETWIN(aGLXWindowId) |
3121 |
loadmatrix(*m); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3122 |
#endif |
294 | 3123 |
%} |
3124 |
! |
|
3125 |
||
3126 |
glxMultMatrix:arrayOf16Floats in:aGLXWindowId |
|
3127 |
"argument must be an array(a matrix) of 16 floats containing a |
|
3128 |
matrix to multiply into the current matrix." |
|
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 |
||
2814 | 3136 |
if (! (m = __glx_getFloatsFromMatrixInto(arrayOf16Floats, matrix))) RETURN (false); |
294 | 3137 |
SETWIN(aGLXWindowId) |
3138 |
multmatrix(*m); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3139 |
#endif |
294 | 3140 |
%} |
3141 |
! |
|
3142 |
||
3143 |
glxPopmatrixIn:aGLXWindowId |
|
3144 |
"pop transformation stack" |
|
3145 |
||
3146 |
%{ /* NOCONTEXT */ |
|
3147 |
SETWIN(aGLXWindowId) |
|
1932 | 3148 |
#ifdef OPENGL |
3149 |
#else |
|
294 | 3150 |
popmatrix(); |
1932 | 3151 |
#endif |
294 | 3152 |
%} |
3153 |
! |
|
3154 |
||
3155 |
glxPushmatrixIn:aGLXWindowId |
|
3156 |
"push down transformation stack" |
|
3157 |
||
3158 |
%{ /* NOCONTEXT */ |
|
3159 |
SETWIN(aGLXWindowId) |
|
1932 | 3160 |
#ifdef OPENGL |
3161 |
#else |
|
294 | 3162 |
pushmatrix(); |
1932 | 3163 |
#endif |
294 | 3164 |
%} |
3165 |
! ! |
|
3166 |
||
3167 |
!GLXWorkstation methodsFor:'misc'! |
|
3168 |
||
3169 |
glxGconfigIn:aGLXWindowId |
|
3170 |
"must be sent after RGBmode, doubleBuffer etc. to have these |
|
3171 |
changes really take effect. See GLX manual. |
|
7656 | 3172 |
(Actually, it seems to be not allowed - I don't really know)" |
294 | 3173 |
|
3174 |
%{ /* NOCONTEXT */ |
|
3175 |
SETWIN(aGLXWindowId) |
|
1932 | 3176 |
#ifdef OPENGL |
3177 |
#else |
|
294 | 3178 |
gconfig(); |
1932 | 3179 |
#endif |
294 | 3180 |
%} |
3181 |
! |
|
3182 |
||
3183 |
glxMmode:aSymbol in:aGLXWindowId |
|
3184 |
"set matrix mode: #single, #viewing, #projection or #texture" |
|
3185 |
||
3186 |
%{ /* NOCONTEXT */ |
|
3187 |
#ifdef GLX |
|
3188 |
if (aSymbol == @symbol(single)) { |
|
3189 |
mmode(MSINGLE); |
|
3190 |
RETURN (true); |
|
3191 |
} |
|
3192 |
if (aSymbol == @symbol(viewing)) { |
|
3193 |
mmode(MVIEWING); |
|
3194 |
RETURN (true); |
|
3195 |
} |
|
3196 |
if (aSymbol == @symbol(projection)) { |
|
3197 |
mmode(MPROJECTION); |
|
3198 |
RETURN (true); |
|
3199 |
} |
|
3200 |
if (aSymbol == @symbol(texture)) { |
|
3201 |
mmode(MTEXTURE); |
|
3202 |
RETURN (true); |
|
3203 |
} |
|
3204 |
#endif |
|
3205 |
%} |
|
3206 |
. |
|
3207 |
^ false |
|
3208 |
! |
|
3209 |
||
3210 |
glxNmode:aSymbol in:aGLXWindowId |
|
3211 |
"set normalize mode: #auto, #normalize" |
|
3212 |
||
3213 |
%{ /* NOCONTEXT */ |
|
3214 |
#ifdef GLX |
|
3215 |
if (aSymbol == @symbol(auto)) { |
|
3216 |
nmode(NAUTO); |
|
3217 |
RETURN (true); |
|
3218 |
} |
|
3219 |
if (aSymbol == @symbol(normalize)) { |
|
3220 |
nmode(NNORMALIZE); |
|
3221 |
RETURN (true); |
|
3222 |
} |
|
3223 |
#endif |
|
3224 |
%} |
|
3225 |
. |
|
3226 |
^ false |
|
3227 |
! |
|
3228 |
||
3229 |
glxRGBmodeIn:aGLXWindowId |
|
3230 |
"set true color mode (no colormap)" |
|
3231 |
||
3232 |
%{ /* NOCONTEXT */ |
|
3233 |
#ifdef GLX |
|
3234 |
SETWIN(aGLXWindowId) |
|
3235 |
RGBmode(); |
|
3236 |
RETURN (true); |
|
3237 |
#endif |
|
3238 |
%} |
|
3239 |
. |
|
3240 |
^ false |
|
3241 |
! ! |
|
3242 |
||
3243 |
!GLXWorkstation methodsFor:'objects'! |
|
3244 |
||
3245 |
glxCallObject:obj in:aGLXWindowId |
|
3246 |
"perform the commands of an object (macro)." |
|
3247 |
||
2075 | 3248 |
%{ /* NOCONTEXT STACK:32000 */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3249 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3250 |
#else |
294 | 3251 |
if (__isSmallInteger(obj)) { |
3252 |
SETWIN(aGLXWindowId) |
|
3253 |
callobj(_objectVal(obj)); |
|
3254 |
RETURN (true); |
|
3255 |
} |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3256 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3257 |
%}. |
294 | 3258 |
^ false |
3259 |
! |
|
3260 |
||
3261 |
glxCloseObjectIn:aGLXWindowId |
|
3262 |
"end object defnition" |
|
3263 |
||
2075 | 3264 |
%{ /* NOCONTEXT STACK:32000 */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3265 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3266 |
#else |
294 | 3267 |
SETWIN(aGLXWindowId) |
3268 |
closeobj(); |
|
3269 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3270 |
#endif |
294 | 3271 |
%} |
3272 |
! |
|
3273 |
||
3274 |
glxDeleteObject:obj in:aGLXWindowId |
|
3275 |
||
2075 | 3276 |
%{ /* NOCONTEXT STACK:32000 */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3277 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3278 |
#else |
1882 | 3279 |
if (__isSmallInteger(obj)) { |
4718 | 3280 |
SETWIN(aGLXWindowId) |
3281 |
delobj(_objectVal(obj)); |
|
3282 |
RETURN (true); |
|
1882 | 3283 |
} |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3284 |
#endif |
294 | 3285 |
%} |
3286 |
! |
|
3287 |
||
3288 |
glxGenObjectIn:aGLXWindowId |
|
3289 |
"return a new (free & unused) object id for use |
|
3290 |
with makeObj" |
|
3291 |
||
3292 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3293 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3294 |
#else |
294 | 3295 |
SETWIN(aGLXWindowId) |
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
3296 |
RETURN (__MKSMALLINT(genobj())); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3297 |
#endif |
294 | 3298 |
%} |
3299 |
! |
|
3300 |
||
3301 |
glxGetopenobjIn:aGLXWindowId |
|
3302 |
"return the currently open objects id; -1 if none is open" |
|
3303 |
||
3304 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3305 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3306 |
#else |
294 | 3307 |
SETWIN(aGLXWindowId) |
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
3308 |
RETURN (__MKSMALLINT(getopenobj())); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3309 |
#endif |
294 | 3310 |
%} |
3311 |
! |
|
3312 |
||
3313 |
glxIsobj:obj in:aGLXWindowId |
|
3314 |
"return true, if obj is a valid object id" |
|
3315 |
||
3316 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3317 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3318 |
#else |
294 | 3319 |
SETWIN(aGLXWindowId) |
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
3320 |
RETURN (__MKBOOLEAN(isobj(_objectVal(obj)))); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3321 |
#endif |
294 | 3322 |
%} |
3323 |
! |
|
3324 |
||
3325 |
glxMakeObject:id in:aGLXWindowId |
|
3326 |
"start object definition - |
|
3327 |
another name conflict" |
|
3328 |
||
2075 | 3329 |
%{ /* NOCONTEXT STACK:32000 */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3330 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3331 |
#else |
294 | 3332 |
if (__isSmallInteger(id)) { |
3333 |
SETWIN(aGLXWindowId) |
|
3334 |
makeobj(_objectVal(id)); |
|
3335 |
RETURN (true); |
|
3336 |
} |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3337 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3338 |
%}. |
294 | 3339 |
^ false |
3340 |
! ! |
|
3341 |
||
3342 |
!GLXWorkstation methodsFor:'patches & surfaces'! |
|
3343 |
||
3344 |
glxBeginCurveIn:aGLXWindowId |
|
3345 |
"start a NURBS curve def - in real GL only" |
|
3346 |
||
3347 |
%{ /* NOCONTEXT */ |
|
1932 | 3348 |
SETWIN(aGLXWindowId) |
3349 |
#ifdef GLX |
|
294 | 3350 |
bgncurve(); |
1932 | 3351 |
#endif |
3352 |
%} |
|
294 | 3353 |
! |
3354 |
||
3355 |
glxBeginSurfaceIn:aGLXWindowId |
|
3356 |
"start a NURBS surface def - in real GL only" |
|
3357 |
||
3358 |
%{ /* NOCONTEXT */ |
|
1932 | 3359 |
SETWIN(aGLXWindowId) |
3360 |
#ifdef GLX |
|
294 | 3361 |
bgnsurface(); |
1932 | 3362 |
#endif |
3363 |
%} |
|
294 | 3364 |
! |
3365 |
||
3366 |
glxDefBasis:id mat:aMatrix in:aGLXWindowId |
|
528 | 3367 |
"define the basis matrix for a patch or curve" |
294 | 3368 |
|
3369 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3370 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3371 |
#else |
294 | 3372 |
Matrix matrix; |
3373 |
Matrix *m; |
|
3374 |
||
2814 | 3375 |
if (! (m = __glx_getFloatsFromMatrixInto(aMatrix, matrix))) RETURN (false); |
294 | 3376 |
if (__isSmallInteger(id)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3377 |
SETWIN(aGLXWindowId) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3378 |
defbasis((short)(__intVal(id)), *m); |
294 | 3379 |
} |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3380 |
#endif |
1932 | 3381 |
%} |
528 | 3382 |
|
3383 |
"Modified: 19.3.1996 / 18:52:56 / cg" |
|
294 | 3384 |
! |
3385 |
||
3386 |
glxEndCurveIn:aGLXWindowId |
|
3387 |
"end a NURBS curve def - in real GL only" |
|
3388 |
||
3389 |
%{ /* NOCONTEXT */ |
|
1932 | 3390 |
SETWIN(aGLXWindowId) |
3391 |
#ifdef GLX |
|
294 | 3392 |
endcurve(); |
1932 | 3393 |
#endif |
3394 |
%} |
|
294 | 3395 |
! |
3396 |
||
3397 |
glxEndSurfaceIn:aGLXWindowId |
|
3398 |
"end a NURBS surface def - in real GL only" |
|
3399 |
||
3400 |
%{ /* NOCONTEXT */ |
|
1932 | 3401 |
SETWIN(aGLXWindowId) |
3402 |
#ifdef GLX |
|
294 | 3403 |
endsurface(); |
1932 | 3404 |
#endif |
3405 |
%} |
|
294 | 3406 |
! |
3407 |
||
4718 | 3408 |
glxNurbsSurfaceUKnotCount: uKnotCount uKnot: uKnot |
294 | 3409 |
vKnotCount: vKnotCount vKnot: vKnot |
4718 | 3410 |
uOffset: uOffset vOffset: vOffset |
3411 |
ctlArray: ctlArray |
|
3412 |
uOrder: uOrder vOrder: vOrder |
|
294 | 3413 |
type: type in: aGLXWindowId |
3414 |
||
3415 |
| ctlPoints i | |
|
3416 |
ctlPoints := DoubleArray new: ctlArray size * (ctlArray first size). |
|
3417 |
i := 1. |
|
3418 |
ctlArray do: [:point | |
|
4718 | 3419 |
point do: [:coord | |
294 | 3420 |
ctlPoints at: i put: coord. |
3421 |
i := i + 1]]. |
|
3422 |
||
3423 |
%{ /* NOCONTEXT */ |
|
3424 |
#ifdef GLX |
|
3425 |
char *uKnotElements, *vKnotElements, *ctlElements; |
|
3426 |
OBJ cls; |
|
3427 |
int ninstVars, nInstBytes; |
|
3428 |
||
3429 |
SETWIN(aGLXWindowId) |
|
3430 |
cls = __qClass(ctlPoints); |
|
3431 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
|
3432 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
|
3433 |
||
3434 |
ctlElements = (char *)(_InstPtr(ctlPoints)) + nInstBytes; |
|
3435 |
uKnotElements = (char *)(_InstPtr(uKnot)) + nInstBytes; |
|
3436 |
vKnotElements = (char *)(_InstPtr(vKnot)) + nInstBytes; |
|
3437 |
||
3438 |
nurbssurface ( |
|
3439 |
__intVal(uKnotCount), (double *)uKnotElements, |
|
3440 |
__intVal(vKnotCount), (double *)vKnotElements, |
|
3441 |
__intVal(uOffset), __intVal(vOffset), |
|
4718 | 3442 |
(double *)ctlElements, |
294 | 3443 |
__intVal(uOrder), __intVal(vOrder), __intVal(type)); |
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 |
glxPatchBasisU:u v:v in:aGLXWindowId |
|
528 | 3451 |
"set the two basis matrices for a patch" |
294 | 3452 |
|
3453 |
%{ /* NOCONTEXT */ |
|
3454 |
if (__bothSmallInteger(u, v)) { |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3455 |
SETWIN(aGLXWindowId) |
1932 | 3456 |
#ifdef OPENGL |
3457 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3458 |
patchbasis((long)__intVal(u), (long)__intVal(v)); |
1932 | 3459 |
#endif |
294 | 3460 |
} |
1932 | 3461 |
%} |
528 | 3462 |
|
3463 |
"Modified: 19.3.1996 / 18:53:18 / cg" |
|
294 | 3464 |
! |
3465 |
||
3466 |
glxPatchCurvesU:u v:v in:aGLXWindowId |
|
528 | 3467 |
"set the number of curves to be drawn in each direction on a patch" |
294 | 3468 |
|
3469 |
%{ /* NOCONTEXT */ |
|
3470 |
if (__bothSmallInteger(u, v)) { |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3471 |
SETWIN(aGLXWindowId) |
1932 | 3472 |
#ifdef OPENGL |
3473 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3474 |
patchcurves((long)__intVal(u), (long)__intVal(v)); |
1932 | 3475 |
#endif |
294 | 3476 |
} |
1932 | 3477 |
%} |
528 | 3478 |
|
3479 |
"Modified: 19.3.1996 / 18:53:34 / cg" |
|
294 | 3480 |
! |
3481 |
||
3482 |
glxPatchPrecisionU:u v:v in:aGLXWindowId |
|
3483 |
"set the patch precision" |
|
3484 |
||
3485 |
%{ /* NOCONTEXT */ |
|
3486 |
if (__bothSmallInteger(u, v)) { |
|
3487 |
SETWIN(aGLXWindowId) |
|
1932 | 3488 |
#ifdef OPENGL |
3489 |
#else |
|
294 | 3490 |
patchprecision((long)__intVal(u), (long)__intVal(v)); |
1932 | 3491 |
#endif |
294 | 3492 |
} |
1932 | 3493 |
%} |
294 | 3494 |
! |
3495 |
||
3496 |
glxPatchX:arrayOf16XFloats y:arrayOf16YFloats z:arrayOf16ZFloats in:aGLXWindowId |
|
528 | 3497 |
"Draws a bicubic patch. |
3498 |
arguments must be arrays of 16 floats containing the patch" |
|
294 | 3499 |
|
3500 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3501 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3502 |
#else |
294 | 3503 |
Matrix matrixX, matrixY, matrixZ; |
3504 |
Matrix *mX, *mY, *mZ; |
|
3505 |
||
4718 | 3506 |
if (! (mX = __glx_getFloatsFromMatrixInto(arrayOf16XFloats, matrixX))) |
1932 | 3507 |
RETURN (nil); |
4718 | 3508 |
if (! (mY = __glx_getFloatsFromMatrixInto(arrayOf16YFloats, matrixY))) |
1932 | 3509 |
RETURN (nil); |
4718 | 3510 |
if (! (mZ = __glx_getFloatsFromMatrixInto(arrayOf16ZFloats, matrixZ))) |
1932 | 3511 |
RETURN (nil); |
294 | 3512 |
SETWIN(aGLXWindowId) |
3513 |
patch(*mX, *mY, *mZ); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3514 |
#endif |
294 | 3515 |
%} |
528 | 3516 |
|
3517 |
"Modified: 19.3.1996 / 18:54:02 / cg" |
|
3518 |
! |
|
3519 |
||
3520 |
glxRpatchX:arrayOf16XFloats y:arrayOf16YFloats z:arrayOf16ZFloats w:arrayOf16WFloats in:aGLXWindowId |
|
3521 |
"Draws a rational bicubic patch. |
|
3522 |
arguments must be arrays of 16 floats containing the patch" |
|
3523 |
||
3524 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3525 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3526 |
#else |
529 | 3527 |
Matrix matrixX, matrixY, matrixZ, matrixW; |
3528 |
Matrix *mX, *mY, *mZ, *mW; |
|
528 | 3529 |
|
4718 | 3530 |
if (! (mX = __glx_getFloatsFromMatrixInto(arrayOf16XFloats, matrixX))) |
1932 | 3531 |
RETURN (nil); |
4718 | 3532 |
if (! (mY = __glx_getFloatsFromMatrixInto(arrayOf16YFloats, matrixY))) |
1932 | 3533 |
RETURN (nil); |
4718 | 3534 |
if (! (mZ = __glx_getFloatsFromMatrixInto(arrayOf16ZFloats, matrixZ))) |
1932 | 3535 |
RETURN (nil); |
4718 | 3536 |
if (! (mW = __glx_getFloatsFromMatrixInto(arrayOf16WFloats, matrixW))) |
1932 | 3537 |
RETURN (nil); |
529 | 3538 |
SETWIN(aGLXWindowId) |
3539 |
rpatch(*mX, *mY, *mZ, *mW); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3540 |
#endif |
528 | 3541 |
%} |
3542 |
||
3543 |
"Modified: 19.3.1996 / 18:54:02 / cg" |
|
3544 |
"Created: 19.3.1996 / 18:56:34 / cg" |
|
3545 |
! ! |
|
3546 |
||
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3547 |
!GLXWorkstation methodsFor:'pixel copy'! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3548 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3549 |
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
|
3550 |
"copy a rectangular area in the view. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3551 |
For now, this is only supported with a true GL. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3552 |
readsource specifies which plane/buffer is affected by this operation." |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3553 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3554 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3555 |
#ifdef GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3556 |
SETWIN(aGLXWindowId) |
4718 | 3557 |
rectcopy(_screencoordVal(x1), _screencoordVal(y1), |
3558 |
_screencoordVal(x2), _screencoordVal(y2), |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3559 |
_screencoordVal(newx), _screencoordVal(newy)); |
1932 | 3560 |
#endif |
3561 |
%} |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3562 |
! ! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3563 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3564 |
!GLXWorkstation methodsFor:'pixel reading'! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3565 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3566 |
glxReadpixelsTo:dest in:aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3567 |
"read pixels from the view. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3568 |
Dest must be an array and gets pixel values assigned, |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3569 |
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
|
3570 |
For now, pixel-reading is only supported with a true GL. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3571 |
Caveat: the number of pixels is limited to 256. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3572 |
In double buffer mode, the backBuffer is read." |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3573 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3574 |
|n| |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3575 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3576 |
n := dest size. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3577 |
n > 256 ifTrue:[^ 0]. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3578 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3579 |
%{ /* STACK:1024 */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3580 |
#ifdef GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3581 |
Colorindex buffer[256]; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3582 |
int i, nRead; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3583 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3584 |
if (__isArray(dest)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3585 |
SETWIN(aGLXWindowId) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3586 |
nRead = readpixels(__intVal(n), buffer); |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3587 |
for (i=0; i<nRead;i++) { |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3588 |
__ArrayInstPtr(dest)->a_element[i] = __MKSMALLINT(buffer[i]); |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3589 |
} |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3590 |
RETURN (__MKSMALLINT(nRead)); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3591 |
} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3592 |
#endif |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3593 |
%}. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3594 |
^ 0 |
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 |
"Modified: 22.3.1996 / 18:08:00 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3597 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3598 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3599 |
glxReadsource: src in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3600 |
"specify what is read with folowing readPixels requests. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3601 |
For now, pixel-reading is only supported with a true GL" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3602 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3603 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3604 |
#ifdef GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3605 |
OBJ s = src; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3606 |
int what; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3607 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3608 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3609 |
if (s == @symbol(auto)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3610 |
what = SRC_AUTO; |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3611 |
} else if (s == @symbol(front)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3612 |
what = SRC_FRONT; |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3613 |
} else if (s == @symbol(back)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3614 |
what = SRC_BACK; |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3615 |
} else if (s == @symbol(zBuffer)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3616 |
what = SRC_ZBUFFER; |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3617 |
} else if (s == @symbol(frameGrabber)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3618 |
what = SRC_FRAMEGRABBER; |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3619 |
} else if (s == @symbol(over)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3620 |
what = SRC_OVER; |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3621 |
} else if (s == @symbol(under)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3622 |
what = SRC_UNDER; |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3623 |
} else if (s == @symbol(popUp)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3624 |
what = SRC_PUP; |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3625 |
} else { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3626 |
what = _longVal(src); |
537
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 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3629 |
readsource(what); |
1932 | 3630 |
#endif |
3631 |
%} |
|
538 | 3632 |
! |
3633 |
||
541 | 3634 |
glxRectreadX1:x1 y1:y1 x2:x2 y2:y2 h:viewHeight to:dest in:aGLXWindowId |
538 | 3635 |
"read pixels from a rectanglular area. |
3636 |
Dest must be an array and gets pixel values assigned, |
|
3637 |
reading n*m pixels. |
|
3638 |
For now, pixel-reading is only supported with a true GL. |
|
3639 |
Caveat: the number of pixels is limited to 256. |
|
3640 |
In double buffer mode, the backBuffer is read." |
|
3641 |
||
541 | 3642 |
|n idx sy1 sy2| |
3643 |
||
3644 |
"/ GLX's y coordinates go bottom to top ... |
|
3645 |
||
3646 |
sy1 := viewHeight - y1. |
|
3647 |
sy2 := viewHeight - y2. |
|
538 | 3648 |
|
3649 |
n := (x2 - x1 + 1) * (y2 - y1 + 1). |
|
3650 |
n > 256 ifTrue:[^ 0]. |
|
3651 |
dest size < n ifTrue:[^ 0]. |
|
3652 |
||
3653 |
%{ /* STACK:1024 */ |
|
3654 |
#ifdef GLX |
|
3655 |
Colorindex buffer[256]; |
|
3656 |
int i, nRead; |
|
3657 |
||
3658 |
if (__isArray(dest) |
|
3659 |
&& __isSmallInteger(x1) && __isSmallInteger(x2) |
|
541 | 3660 |
&& __isSmallInteger(sy1) && __isSmallInteger(sy2) |
538 | 3661 |
) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3662 |
SETWIN(aGLXWindowId) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3663 |
nRead = rectread(__intVal(x1), __intVal(sy1), |
4718 | 3664 |
__intVal(x2), __intVal(sy2), |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3665 |
buffer); |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3666 |
for (i=0; i<nRead;i++) { |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3667 |
__ArrayInstPtr(dest)->a_element[i] = __MKSMALLINT(buffer[i]); |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3668 |
} |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3669 |
RETURN (__MKSMALLINT(nRead)); |
538 | 3670 |
} |
3671 |
#endif |
|
3672 |
%}. |
|
3673 |
"/ |
|
3674 |
"/ ok, this is not a GL - use XWorkstations pixel read method |
|
3675 |
"/ and convert |
|
3676 |
"/ |
|
3677 |
idx := 1. |
|
3678 |
y1 to:y2 do:[:y | |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3679 |
x1 to:x2 do:[:x | |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3680 |
|pix| |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3681 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3682 |
pix := self vglGetPixelX:x y:y in:aGLXWindowId. |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3683 |
dest at:idx put:pix |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3684 |
] |
538 | 3685 |
]. |
3686 |
^ n |
|
3687 |
||
3688 |
"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
|
3689 |
|
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3690 |
! |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3691 |
|
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3692 |
glxXColorToGLColor:pixel |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3693 |
"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
|
3694 |
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
|
3695 |
|
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3696 |
%{ /* NOCONTEXT */ |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3697 |
#ifdef VGL |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3698 |
if (__isSmallInteger(pixel)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3699 |
RETURN (__MKSMALLINT(X11_invColor(__intVal(pixel)))); |
542
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3700 |
} |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3701 |
#endif |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3702 |
%}. |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3703 |
^ pixel |
543
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3704 |
! |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3705 |
|
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3706 |
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
|
3707 |
"special for VGL" |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3708 |
|
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3709 |
%{ |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3710 |
#ifdef VGL |
1932 | 3711 |
if (__bothSmallInteger(x, y)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3712 |
SETWIN(aGLXWindowId) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3713 |
RETURN (__MKSMALLINT(X11_getPixel(__intVal(x), __intVal(y)))); |
543
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3714 |
} |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3715 |
#endif |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3716 |
%}. |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3717 |
^ 0 |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3718 |
|
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3719 |
"Modified: 22.3.1996 / 18:08:00 / cg" |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3720 |
! ! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3721 |
|
528 | 3722 |
!GLXWorkstation methodsFor:'points'! |
3723 |
||
3724 |
glxPnt2X: x y: y in: aGLXWindowId |
|
3725 |
"plot a point in x, y, 0." |
|
3726 |
||
3727 |
%{ /* NOCONTEXT */ |
|
3728 |
Coord c_x, c_y; |
|
3729 |
||
3730 |
_COORD_ (x, c_x) |
|
3731 |
_COORD_ (y, c_y) |
|
3732 |
SETWIN(aGLXWindowId) |
|
1932 | 3733 |
#ifdef OPENGL |
3734 |
#else |
|
528 | 3735 |
pnt2(c_x, c_y); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3736 |
#endif |
528 | 3737 |
%} |
3738 |
||
3739 |
"Modified: 19.3.1996 / 18:35:55 / cg" |
|
3740 |
! |
|
3741 |
||
3742 |
glxPnt2iX: x y: y in: aGLXWindowId |
|
3743 |
"plot a point in x, y, 0." |
|
3744 |
||
3745 |
%{ /* NOCONTEXT */ |
|
3746 |
Icoord c_x, c_y; |
|
3747 |
||
3748 |
_ICOORD_ (x, c_x) |
|
3749 |
_ICOORD_ (y, c_y) |
|
3750 |
SETWIN(aGLXWindowId) |
|
1932 | 3751 |
#ifdef OPENGL |
3752 |
#else |
|
528 | 3753 |
pnt2i(c_x, c_y); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3754 |
#endif |
528 | 3755 |
%} |
3756 |
||
3757 |
"Modified: 19.3.1996 / 18:35:59 / cg" |
|
3758 |
! |
|
3759 |
||
3760 |
glxPnt2sX: x y: y in: aGLXWindowId |
|
3761 |
"plot a point in x, y, 0." |
|
3762 |
||
3763 |
%{ /* NOCONTEXT */ |
|
3764 |
Scoord c_x, c_y; |
|
3765 |
||
3766 |
_SCOORD_ (x, c_x) |
|
3767 |
_SCOORD_ (y, c_y) |
|
3768 |
SETWIN(aGLXWindowId) |
|
1932 | 3769 |
#ifdef OPENGL |
3770 |
#else |
|
528 | 3771 |
pnt2s(c_x, c_y); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3772 |
#endif |
528 | 3773 |
%} |
3774 |
||
3775 |
"Modified: 19.3.1996 / 18:36:03 / cg" |
|
3776 |
! |
|
3777 |
||
3778 |
glxPntX: x y: y z: z in: aGLXWindowId |
|
3779 |
"plot a point in x, y, z." |
|
3780 |
||
3781 |
%{ /* NOCONTEXT */ |
|
3782 |
Coord c_x, c_y, c_z; |
|
3783 |
||
3784 |
_COORD_ (x, c_x) |
|
3785 |
_COORD_ (y, c_y) |
|
3786 |
_COORD_ (z, c_z) |
|
3787 |
SETWIN(aGLXWindowId) |
|
1932 | 3788 |
#ifdef OPENGL |
3789 |
#else |
|
528 | 3790 |
pnt(c_x, c_y, c_z); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3791 |
#endif |
528 | 3792 |
%} |
3793 |
||
3794 |
"Modified: 19.3.1996 / 18:36:08 / cg" |
|
3795 |
! |
|
3796 |
||
3797 |
glxPntiX: x y: y z: z in: aGLXWindowId |
|
3798 |
"plot a point in x, y, z." |
|
3799 |
||
3800 |
%{ /* NOCONTEXT */ |
|
3801 |
Icoord c_x, c_y, c_z; |
|
3802 |
||
3803 |
_ICOORD_ (x, c_x) |
|
3804 |
_ICOORD_ (y, c_y) |
|
3805 |
_ICOORD_ (z, c_z) |
|
3806 |
SETWIN(aGLXWindowId) |
|
1932 | 3807 |
#ifdef OPENGL |
3808 |
#else |
|
528 | 3809 |
pnti(c_x, c_y, c_z); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3810 |
#endif |
528 | 3811 |
%} |
3812 |
||
3813 |
"Modified: 19.3.1996 / 18:36:14 / cg" |
|
3814 |
! |
|
3815 |
||
3816 |
glxPntsX: x y: y z: z in: aGLXWindowId |
|
3817 |
"plot a point in x, y, z." |
|
3818 |
||
3819 |
%{ /* NOCONTEXT */ |
|
3820 |
Scoord c_x, c_y, c_z; |
|
3821 |
||
3822 |
_SCOORD_ (x, c_x) |
|
3823 |
_SCOORD_ (y, c_y) |
|
3824 |
_SCOORD_ (z, c_z) |
|
3825 |
SETWIN(aGLXWindowId) |
|
1932 | 3826 |
#ifdef OPENGL |
3827 |
#else |
|
528 | 3828 |
pnts(c_x, c_y, c_z); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3829 |
#endif |
528 | 3830 |
%} |
3831 |
||
3832 |
"Modified: 19.3.1996 / 18:36:17 / cg" |
|
3833 |
! |
|
3834 |
||
3835 |
glxPntsize: n in: aGLXWindowId |
|
3836 |
||
3837 |
%{ /* NOCONTEXT */ |
|
1932 | 3838 |
SETWIN(aGLXWindowId) |
3839 |
#ifdef GLX |
|
528 | 3840 |
pntsize(_shortVal(n)); |
1932 | 3841 |
#endif |
3842 |
%} |
|
528 | 3843 |
! |
3844 |
||
3845 |
glxPntsizef: n in: aGLXWindowId |
|
3846 |
||
3847 |
%{ /* NOCONTEXT */ |
|
1932 | 3848 |
SETWIN(aGLXWindowId) |
3849 |
#ifdef GLX |
|
528 | 3850 |
pntsizef(_floatVal(n)); |
1932 | 3851 |
#endif |
3852 |
%} |
|
528 | 3853 |
! ! |
3854 |
||
3855 |
!GLXWorkstation methodsFor:'polygons'! |
|
3856 |
||
3857 |
glxBackface: b in: aGLXWindowId |
|
4718 | 3858 |
"enable/disable culling of backfacing polygons (suppress its drawing). |
528 | 3859 |
A polygon is backfacing if it's orientation in *screen* coords is clockwise" |
3860 |
||
3861 |
%{ /* NOCONTEXT */ |
|
3862 |
SETWIN(aGLXWindowId) |
|
1932 | 3863 |
#ifdef OPENGL |
3864 |
#else |
|
528 | 3865 |
backface(_booleanVal(b)); |
1932 | 3866 |
#endif |
528 | 3867 |
%} |
3868 |
||
3869 |
"Modified: 19.3.1996 / 18:26:50 / cg" |
|
3870 |
! |
|
3871 |
||
3872 |
glxConcave: b in: aGLXWindowId |
|
3873 |
"signal wether or not polygons are concave" |
|
3874 |
||
3875 |
%{ /* NOCONTEXT */ |
|
3876 |
SETWIN(aGLXWindowId) |
|
1932 | 3877 |
#ifdef OPENGL |
3878 |
#else |
|
528 | 3879 |
concave(_booleanVal(b)); |
1932 | 3880 |
#endif |
528 | 3881 |
%} |
3882 |
! |
|
3883 |
||
3884 |
glxFrontface: b in: aGLXWindowId |
|
4718 | 3885 |
"enable/disable culling of frontfacing polygons (suppress its drawing). |
3886 |
A polygon is frontfacing if it's orientation in *screen* coords is |
|
528 | 3887 |
anti-clockwise" |
3888 |
||
3889 |
||
3890 |
%{ /* NOCONTEXT */ |
|
3891 |
SETWIN(aGLXWindowId) |
|
1932 | 3892 |
#ifdef OPENGL |
3893 |
#else |
|
528 | 3894 |
frontface(_booleanVal(b)); |
1932 | 3895 |
#endif |
3896 |
%} |
|
528 | 3897 |
! |
3898 |
||
3899 |
glxPdr2X: x y: y in: aGLXWindowId |
|
3900 |
"add another vertex to the polygon" |
|
3901 |
||
3902 |
%{ /* NOCONTEXT */ |
|
3903 |
Coord c_x, c_y; |
|
3904 |
||
3905 |
_COORD_ (x, c_x) |
|
3906 |
_COORD_ (y, c_y) |
|
3907 |
SETWIN(aGLXWindowId) |
|
1932 | 3908 |
#ifdef OPENGL |
3909 |
#else |
|
528 | 3910 |
pdr2(c_x, c_y); |
1932 | 3911 |
#endif |
3912 |
%} |
|
528 | 3913 |
! |
3914 |
||
3915 |
glxPdr2iX: x y: y in: aGLXWindowId |
|
3916 |
"add another vertex to the polygon" |
|
3917 |
||
3918 |
%{ /* NOCONTEXT */ |
|
3919 |
Icoord c_x, c_y; |
|
3920 |
||
3921 |
_ICOORD_ (x, c_x) |
|
3922 |
_ICOORD_ (y, c_y) |
|
3923 |
SETWIN(aGLXWindowId) |
|
1932 | 3924 |
#ifdef OPENGL |
3925 |
#else |
|
528 | 3926 |
pdr2i(c_x, c_y); |
1932 | 3927 |
#endif |
528 | 3928 |
%} |
3929 |
||
3930 |
"Modified: 19.3.1996 / 18:33:28 / cg" |
|
3931 |
! |
|
3932 |
||
3933 |
glxPdr2sX: x y: y in: aGLXWindowId |
|
3934 |
"add another vertex to the polygon" |
|
3935 |
||
3936 |
%{ /* NOCONTEXT */ |
|
3937 |
Scoord c_x, c_y; |
|
3938 |
||
3939 |
_SCOORD_ (x, c_x) |
|
3940 |
_SCOORD_ (y, c_y) |
|
3941 |
SETWIN(aGLXWindowId) |
|
1932 | 3942 |
#ifdef OPENGL |
3943 |
#else |
|
528 | 3944 |
pdr2s(c_x, c_y); |
1932 | 3945 |
#endif |
528 | 3946 |
%} |
3947 |
||
3948 |
"Modified: 19.3.1996 / 18:34:03 / cg" |
|
3949 |
! |
|
3950 |
||
3951 |
glxPdrX: x y: y z: z in: aGLXWindowId |
|
3952 |
"add another vertex to the polygon" |
|
3953 |
||
3954 |
%{ /* NOCONTEXT */ |
|
3955 |
Coord c_x, c_y, c_z; |
|
3956 |
||
3957 |
_COORD_ (x, c_x) |
|
3958 |
_COORD_ (y, c_y) |
|
3959 |
_COORD_ (z, c_z) |
|
3960 |
SETWIN(aGLXWindowId) |
|
1932 | 3961 |
#ifdef OPENGL |
3962 |
#else |
|
528 | 3963 |
pdr(c_x, c_y, c_z); |
1932 | 3964 |
#endif |
528 | 3965 |
%} |
3966 |
||
3967 |
"Modified: 19.3.1996 / 18:34:06 / cg" |
|
3968 |
! |
|
3969 |
||
3970 |
glxPdriX: x y: y z: z in: aGLXWindowId |
|
3971 |
"add another vertex to the polygon" |
|
3972 |
||
3973 |
%{ /* NOCONTEXT */ |
|
3974 |
Icoord c_x, c_y, c_z; |
|
3975 |
||
3976 |
_ICOORD_ (x, c_x) |
|
3977 |
_ICOORD_ (y, c_y) |
|
3978 |
_ICOORD_ (z, c_z) |
|
3979 |
SETWIN(aGLXWindowId) |
|
1932 | 3980 |
#ifdef OPENGL |
3981 |
#else |
|
528 | 3982 |
pdri(c_x, c_y, c_z); |
1932 | 3983 |
#endif |
528 | 3984 |
%} |
3985 |
||
3986 |
"Modified: 19.3.1996 / 18:34:11 / cg" |
|
3987 |
! |
|
3988 |
||
3989 |
glxPdrsX: x y: y z: z in: aGLXWindowId |
|
3990 |
"add another vertex to the polygon" |
|
3991 |
||
3992 |
%{ /* NOCONTEXT */ |
|
3993 |
Scoord c_x, c_y, c_z; |
|
3994 |
||
3995 |
_SCOORD_ (x, c_x) |
|
3996 |
_SCOORD_ (y, c_y) |
|
3997 |
_SCOORD_ (z, c_z) |
|
3998 |
SETWIN(aGLXWindowId) |
|
1932 | 3999 |
#ifdef OPENGL |
4000 |
#else |
|
528 | 4001 |
pdrs(c_x, c_y, c_z); |
1932 | 4002 |
#endif |
528 | 4003 |
%} |
4004 |
||
4005 |
"Modified: 19.3.1996 / 18:34:14 / cg" |
|
4006 |
! |
|
4007 |
||
4008 |
glxPmv2X: x y: y in: aGLXWindowId |
|
4009 |
"set the start position of a polygon" |
|
4010 |
||
4011 |
%{ /* NOCONTEXT */ |
|
4012 |
Coord c_x, c_y; |
|
4013 |
||
4014 |
_COORD_ (x, c_x) |
|
4015 |
_COORD_ (y, c_y) |
|
4016 |
SETWIN(aGLXWindowId) |
|
1932 | 4017 |
#ifdef OPENGL |
4018 |
#else |
|
528 | 4019 |
pmv2(c_x, c_y); |
1932 | 4020 |
#endif |
528 | 4021 |
%} |
4022 |
||
4023 |
"Modified: 19.3.1996 / 18:32:45 / cg" |
|
4024 |
! |
|
4025 |
||
4026 |
glxPmv2iX: x y: y in: aGLXWindowId |
|
4027 |
"set the start position of a polygon" |
|
4028 |
||
4029 |
%{ /* NOCONTEXT */ |
|
4030 |
Icoord c_x, c_y; |
|
4031 |
||
4032 |
_ICOORD_ (x, c_x) |
|
4033 |
_ICOORD_ (y, c_y) |
|
4034 |
SETWIN(aGLXWindowId) |
|
1932 | 4035 |
#ifdef OPENGL |
4036 |
#else |
|
528 | 4037 |
pmv2i(c_x, c_y); |
1932 | 4038 |
#endif |
528 | 4039 |
%} |
4040 |
||
4041 |
"Modified: 19.3.1996 / 18:32:42 / cg" |
|
4042 |
! |
|
4043 |
||
4044 |
glxPmv2sX: x y: y in: aGLXWindowId |
|
4045 |
"set the start position of a polygon" |
|
4046 |
||
4047 |
%{ /* NOCONTEXT */ |
|
4048 |
Scoord c_x, c_y; |
|
4049 |
||
4050 |
_SCOORD_ (x, c_x) |
|
4051 |
_SCOORD_ (y, c_y) |
|
4052 |
SETWIN(aGLXWindowId) |
|
1932 | 4053 |
#ifdef OPENGL |
4054 |
#else |
|
528 | 4055 |
pmv2s(c_x, c_y); |
1932 | 4056 |
#endif |
528 | 4057 |
%} |
4058 |
||
4059 |
"Modified: 19.3.1996 / 18:32:38 / cg" |
|
4060 |
! |
|
4061 |
||
4062 |
glxPmvX: x y: y z: z in: aGLXWindowId |
|
4063 |
"set the start position of a polygon" |
|
4064 |
||
4065 |
%{ /* NOCONTEXT */ |
|
4066 |
Coord c_x, c_y, c_z; |
|
4067 |
||
4068 |
_COORD_ (x, c_x) |
|
4069 |
_COORD_ (y, c_y) |
|
4070 |
_COORD_ (z, c_z) |
|
4071 |
SETWIN(aGLXWindowId) |
|
1932 | 4072 |
#ifdef OPENGL |
4073 |
#else |
|
528 | 4074 |
pmv(c_x, c_y, c_z); |
1932 | 4075 |
#endif |
528 | 4076 |
%} |
4077 |
||
4078 |
"Modified: 19.3.1996 / 18:31:52 / cg" |
|
4079 |
! |
|
4080 |
||
4081 |
glxPmviX: x y: y z: z in: aGLXWindowId |
|
4082 |
"set the start position of a polygon" |
|
4083 |
||
4084 |
%{ /* NOCONTEXT */ |
|
4085 |
Icoord c_x, c_y, c_z; |
|
4086 |
||
4087 |
_ICOORD_ (x, c_x) |
|
4088 |
_ICOORD_ (y, c_y) |
|
4089 |
_ICOORD_ (z, c_z) |
|
4090 |
SETWIN(aGLXWindowId) |
|
1932 | 4091 |
#ifdef OPENGL |
4092 |
#else |
|
528 | 4093 |
pmvi(c_x, c_y, c_z); |
1932 | 4094 |
#endif |
528 | 4095 |
%} |
4096 |
||
4097 |
"Modified: 19.3.1996 / 18:31:59 / cg" |
|
4098 |
! |
|
4099 |
||
4100 |
glxPmvsX: x y: y z: z in: aGLXWindowId |
|
4101 |
"set the start position of a polygon" |
|
4102 |
||
4103 |
%{ /* NOCONTEXT */ |
|
4104 |
Scoord c_x, c_y, c_z; |
|
4105 |
||
4106 |
_SCOORD_ (x, c_x) |
|
4107 |
_SCOORD_ (y, c_y) |
|
4108 |
_SCOORD_ (z, c_z) |
|
4109 |
SETWIN(aGLXWindowId) |
|
1932 | 4110 |
#ifdef OPENGL |
4111 |
#else |
|
528 | 4112 |
pmvs(c_x, c_y, c_z); |
1932 | 4113 |
#endif |
528 | 4114 |
%} |
4115 |
||
4116 |
"Modified: 19.3.1996 / 18:32:03 / cg" |
|
4117 |
! |
|
4118 |
||
4119 |
glxPolymode: mode in: aGLXWindowId |
|
4120 |
"Sets the polygon filling mode - only filled (1) or outlined (0) |
|
4121 |
are supported" |
|
4122 |
||
4123 |
%{ /* NOCONTEXT */ |
|
4124 |
SETWIN(aGLXWindowId) |
|
1932 | 4125 |
#ifdef OPENGL |
4126 |
#else |
|
528 | 4127 |
polymode(_longVal(mode)); |
1932 | 4128 |
#endif |
528 | 4129 |
%} |
4130 |
||
4131 |
"Modified: 19.3.1996 / 18:29:32 / cg" |
|
4132 |
! |
|
4133 |
||
4134 |
glxRpdr2X: x y: y in: aGLXWindowId |
|
4135 |
"add another relative vertex to the polygon" |
|
4136 |
||
4137 |
%{ /* NOCONTEXT */ |
|
4138 |
Coord c_x, c_y; |
|
4139 |
||
4140 |
_COORD_ (x, c_x) |
|
4141 |
_COORD_ (y, c_y) |
|
4142 |
SETWIN(aGLXWindowId) |
|
1932 | 4143 |
#ifdef OPENGL |
4144 |
#else |
|
528 | 4145 |
rpdr2(c_x, c_y); |
1932 | 4146 |
#endif |
528 | 4147 |
%} |
4148 |
||
4149 |
"Modified: 19.3.1996 / 18:34:31 / cg" |
|
4150 |
! |
|
4151 |
||
4152 |
glxRpdr2iX: x y: y in: aGLXWindowId |
|
4153 |
"add another relative vertex to the polygon" |
|
4154 |
||
4155 |
%{ /* NOCONTEXT */ |
|
4156 |
Icoord c_x, c_y; |
|
4157 |
||
4158 |
_ICOORD_ (x, c_x) |
|
4159 |
_ICOORD_ (y, c_y) |
|
4160 |
SETWIN(aGLXWindowId) |
|
1932 | 4161 |
#ifdef OPENGL |
4162 |
#else |
|
528 | 4163 |
rpdr2i(c_x, c_y); |
1932 | 4164 |
#endif |
528 | 4165 |
%} |
4166 |
||
4167 |
"Modified: 19.3.1996 / 18:34:36 / cg" |
|
4168 |
! |
|
4169 |
||
4170 |
glxRpdr2sX: x y: y in: aGLXWindowId |
|
4171 |
"add another relative vertex to the polygon" |
|
4172 |
||
4173 |
%{ /* NOCONTEXT */ |
|
4174 |
Scoord c_x, c_y; |
|
4175 |
||
4176 |
_SCOORD_ (x, c_x) |
|
4177 |
_SCOORD_ (y, c_y) |
|
4178 |
SETWIN(aGLXWindowId) |
|
1932 | 4179 |
#ifdef OPENGL |
4180 |
#else |
|
528 | 4181 |
rpdr2s(c_x, c_y); |
1932 | 4182 |
#endif |
528 | 4183 |
%} |
4184 |
||
4185 |
"Modified: 19.3.1996 / 18:34:40 / cg" |
|
4186 |
! |
|
4187 |
||
4188 |
glxRpdrX: x y: y z: z in: aGLXWindowId |
|
4189 |
"add another relative vertex to the polygon" |
|
4190 |
||
4191 |
%{ /* NOCONTEXT */ |
|
4192 |
Coord c_x, c_y, c_z; |
|
4193 |
||
4194 |
_COORD_ (x, c_x) |
|
4195 |
_COORD_ (y, c_y) |
|
4196 |
_COORD_ (z, c_z) |
|
4197 |
SETWIN(aGLXWindowId) |
|
1932 | 4198 |
#ifdef OPENGL |
4199 |
#else |
|
528 | 4200 |
rpdr(c_x, c_y, c_z); |
1932 | 4201 |
#endif |
528 | 4202 |
%} |
4203 |
||
4204 |
"Modified: 19.3.1996 / 18:34:48 / cg" |
|
4205 |
! |
|
4206 |
||
4207 |
glxRpdriX: x y: y z: z in: aGLXWindowId |
|
4208 |
"add another relative vertex to the polygon" |
|
4209 |
||
4210 |
%{ /* NOCONTEXT */ |
|
4211 |
Icoord c_x, c_y, c_z; |
|
4212 |
||
4213 |
_ICOORD_ (x, c_x) |
|
4214 |
_ICOORD_ (y, c_y) |
|
4215 |
_ICOORD_ (z, c_z) |
|
4216 |
SETWIN(aGLXWindowId) |
|
1932 | 4217 |
#ifdef OPENGL |
4218 |
#else |
|
528 | 4219 |
rpdri(c_x, c_y, c_z); |
1932 | 4220 |
#endif |
528 | 4221 |
%} |
4222 |
||
4223 |
"Modified: 19.3.1996 / 18:34:51 / cg" |
|
4224 |
! |
|
4225 |
||
4226 |
glxRpdrsX: x y: y z: z in: aGLXWindowId |
|
4227 |
"add another relative vertex to the polygon" |
|
4228 |
||
4229 |
%{ /* NOCONTEXT */ |
|
4230 |
Scoord c_x, c_y, c_z; |
|
4231 |
||
4232 |
_SCOORD_ (x, c_x) |
|
4233 |
_SCOORD_ (y, c_y) |
|
4234 |
_SCOORD_ (z, c_z) |
|
4235 |
SETWIN(aGLXWindowId) |
|
1932 | 4236 |
#ifdef OPENGL |
4237 |
#else |
|
528 | 4238 |
rpdrs(c_x, c_y, c_z); |
1932 | 4239 |
#endif |
528 | 4240 |
%} |
4241 |
||
4242 |
"Modified: 19.3.1996 / 18:34:55 / cg" |
|
4243 |
! |
|
4244 |
||
4245 |
glxRpmv2X: x y: y in: aGLXWindowId |
|
4246 |
"set the start position of a polygon" |
|
4247 |
||
4248 |
%{ /* NOCONTEXT */ |
|
4249 |
Coord c_x, c_y; |
|
4250 |
||
4251 |
_COORD_ (x, c_x) |
|
4252 |
_COORD_ (y, c_y) |
|
4253 |
SETWIN(aGLXWindowId) |
|
1932 | 4254 |
#ifdef OPENGL |
4255 |
#else |
|
528 | 4256 |
rpmv2(c_x, c_y); |
1932 | 4257 |
#endif |
528 | 4258 |
%} |
4259 |
||
4260 |
"Modified: 19.3.1996 / 18:37:15 / cg" |
|
4261 |
! |
|
4262 |
||
4263 |
glxRpmv2iX: x y: y in: aGLXWindowId |
|
4264 |
"set the start position of a polygon" |
|
4265 |
||
4266 |
%{ /* NOCONTEXT */ |
|
4267 |
Icoord c_x, c_y; |
|
4268 |
||
4269 |
_ICOORD_ (x, c_x) |
|
4270 |
_ICOORD_ (y, c_y) |
|
4271 |
SETWIN(aGLXWindowId) |
|
1932 | 4272 |
#ifdef OPENGL |
4273 |
#else |
|
528 | 4274 |
rpmv2i(c_x, c_y); |
1932 | 4275 |
#endif |
528 | 4276 |
%} |
4277 |
||
4278 |
"Modified: 19.3.1996 / 18:37:20 / cg" |
|
4279 |
! |
|
4280 |
||
4281 |
glxRpmv2sX: x y: y in: aGLXWindowId |
|
4282 |
"set the relative start position of a polygon" |
|
4283 |
||
4284 |
%{ /* NOCONTEXT */ |
|
4285 |
Scoord c_x, c_y; |
|
4286 |
||
4287 |
_SCOORD_ (x, c_x) |
|
4288 |
_SCOORD_ (y, c_y) |
|
4289 |
SETWIN(aGLXWindowId) |
|
1932 | 4290 |
#ifdef OPENGL |
4291 |
#else |
|
528 | 4292 |
rpmv2s(c_x, c_y); |
1932 | 4293 |
#endif |
528 | 4294 |
%} |
4295 |
||
4296 |
"Modified: 19.3.1996 / 18:38:06 / cg" |
|
4297 |
! |
|
4298 |
||
4299 |
glxRpmvX: x y: y z: z in: aGLXWindowId |
|
4300 |
"set the relative start position of a polygon" |
|
4301 |
||
4302 |
%{ /* NOCONTEXT */ |
|
4303 |
Coord c_x, c_y, c_z; |
|
4304 |
||
4305 |
_COORD_ (x, c_x) |
|
4306 |
_COORD_ (y, c_y) |
|
4307 |
_COORD_ (z, c_z) |
|
4308 |
SETWIN(aGLXWindowId) |
|
1932 | 4309 |
#ifdef OPENGL |
4310 |
#else |
|
528 | 4311 |
rpmv(c_x, c_y, c_z); |
1932 | 4312 |
#endif |
528 | 4313 |
%} |
4314 |
||
4315 |
"Modified: 19.3.1996 / 18:38:03 / cg" |
|
4316 |
! |
|
4317 |
||
4318 |
glxRpmviX: x y: y z: z in: aGLXWindowId |
|
4319 |
"set the relative start position of a polygon" |
|
4320 |
||
4321 |
%{ /* NOCONTEXT */ |
|
4322 |
Icoord c_x, c_y, c_z; |
|
4323 |
||
4324 |
_ICOORD_ (x, c_x) |
|
4325 |
_ICOORD_ (y, c_y) |
|
4326 |
_ICOORD_ (z, c_z) |
|
4327 |
SETWIN(aGLXWindowId) |
|
1932 | 4328 |
#ifdef OPENGL |
4329 |
#else |
|
528 | 4330 |
rpmvi(c_x, c_y, c_z); |
1932 | 4331 |
#endif |
528 | 4332 |
%} |
4333 |
||
4334 |
"Modified: 19.3.1996 / 18:37:53 / cg" |
|
4335 |
! |
|
4336 |
||
4337 |
glxRpmvsX: x y: y z: z in: aGLXWindowId |
|
4338 |
"set the relative start position of a polygon" |
|
4339 |
||
4340 |
%{ /* NOCONTEXT */ |
|
4341 |
Scoord c_x, c_y, c_z; |
|
4342 |
||
4343 |
_SCOORD_ (x, c_x) |
|
4344 |
_SCOORD_ (y, c_y) |
|
4345 |
_SCOORD_ (z, c_z) |
|
4346 |
SETWIN(aGLXWindowId) |
|
1932 | 4347 |
#ifdef OPENGL |
4348 |
#else |
|
528 | 4349 |
rpmvs(c_x, c_y, c_z); |
1932 | 4350 |
#endif |
528 | 4351 |
%} |
4352 |
||
4353 |
"Modified: 19.3.1996 / 18:37:58 / cg" |
|
294 | 4354 |
! ! |
4355 |
||
24 | 4356 |
!GLXWorkstation methodsFor:'queries'! |
4357 |
||
159 | 4358 |
glVersion |
4359 |
"return a string describing the GL version. |
|
4360 |
For informative use only; portable applications do not depend |
|
4361 |
on the returned string." |
|
4362 |
||
4363 |
%{ /* NOCONTEXT */ |
|
4364 |
#ifdef VGL |
|
1065
fdc5b9059d82
removed all COMMA_CON / CON_COMMA uses
Claus Gittinger <cg@exept.de>
parents:
969
diff
changeset
|
4365 |
RETURN (__MKSTRING("vogl")); |
159 | 4366 |
#else |
1932 | 4367 |
# ifdef GLX |
159 | 4368 |
char buffer[128]; |
4369 |
||
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
4370 |
if (_INST(glOK) == true) { |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
4371 |
gversion(buffer); |
1065
fdc5b9059d82
removed all COMMA_CON / CON_COMMA uses
Claus Gittinger <cg@exept.de>
parents:
969
diff
changeset
|
4372 |
RETURN (__MKSTRING(buffer)); |
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
4373 |
} |
1932 | 4374 |
RETURN (nil); |
4375 |
# else |
|
4376 |
RETURN (nil); |
|
4377 |
# endif |
|
159 | 4378 |
#endif |
4379 |
%} |
|
4380 |
||
4381 |
" |
|
4718 | 4382 |
Display glVersion |
159 | 4383 |
" |
4384 |
! |
|
4385 |
||
528 | 4386 |
glxGetplanesIn: aGLXWindowId |
4387 |
"Returns the number if bit planes available on the device." |
|
4388 |
||
4389 |
%{ /* NOCONTEXT */ |
|
1932 | 4390 |
SETWIN(aGLXWindowId) |
4391 |
#ifdef OPENGL |
|
4392 |
#else |
|
528 | 4393 |
RETURN (__MKSMALLINT(getplanes())); |
4394 |
#endif |
|
1932 | 4395 |
%}. |
4396 |
^ 0 |
|
528 | 4397 |
|
4398 |
"Modified: 19.3.1996 / 18:50:44 / cg" |
|
4399 |
! |
|
4400 |
||
294 | 4401 |
hasStereoExtension |
4402 |
"return true, if this workstation supports stereo GL drawing. |
|
4403 |
Both the server must support it, and the feature must have been |
|
4404 |
enabled in the smalltalk system, for true to be returned." |
|
4405 |
||
4406 |
^ hasStereoExtension |
|
4407 |
||
4408 |
" |
|
4718 | 4409 |
Display hasStereoExtension |
294 | 4410 |
" |
4411 |
! |
|
4412 |
||
3214 | 4413 |
isOpenGL |
4414 |
"return true, if this is an openGL (as opposed to a GL)" |
|
4415 |
||
4416 |
%{ /* NOCONTEXT */ |
|
4417 |
#ifdef OPENGL |
|
4418 |
RETURN ( true ); |
|
4419 |
#else |
|
4420 |
RETURN ( false ); |
|
4421 |
#endif |
|
4422 |
%} |
|
4423 |
! |
|
4424 |
||
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4425 |
isTrueGL |
1932 | 4426 |
"return true, if this is a true GL (as opposed to a simulated VOGL). |
4427 |
Returns false for all openGL systems." |
|
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4428 |
|
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4429 |
%{ /* NOCONTEXT */ |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4430 |
#ifdef VGL |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4431 |
RETURN ( false ); |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4432 |
#else |
1932 | 4433 |
# ifdef GLX |
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4434 |
RETURN ( true ); |
1932 | 4435 |
# endif |
4436 |
#endif |
|
3214 | 4437 |
%}. |
4438 |
^ false |
|
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4439 |
! |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4440 |
|
294 | 4441 |
maxZValue |
4442 |
"return the max. Z value (only valid if z-buffer is supported)" |
|
4718 | 4443 |
%{ |
1932 | 4444 |
#ifndef OPENGL |
4445 |
# ifdef GD_ZMAX |
|
294 | 4446 |
long zMax; |
4447 |
||
4448 |
if (_INST(glOK) == true) { |
|
4449 |
zMax = getgdesc(GD_ZMAX); |
|
4450 |
||
4451 |
if ((zMax >= _MIN_INT) && (zMax <= _MAX_INT)) { |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
4452 |
RETURN ( __MKSMALLINT(zMax) ); |
294 | 4453 |
} |
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
4454 |
RETURN ( __MKLARGEINT(zMax) ); |
294 | 4455 |
} |
1932 | 4456 |
# endif |
294 | 4457 |
#endif |
4458 |
%}. |
|
4459 |
^ nil |
|
4460 |
! |
|
4461 |
||
4462 |
supportsDoubleBuffer |
|
4463 |
"return true, if this gl workstation supports double buffering. |
|
157 | 4464 |
For portable applications, always combine this with a query |
4465 |
if the display supports GL drawing at all." |
|
24 | 4466 |
|
4467 |
%{ /* NOCONTEXT */ |
|
294 | 4468 |
|
1932 | 4469 |
#ifndef OPENGL |
4470 |
# ifdef VGL |
|
4471 |
RETURN (true); |
|
4472 |
# else |
|
4473 |
# ifdef GD_BITS_NORM_DBL_RED |
|
294 | 4474 |
if (getgdesc(GD_BITS_NORM_DBL_RED) != 0) { |
4475 |
RETURN ( _INST(glOK) ); |
|
4476 |
} |
|
1932 | 4477 |
# endif |
4478 |
# endif |
|
24 | 4479 |
#endif |
89 | 4480 |
%}. |
4481 |
^ false |
|
4482 |
||
4483 |
" |
|
4718 | 4484 |
Display supportsDoubleBuffer |
294 | 4485 |
" |
4486 |
! |
|
4487 |
||
4488 |
supportsGLDrawing |
|
4489 |
"return true, if this device supports 3D GL drawing." |
|
4490 |
||
4491 |
^ glOK |
|
4492 |
||
4493 |
" |
|
4718 | 4494 |
Display supportsGLDrawing |
89 | 4495 |
" |
64 | 4496 |
! |
4497 |
||
4498 |
supportsLight |
|
157 | 4499 |
"return true, if this gl workstation supports light sources |
4500 |
(i.e. if its a real GL). |
|
4501 |
For portable applications, always combine this with a query |
|
4502 |
if the display supports GL drawing at all." |
|
89 | 4503 |
|
4504 |
%{ /* NOCONTEXT */ |
|
64 | 4505 |
#ifdef GLX |
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
4506 |
RETURN ( _INST(glOK) ); |
64 | 4507 |
#endif |
89 | 4508 |
%}. |
4509 |
^ false |
|
4510 |
||
4511 |
" |
|
4718 | 4512 |
Display supportsLight |
89 | 4513 |
" |
4514 |
! |
|
4515 |
||
294 | 4516 |
supportsRGB |
4517 |
"return true, if this gl workstation supports rgb |
|
4518 |
(in addition to indexed) colors. Actually, we return true |
|
4519 |
for a real GL engine, false for the simulator here. |
|
4520 |
For portable applications, always combine this with a query |
|
4521 |
if the display supports GL drawing at all." |
|
4522 |
||
4523 |
%{ /* NOCONTEXT */ |
|
4524 |
#ifdef GLX |
|
4525 |
RETURN ( _INST(glOK) ); |
|
4526 |
#endif |
|
4527 |
%}. |
|
4528 |
^ false |
|
4529 |
||
4530 |
" |
|
4718 | 4531 |
Display supportsRGB |
294 | 4532 |
" |
4533 |
! |
|
4534 |
||
89 | 4535 |
supportsTextures |
4536 |
"return true, if this gl workstation supports texture mapping |
|
157 | 4537 |
(i.e. if its a real GL). |
4538 |
For portable applications, always combine this with a query |
|
4539 |
if the display supports GL drawing at all." |
|
89 | 4540 |
|
4541 |
%{ /* NOCONTEXT */ |
|
1932 | 4542 |
#ifndef OPENGL |
4543 |
# ifdef GD_TEXTURE |
|
89 | 4544 |
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
|
4545 |
RETURN ( _INST(glOK) ); |
89 | 4546 |
} |
1932 | 4547 |
# endif |
89 | 4548 |
#endif |
4549 |
%}. |
|
4550 |
^ false |
|
4551 |
||
4552 |
" |
|
4718 | 4553 |
Display supportsTextures |
89 | 4554 |
" |
4555 |
! |
|
4556 |
||
4557 |
supportsZBuffer |
|
157 | 4558 |
"return true, if this gl workstation has z buffer support. |
4559 |
For portable applications, always combine this with a query |
|
4560 |
if the display supports GL drawing at all." |
|
4561 |
||
89 | 4562 |
%{ /* NOCONTEXT */ |
4563 |
||
1932 | 4564 |
#ifndef OPENGL |
4565 |
# ifdef GD_BITS_NORM_ZBUFFER |
|
89 | 4566 |
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
|
4567 |
RETURN ( _INST(glOK) ); |
89 | 4568 |
} |
1932 | 4569 |
# endif |
89 | 4570 |
#endif |
4571 |
%}. |
|
4572 |
^ false |
|
4573 |
||
4574 |
" |
|
4718 | 4575 |
Display supportsZBuffer |
89 | 4576 |
" |
294 | 4577 |
! ! |
4578 |
||
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4579 |
!GLXWorkstation methodsFor:'rectangles'! |
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 |
glxRectX1: 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) |
1932 | 4585 |
#ifdef OPENGL |
4586 |
#else |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4587 |
rect(_coordVal(x1), _coordVal(y1), _coordVal(x2), _coordVal(y2)); |
1932 | 4588 |
#endif |
537
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 |
! |
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 |
glxRectfX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4593 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4594 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4595 |
SETWIN(aGLXWindowId) |
1932 | 4596 |
#ifdef OPENGL |
4597 |
#else |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4598 |
rectf(_coordVal(x1), _coordVal(y1), _coordVal(x2), _coordVal(y2)); |
1932 | 4599 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4600 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4601 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4602 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4603 |
glxRectfiX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4604 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4605 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4606 |
SETWIN(aGLXWindowId) |
1932 | 4607 |
#ifdef OPENGL |
4608 |
#else |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4609 |
rectfi(_icoordVal(x1), _icoordVal(y1), _icoordVal(x2), _icoordVal(y2)); |
1932 | 4610 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4611 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4612 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4613 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4614 |
glxRectfsX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
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 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4617 |
SETWIN(aGLXWindowId) |
1932 | 4618 |
#ifdef OPENGL |
4619 |
#else |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4620 |
rectfs(_scoordVal(x1), _scoordVal(y1), _scoordVal(x2), _scoordVal(y2)); |
1932 | 4621 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4622 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4623 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4624 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4625 |
glxRectiX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4626 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4627 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4628 |
SETWIN(aGLXWindowId) |
1932 | 4629 |
#ifdef OPENGL |
4630 |
#else |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4631 |
recti(_icoordVal(x1), _icoordVal(y1), _icoordVal(x2), _icoordVal(y2)); |
1932 | 4632 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4633 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4634 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4635 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4636 |
glxRectsX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4637 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4638 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4639 |
SETWIN(aGLXWindowId) |
1932 | 4640 |
#ifdef OPENGL |
4641 |
#else |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4642 |
rects(_scoordVal(x1), _scoordVal(y1), _scoordVal(x2), _scoordVal(y2)); |
1932 | 4643 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4644 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4645 |
! ! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4646 |
|
528 | 4647 |
!GLXWorkstation methodsFor:'spheres'! |
294 | 4648 |
|
4649 |
glxSphDraw:arrayOf4Floats in:aGLXWindowId |
|
4650 |
"argument must be an array(a matrix) of 4 floats containing the |
|
4651 |
sphere - in real GL only" |
|
4652 |
||
4653 |
%{ /* NOCONTEXT */ |
|
4654 |
#ifdef GLX |
|
4655 |
float vec[4], *v; |
|
4656 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4657 |
if (! (v = __glx_getFloatsFromInto(arrayOf4Floats, vec, 4))) RETURN(false); |
294 | 4658 |
SETWIN(aGLXWindowId) |
4659 |
sphdraw(v); |
|
1932 | 4660 |
#endif |
4661 |
%} |
|
294 | 4662 |
! |
4663 |
||
4664 |
glxSphDrawX:x y:y z:z radius:r in:aGLXWindowId |
|
4665 |
"arguments must be convertable to floats - in real GL only" |
|
4666 |
||
4667 |
%{ /* NOCONTEXT */ |
|
4668 |
#ifdef GLX |
|
4669 |
float vec[4]; |
|
4670 |
||
4671 |
_FLOAT_(x, vec[0]) |
|
4672 |
_FLOAT_(y, vec[1]) |
|
4673 |
_FLOAT_(z, vec[2]) |
|
4674 |
_FLOAT_(r, vec[3]) |
|
4675 |
SETWIN(aGLXWindowId) |
|
4676 |
sphdraw(vec); |
|
1932 | 4677 |
#endif |
4678 |
%} |
|
294 | 4679 |
! |
4680 |
||
4681 |
glxSphfreeIn: aGLXWindowId |
|
4682 |
||
4683 |
%{ /* NOCONTEXT */ |
|
4684 |
#ifdef GLX |
|
4685 |
SETWIN(aGLXWindowId) |
|
4686 |
sphfree(); |
|
1932 | 4687 |
#endif |
4688 |
%} |
|
294 | 4689 |
! |
4690 |
||
4691 |
glxSphgnpolysIn: aGLXWindowId |
|
4692 |
||
4693 |
%{ /* NOCONTEXT */ |
|
4694 |
#ifdef GLX |
|
4695 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
4696 |
RETURN (__MKSMALLINT(sphgnpolys())); |
294 | 4697 |
#endif |
4698 |
%} |
|
4699 |
! |
|
4700 |
||
4701 |
glxSphmode: attribute value: value in: aGLXWindowId |
|
4702 |
||
4703 |
%{ /* NOCONTEXT */ |
|
4704 |
#ifdef GLX |
|
4705 |
SETWIN(aGLXWindowId) |
|
4706 |
sphmode(__intVal(attribute), __intVal(value)); |
|
1932 | 4707 |
#endif |
4708 |
%} |
|
294 | 4709 |
! |
4710 |
||
4711 |
glxSphobj: objid in: aGLXWindowId |
|
4712 |
||
4713 |
%{ /* NOCONTEXT */ |
|
4714 |
#ifdef GLX |
|
4715 |
SETWIN(aGLXWindowId) |
|
4716 |
sphobj(_objectVal(objid)); |
|
1932 | 4717 |
#endif |
4718 |
%} |
|
294 | 4719 |
! |
4720 |
||
4721 |
glxSphrotmatrix: mat in: aGLXWindowId |
|
4722 |
||
4723 |
%{ /* NOCONTEXT */ |
|
4724 |
#ifdef GLX |
|
4725 |
Matrix matrix, *m; |
|
4726 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4727 |
if (! (m = __glx_getFloatsFromMatrixInto(mat, &matrix))) RETURN (false); |
294 | 4728 |
SETWIN(aGLXWindowId) |
4729 |
sphrotmatrix(*m); |
|
1932 | 4730 |
#endif |
4731 |
%} |
|
294 | 4732 |
! ! |
4733 |
||
4734 |
!GLXWorkstation methodsFor:'stereo extension'! |
|
4735 |
||
528 | 4736 |
glxLeftbuffer: bool in: aGLXWindowId |
4737 |
||
4738 |
%{ /* NOCONTEXT */ |
|
4739 |
#ifdef FULL_GLX |
|
4740 |
SETWIN(aGLXWindowId) |
|
4741 |
leftbuffer(_booleanVal(bool)); |
|
1932 | 4742 |
#endif |
4743 |
%} |
|
528 | 4744 |
! |
4745 |
||
4746 |
glxMonobufferIn: aGLXWindowId |
|
4747 |
||
4748 |
%{ /* NOCONTEXT */ |
|
4749 |
#ifdef FULL_GLX |
|
4750 |
SETWIN(aGLXWindowId) |
|
4751 |
monobuffer(); |
|
1932 | 4752 |
#endif |
4753 |
%} |
|
528 | 4754 |
! |
4755 |
||
4756 |
glxRightbuffer: bool in: aGLXWindowId |
|
4757 |
||
4758 |
%{ /* NOCONTEXT */ |
|
4759 |
#ifdef FULL_GLX |
|
4760 |
SETWIN(aGLXWindowId) |
|
4761 |
rightbuffer(_booleanVal(bool)); |
|
1932 | 4762 |
#endif |
4763 |
%} |
|
528 | 4764 |
! |
4765 |
||
294 | 4766 |
stereoExtensionBuffer:aBufferSymbol for:aWindowId |
4767 |
"set the current stereo buffer; the argument may be one of: |
|
4768 |
#left -> STEREO_BUFFER_LEFT |
|
4769 |
#right -> STEREO_BUFFER_RIGHT |
|
4770 |
" |
|
4771 |
||
4772 |
%{ /* NOCONTEXT */ |
|
4773 |
#if defined(XSGIStereo) && defined(GLX) |
|
4774 |
Status status; |
|
4775 |
int buffer; |
|
4776 |
Window win; |
|
4777 |
||
4718 | 4778 |
if (ISCONNECTED |
294 | 4779 |
&& __isExternalAddress(aWindowId)) { |
4780 |
win = _WindowVal(aWindowId); |
|
4781 |
if (aBufferSymbol == @symbol(left)) { |
|
4782 |
buffer = STEREO_BUFFER_LEFT; |
|
4783 |
} else { |
|
4784 |
if (aBufferSymbol == @symbol(right)) { |
|
4785 |
buffer = STEREO_BUFFER_RIGHT; |
|
4786 |
} else { |
|
4787 |
goto bad; |
|
4788 |
} |
|
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
4789 |
} |
294 | 4790 |
status = XSGISetStereoBuffer(myDpy, win, buffer); |
4791 |
RETURN ( status ? true : false); |
|
4792 |
} |
|
4793 |
bad: ; |
|
4794 |
#endif |
|
4795 |
%}. |
|
4796 |
self primitiveFailed |
|
4797 |
||
4798 |
" |
|
4799 |
|t v| |
|
4800 |
||
4801 |
t := StandardSystemView new. |
|
4802 |
t extent:300@300. |
|
4803 |
v := GLXView origin:0.0@0.0 corner:1.0@1.0 in:t. |
|
4804 |
t openAndWait. |
|
4805 |
||
4718 | 4806 |
v device stereoExtensionBuffer:#left for:(v id). |
294 | 4807 |
(Delay forSeconds:10) wait. |
4718 | 4808 |
v device stereoExtensionBuffer:#right for:(v id). |
294 | 4809 |
" |
4810 |
! |
|
4811 |
||
4812 |
stereoExtensionMode:aModeSymbol height:h offset:o for:aWindowId |
|
4813 |
"set the current stereo mode; the argument may be one of: |
|
4814 |
nil/false #off -> turn it off |
|
4815 |
#bottom -> STEREO_BOTTOM |
|
4816 |
#top -> STEREO_TOP |
|
4817 |
" |
|
4818 |
||
4819 |
%{ /* NOCONTEXT */ |
|
4820 |
#if defined(XSGIStereo) && defined(GLX) |
|
4821 |
Status status; |
|
4822 |
int mode; |
|
4823 |
unsigned short us_h, us_o; |
|
4824 |
Window win; |
|
4825 |
||
4718 | 4826 |
if (ISCONNECTED |
294 | 4827 |
&& __bothSmallInteger(h, o) |
4828 |
&& __isExternalAddress(aWindowId)) { |
|
4829 |
win = _WindowVal(aWindowId); |
|
4830 |
if ((aModeSymbol == nil) |
|
4831 |
|| (aModeSymbol == false) |
|
4832 |
|| (aModeSymbol == @symbol(off))) { |
|
4833 |
mode = STEREO_OFF; |
|
4834 |
} else { |
|
4835 |
if (aModeSymbol == @symbol(bottom)) { |
|
4836 |
mode = STEREO_BOTTOM; |
|
4837 |
} else { |
|
4838 |
if (aModeSymbol == @symbol(top)) { |
|
4839 |
mode = STEREO_TOP; |
|
4840 |
} else { |
|
4841 |
goto bad; |
|
4842 |
} |
|
4843 |
} |
|
4844 |
} |
|
4845 |
us_h = __intVal(h); |
|
4846 |
us_o = __intVal(o); |
|
4847 |
status = XSGISetStereoMode(myDpy, win, us_h, us_o, mode); |
|
4848 |
RETURN ( status ? true : false); |
|
4849 |
} |
|
4850 |
bad: ; |
|
4851 |
#endif |
|
4852 |
%}. |
|
4853 |
self primitiveFailed |
|
4854 |
||
4855 |
" |
|
4718 | 4856 |
Display stereoExtensionMode:#top height:492 offset:532 for:(Display rootWindowId). |
294 | 4857 |
(Delay forSeconds:10) wait. |
4718 | 4858 |
Display stereoExtensionMode:#off height:0 offset:0 for:(Display rootWindowId). |
294 | 4859 |
" |
4860 |
! |
|
4861 |
||
4862 |
stereoExtensionModeIn:aWindowId |
|
4863 |
"return the current stereo mode for some window" |
|
4864 |
||
4865 |
%{ /* NOCONTEXT */ |
|
4866 |
#if defined(XSGIStereo) && defined(GLX) |
|
4867 |
int mode; |
|
4868 |
Window win; |
|
4869 |
||
4870 |
if (ISCONNECTED && __isExternalAddress(aWindowId)) { |
|
4871 |
win = _WindowVal(aWindowId); |
|
4872 |
mode = XSGIQueryStereoMode(myDpy, win); |
|
4873 |
switch (mode) { |
|
4874 |
case STEREO_OFF: |
|
4875 |
RETURN ( @symbol(off) ); |
|
4876 |
case STEREO_BOTTOM: |
|
4877 |
RETURN ( @symbol(bottom) ); |
|
4878 |
case STEREO_TOP: |
|
4879 |
RETURN ( @symbol(top) ); |
|
4880 |
} |
|
4881 |
RETURN ( @symbol(unsupported) ); |
|
4882 |
} |
|
4883 |
#endif |
|
4884 |
%}. |
|
4885 |
self primitiveFailed |
|
4886 |
||
4887 |
" |
|
4888 |
|v| |
|
4889 |
||
4890 |
v := StandardSystemView new. |
|
4891 |
v extent:300@300. |
|
4892 |
v openAndWait. |
|
4893 |
v device stereoExtensionModeIn:(v id) |
|
4894 |
||
4718 | 4895 |
Display stereoExtensionModeIn:Display rootWindowId |
294 | 4896 |
" |
4897 |
! |
|
4898 |
||
4899 |
stereoExtensionVersion |
|
4900 |
"return the stereo extensions version as an array consisting of |
|
4901 |
major and minor numbers." |
|
4902 |
||
4903 |
%{ /* NOCONTEXT */ |
|
4904 |
#if defined(XSGIStereo) && defined(GLX) |
|
4905 |
Status status; |
|
4906 |
Display *dpy = myDpy; |
|
4907 |
int major, minor; |
|
4908 |
||
4909 |
if (ISCONNECTED) { |
|
4910 |
status = XSGIStereoQueryVersion(myDpy, &major, &minor); |
|
4911 |
if (status == True) { |
|
4912 |
RETURN ( __ARRAY_WITH2(__MKSMALLINT(major), __MKSMALLINT(minor))); |
|
4913 |
} |
|
89 | 4914 |
} |
4915 |
#endif |
|
4916 |
%}. |
|
294 | 4917 |
self primitiveFailed |
185 | 4918 |
|
4919 |
" |
|
294 | 4920 |
Display stereoExtensionVersion |
185 | 4921 |
" |
24 | 4922 |
! ! |
4923 |
||
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4924 |
!GLXWorkstation methodsFor:'texture data transfer'! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4925 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4926 |
glxT2d: v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4927 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4928 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4929 |
#ifdef GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4930 |
double vec[2], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4931 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4932 |
if (! (c_v = __glx_getDoublesFromInto(v, vec, 2))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4933 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4934 |
t2d(c_v); |
1932 | 4935 |
#endif |
4936 |
%} |
|
537
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 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4939 |
glxT2f: v in: aGLXWindowId |
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 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4942 |
#ifdef GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4943 |
float vec[2], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4944 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4945 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 2))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4946 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4947 |
t2f(c_v); |
1932 | 4948 |
#endif |
4949 |
%} |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4950 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4951 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4952 |
glxT2i: v in: aGLXWindowId |
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 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4955 |
#ifdef GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4956 |
long vec[2], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4957 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4958 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 2))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4959 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4960 |
t2i(c_v); |
1932 | 4961 |
#endif |
4962 |
%} |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4963 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4964 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4965 |
glxT2s: v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4966 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4967 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4968 |
#ifdef GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4969 |
short vec[2], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4970 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4971 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 2))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4972 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4973 |
t2s(c_v); |
1932 | 4974 |
#endif |
4975 |
%} |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4976 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4977 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4978 |
glxT3d:v in:aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4979 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4980 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4981 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4982 |
double vec[3], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4983 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4984 |
if (! (c_v = __glx_getDoublesFromInto(v, vec, 3))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4985 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4986 |
t3d(c_v); |
1932 | 4987 |
#endif |
4988 |
%} |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4989 |
! |
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 |
glxT3f:v in:aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4992 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4993 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4994 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4995 |
float vec[3], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4996 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4997 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 3))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4998 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4999 |
t3f(c_v); |
1932 | 5000 |
#endif |
5001 |
%} |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5002 |
! |
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 |
glxT3i:v in:aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5005 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5006 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5007 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5008 |
long vec[3], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5009 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5010 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 3))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5011 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5012 |
t3i(c_v); |
1932 | 5013 |
#endif |
5014 |
%} |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5015 |
! |
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 |
glxT3s:v in:aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5018 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5019 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5020 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5021 |
short vec[3], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5022 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5023 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 3))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5024 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5025 |
t3s(c_v); |
1932 | 5026 |
#endif |
5027 |
%} |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5028 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5029 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5030 |
glxT4d: v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5031 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5032 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5033 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5034 |
double vec[4], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5035 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5036 |
if (! (c_v = __glx_getDoublesFromInto(v, vec, 4))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5037 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5038 |
t4d(c_v); |
1932 | 5039 |
#endif |
5040 |
%} |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5041 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5042 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5043 |
glxT4f: v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5044 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5045 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5046 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5047 |
float vec[4], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5048 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5049 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 4))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5050 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5051 |
t4f(c_v); |
1932 | 5052 |
#endif |
5053 |
%} |
|
537
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 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5056 |
glxT4i: v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5057 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5058 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5059 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5060 |
long vec[4], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5061 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5062 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 4))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5063 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5064 |
t4i(c_v); |
1932 | 5065 |
#endif |
5066 |
%} |
|
537
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 |
glxT4s: 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 |
short 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_getShortsFromInto(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 |
t4s(c_v); |
1932 | 5078 |
#endif |
5079 |
%} |
|
537
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 |
|
294 | 5082 |
!GLXWorkstation methodsFor:'transformations'! |
5083 |
||
5084 |
glxRotate:angle axis:axis in:aGLXWindowId |
|
5085 |
"rotate the current matrix around the axis given by the axis arg, |
|
5086 |
which must be one of the symbols: #x, #y or #z. |
|
5087 |
The angle is in degrees." |
|
5088 |
||
5089 |
%{ /* NOCONTEXT */ |
|
5090 |
||
5091 |
char c_axis; |
|
5092 |
||
5093 |
if (axis == @symbol(x)) |
|
5094 |
c_axis = 'x'; |
|
5095 |
else if (axis == @symbol(y)) |
|
5096 |
c_axis = 'y'; |
|
5097 |
else if (axis == @symbol(z)) |
|
5098 |
c_axis = 'z'; |
|
5099 |
else { |
|
5100 |
RETURN (false); |
|
5101 |
} |
|
5102 |
||
5103 |
SETWIN(aGLXWindowId) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5104 |
RETURN ( __glx_doRotate(angle, c_axis) ); |
294 | 5105 |
%} |
5106 |
! |
|
5107 |
||
5108 |
glxRotate:arrayOf3Floats in:aGLXWindowId |
|
5109 |
"rotate current matrix, given a 3-element vector (or more). |
|
5110 |
The elements of the array are degrees." |
|
5111 |
||
5112 |
%{ /* NOCONTEXT */ |
|
5113 |
||
5114 |
float vec[3], *v; |
|
5115 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5116 |
if (! (v = __glx_getFloatsFromInto(arrayOf3Floats, vec, 3))) RETURN(false); |
294 | 5117 |
|
5118 |
SETWIN(aGLXWindowId) |
|
1932 | 5119 |
#ifdef OPENGL |
5120 |
#else |
|
294 | 5121 |
rot(v[0], 'x'); |
5122 |
rot(v[1], 'y'); |
|
5123 |
rot(v[2], 'z'); |
|
1932 | 5124 |
#endif |
294 | 5125 |
%} |
5126 |
! |
|
5127 |
||
5128 |
glxRotateI:angle axis:axis in:aGLXWindowId |
|
5129 |
"rotate the current matrix around the axis given by the axis arg, |
|
5130 |
which must be one of the symbols: #x, #y or #z. |
|
5131 |
The angle is an integer specifying tenths of a degree." |
|
5132 |
||
5133 |
%{ /* NOCONTEXT */ |
|
5134 |
||
5135 |
char c_axis; |
|
5136 |
||
5137 |
if (axis == @symbol(x)) |
|
5138 |
c_axis = 'x'; |
|
5139 |
else if (axis == @symbol(y)) |
|
5140 |
c_axis = 'y'; |
|
5141 |
else if (axis == @symbol(z)) |
|
5142 |
c_axis = 'z'; |
|
5143 |
else { |
|
5144 |
RETURN (false); |
|
5145 |
} |
|
5146 |
||
5147 |
if (__isSmallInteger(angle)) { |
|
5148 |
SETWIN(aGLXWindowId) |
|
1932 | 5149 |
#ifdef OPENGL |
5150 |
#else |
|
294 | 5151 |
rotate(__intVal(angle), c_axis); |
1932 | 5152 |
#endif |
294 | 5153 |
} |
5154 |
%} |
|
5155 |
! |
|
5156 |
||
5157 |
glxRotateIX:angle in:aGLXWindowId |
|
5158 |
"rotate the current matrix on x axis. |
|
5159 |
The angle is an integer specifying tenths of a degree." |
|
5160 |
||
5161 |
%{ /* NOCONTEXT */ |
|
5162 |
||
5163 |
if (__isSmallInteger(angle)) { |
|
5164 |
SETWIN(aGLXWindowId) |
|
1932 | 5165 |
#ifdef OPENGL |
5166 |
#else |
|
294 | 5167 |
rotate(__intVal(angle), 'x'); |
1932 | 5168 |
#endif |
294 | 5169 |
} |
5170 |
%} |
|
5171 |
! |
|
5172 |
||
5173 |
glxRotateIX:xAngle y:yAngle z:zAngle in:aGLXWindowId |
|
5174 |
"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
|
5175 |
The values are smallIntegers specifying tenths of a degree." |
294 | 5176 |
|
5177 |
%{ /* NOCONTEXT */ |
|
5178 |
||
5179 |
if (__bothSmallInteger(xAngle, yAngle) |
|
5180 |
&& __isSmallInteger(zAngle)) { |
|
5181 |
SETWIN(aGLXWindowId) |
|
1932 | 5182 |
#ifdef OPENGL |
5183 |
#else |
|
294 | 5184 |
rotate(__intVal(xAngle), 'x'); |
5185 |
rotate(__intVal(yAngle), 'y'); |
|
5186 |
rotate(__intVal(zAngle), 'z'); |
|
1932 | 5187 |
#endif |
294 | 5188 |
} |
5189 |
%} |
|
5190 |
! |
|
5191 |
||
5192 |
glxRotateIY:angle in:aGLXWindowId |
|
5193 |
"rotate the current matrix on x axis. |
|
5194 |
The angle is an integer specifying tenths of a degree." |
|
5195 |
||
5196 |
%{ /* NOCONTEXT */ |
|
5197 |
||
5198 |
if (__isSmallInteger(angle)) { |
|
5199 |
SETWIN(aGLXWindowId) |
|
1932 | 5200 |
#ifdef OPENGL |
5201 |
#else |
|
294 | 5202 |
rotate(__intVal(angle), 'y'); |
1932 | 5203 |
#endif |
294 | 5204 |
} |
5205 |
%} |
|
5206 |
! |
|
5207 |
||
5208 |
glxRotateIZ:angle in:aGLXWindowId |
|
5209 |
"rotate the current matrix on x axis. |
|
5210 |
The angle is an integer specifying tenths of a degree." |
|
5211 |
||
5212 |
%{ /* NOCONTEXT */ |
|
5213 |
||
5214 |
if (__isSmallInteger(angle)) { |
|
5215 |
SETWIN(aGLXWindowId) |
|
1932 | 5216 |
#ifdef OPENGL |
5217 |
#else |
|
294 | 5218 |
rotate(__intVal(angle), 'z'); |
1932 | 5219 |
#endif |
294 | 5220 |
} |
5221 |
%} |
|
5222 |
! |
|
5223 |
||
5224 |
glxRotateX:angle in:aGLXWindowId |
|
5225 |
"rotate the current matrix on x axis. |
|
5226 |
The angle is in degrees." |
|
5227 |
||
5228 |
%{ /* NOCONTEXT */ |
|
5229 |
||
5230 |
SETWIN(aGLXWindowId) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5231 |
RETURN (__glx_doRotate(angle, 'x')); |
294 | 5232 |
%} |
5233 |
! |
|
5234 |
||
5235 |
glxRotateX:xAngle y:yAngle z:zAngle in:aGLXWindowId |
|
5236 |
"rotate the current matrix on all axes, given individual x, y and z values. |
|
5237 |
The values are in degrees" |
|
5238 |
||
5239 |
%{ /* NOCONTEXT */ |
|
5240 |
||
5241 |
SETWIN(aGLXWindowId) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5242 |
if ( __glx_doRotate(xAngle, 'x') == true) { |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5243 |
if ( __glx_doRotate(yAngle, 'y') == true) { |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5244 |
RETURN (__glx_doRotate(zAngle, 'z')); |
294 | 5245 |
} |
5246 |
} |
|
5247 |
%} |
|
5248 |
! |
|
5249 |
||
5250 |
glxRotateY:angle in:aGLXWindowId |
|
5251 |
"rotate the current matrix on y axis. |
|
5252 |
The angle is in degrees." |
|
5253 |
||
5254 |
%{ /* NOCONTEXT */ |
|
5255 |
||
5256 |
SETWIN(aGLXWindowId) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5257 |
RETURN (__glx_doRotate(angle, 'y')); |
294 | 5258 |
%} |
5259 |
! |
|
5260 |
||
5261 |
glxRotateZ:angle in:aGLXWindowId |
|
5262 |
"rotate the current matrix on z axis. |
|
5263 |
The angle is in degrees." |
|
5264 |
||
5265 |
%{ /* NOCONTEXT */ |
|
5266 |
||
5267 |
SETWIN(aGLXWindowId) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5268 |
RETURN (__glx_doRotate(angle, 'z')); |
294 | 5269 |
%} |
5270 |
! |
|
5271 |
||
5272 |
glxScale:arrayOf3Floats in:aGLXWindowId |
|
5273 |
"scale current matrix, given a 3-element vector" |
|
5274 |
||
5275 |
%{ /* NOCONTEXT */ |
|
5276 |
||
5277 |
float vec[3], *v; |
|
5278 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5279 |
if (! (v = __glx_getFloatsFromInto(arrayOf3Floats, vec, 3))) RETURN(false); |
294 | 5280 |
|
5281 |
SETWIN(aGLXWindowId) |
|
1932 | 5282 |
#ifdef OPENGL |
5283 |
#else |
|
294 | 5284 |
scale(v[0], v[1], v[2]); |
1932 | 5285 |
#endif |
294 | 5286 |
%} |
5287 |
! |
|
5288 |
||
5289 |
glxScaleX:x in:aGLXWindowId |
|
5290 |
"scale in x direction" |
|
5291 |
||
5292 |
%{ /* NOCONTEXT */ |
|
5293 |
||
5294 |
float f_x; |
|
5295 |
||
5296 |
_FLOAT_ (x, f_x) |
|
5297 |
SETWIN(aGLXWindowId) |
|
1932 | 5298 |
#ifdef OPENGL |
5299 |
#else |
|
294 | 5300 |
scale(f_x, (float)0, (float)0); |
1932 | 5301 |
#endif |
294 | 5302 |
%} |
5303 |
! |
|
5304 |
||
5305 |
glxScaleX:x y:y z:z in:aGLXWindowId |
|
5306 |
"scale & mirror current matrix, given individual x, y and z values" |
|
5307 |
||
5308 |
%{ /* NOCONTEXT */ |
|
5309 |
||
5310 |
float f_x, f_y, f_z; |
|
5311 |
||
5312 |
_FLOAT_ (x, f_x) |
|
5313 |
_FLOAT_ (y, f_y) |
|
5314 |
_FLOAT_ (z, f_z) |
|
5315 |
SETWIN(aGLXWindowId) |
|
1932 | 5316 |
#ifdef OPENGL |
5317 |
#else |
|
294 | 5318 |
scale(f_x, f_y, f_z); |
1932 | 5319 |
#endif |
294 | 5320 |
%} |
5321 |
! |
|
5322 |
||
5323 |
glxScaleY:y in:aGLXWindowId |
|
5324 |
"scale in y direction" |
|
5325 |
||
5326 |
%{ /* NOCONTEXT */ |
|
5327 |
||
5328 |
float f_y; |
|
5329 |
||
5330 |
_FLOAT_ (y, f_y) |
|
5331 |
SETWIN(aGLXWindowId) |
|
1932 | 5332 |
#ifdef OPENGL |
5333 |
#else |
|
294 | 5334 |
scale((float)0, f_y, (float)0); |
1932 | 5335 |
#endif |
294 | 5336 |
%} |
5337 |
! |
|
5338 |
||
5339 |
glxScaleZ:z in:aGLXWindowId |
|
5340 |
"scale in z direction" |
|
5341 |
||
5342 |
%{ /* NOCONTEXT */ |
|
5343 |
||
5344 |
float f_z; |
|
5345 |
||
5346 |
_FLOAT_ (z, f_z) |
|
5347 |
SETWIN(aGLXWindowId) |
|
1932 | 5348 |
#ifdef OPENGL |
5349 |
#else |
|
294 | 5350 |
scale((float)0, (float)0, f_z); |
1932 | 5351 |
#endif |
294 | 5352 |
%} |
5353 |
! |
|
5354 |
||
5355 |
glxTranslate:arrayOf3Floats in:aGLXWindowId |
|
5356 |
"translate current matrix, given a 3-element vector" |
|
5357 |
||
5358 |
%{ /* NOCONTEXT */ |
|
5359 |
||
5360 |
float vec[3], *v; |
|
5361 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5362 |
if (! (v = __glx_getFloatsFromInto(arrayOf3Floats, vec, 3))) RETURN(false); |
294 | 5363 |
|
5364 |
SETWIN(aGLXWindowId) |
|
1932 | 5365 |
#ifdef OPENGL |
5366 |
#else |
|
294 | 5367 |
translate((Coord)(v[0]), (Coord)(v[1]), (Coord)(v[2])); |
1932 | 5368 |
#endif |
294 | 5369 |
%} |
5370 |
! |
|
5371 |
||
5372 |
glxTranslateX:x in:aGLXWindowId |
|
5373 |
"translate current matrix on X axis" |
|
5374 |
||
5375 |
%{ /* NOCONTEXT */ |
|
5376 |
||
5377 |
Coord c_x; |
|
5378 |
||
5379 |
_COORD_ (x, c_x) |
|
5380 |
SETWIN(aGLXWindowId) |
|
1932 | 5381 |
#ifdef OPENGL |
5382 |
#else |
|
294 | 5383 |
translate(c_x, (Coord)0, (Coord)0); |
1932 | 5384 |
#endif |
294 | 5385 |
%} |
5386 |
! |
|
5387 |
||
5388 |
glxTranslateX:x y:y z:z in:aGLXWindowId |
|
5389 |
"translate current matrix, given individual x, y and z values" |
|
5390 |
||
5391 |
%{ /* NOCONTEXT */ |
|
5392 |
||
5393 |
Coord c_x, c_y, c_z; |
|
5394 |
||
5395 |
_COORD_ (x, c_x) |
|
5396 |
_COORD_ (y, c_y) |
|
5397 |
_COORD_ (z, c_z) |
|
5398 |
SETWIN(aGLXWindowId) |
|
1932 | 5399 |
#ifdef OPENGL |
5400 |
#else |
|
294 | 5401 |
translate(c_x, c_y, c_z); |
1932 | 5402 |
#endif |
294 | 5403 |
%} |
5404 |
! |
|
5405 |
||
5406 |
glxTranslateY:y in:aGLXWindowId |
|
5407 |
"translate current matrix on Y axis" |
|
5408 |
||
5409 |
%{ /* NOCONTEXT */ |
|
5410 |
||
5411 |
Coord c_y; |
|
5412 |
||
5413 |
_COORD_ (y, c_y) |
|
5414 |
SETWIN(aGLXWindowId) |
|
1932 | 5415 |
#ifdef OPENGL |
5416 |
#else |
|
294 | 5417 |
translate((Coord)0, c_y, (Coord)0); |
1932 | 5418 |
#endif |
294 | 5419 |
%} |
5420 |
! |
|
5421 |
||
5422 |
glxTranslateZ:z in:aGLXWindowId |
|
5423 |
"translate current matrix on Z axis" |
|
5424 |
||
5425 |
%{ /* NOCONTEXT */ |
|
5426 |
||
5427 |
Coord c_z; |
|
5428 |
||
5429 |
_COORD_ (z, c_z) |
|
5430 |
SETWIN(aGLXWindowId) |
|
1932 | 5431 |
#ifdef OPENGL |
5432 |
#else |
|
294 | 5433 |
translate((Coord)0, (Coord)0, c_z); |
1932 | 5434 |
#endif |
294 | 5435 |
%} |
5436 |
! ! |
|
5437 |
||
5438 |
!GLXWorkstation methodsFor:'unspecified rest'! |
|
5439 |
||
5440 |
glxAcbufOp:op value:value in:aGLXWindowId |
|
5441 |
||
5442 |
%{ /* NOCONTEXT */ |
|
1932 | 5443 |
SETWIN(aGLXWindowId) |
5444 |
#ifdef GLX |
|
294 | 5445 |
acbuf(__intVal(op), _floatVal(value)); |
1932 | 5446 |
#endif |
5447 |
%} |
|
294 | 5448 |
! |
5449 |
||
5450 |
glxAcsizePlanes: planes in: aGLXWindowId |
|
5451 |
||
5452 |
%{ /* NOCONTEXT */ |
|
1932 | 5453 |
SETWIN(aGLXWindowId) |
5454 |
#ifdef GLX |
|
294 | 5455 |
acsize(__intVal(planes)); |
1932 | 5456 |
#endif |
5457 |
%} |
|
294 | 5458 |
! |
5459 |
||
5460 |
glxAfunctionRef: ref func: func in: aGLXWindowId |
|
5461 |
||
5462 |
%{ /* NOCONTEXT */ |
|
1932 | 5463 |
SETWIN(aGLXWindowId) |
5464 |
#ifdef GLX |
|
294 | 5465 |
afunction(__intVal(ref), __intVal(func)); |
1932 | 5466 |
#endif |
5467 |
%} |
|
294 | 5468 |
! |
5469 |
||
5470 |
glxBbox2Xmin: xmin ymin: ymin x1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
5471 |
||
5472 |
%{ /* NOCONTEXT */ |
|
5473 |
Screencoord c_xmin, c_ymin; |
|
4718 | 5474 |
Coord c_x1, c_y1, c_x2, c_y2; |
294 | 5475 |
|
5476 |
_SCREENCOORD_ (xmin, c_xmin) |
|
5477 |
_SCREENCOORD_ (ymin, c_ymin) |
|
5478 |
_COORD_ (x1, c_x1) |
|
5479 |
_COORD_ (y1, c_y1) |
|
5480 |
_COORD_ (x2, c_x2) |
|
5481 |
_COORD_ (y2, c_y2) |
|
5482 |
SETWIN(aGLXWindowId) |
|
1932 | 5483 |
#ifdef GLX |
294 | 5484 |
bbox2(c_xmin, c_ymin, c_x1, c_y1, c_x2, c_y2); |
1932 | 5485 |
#endif |
5486 |
%} |
|
294 | 5487 |
! |
5488 |
||
5489 |
glxBbox2iXmin: xmin ymin: ymin x1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
5490 |
||
5491 |
%{ /* NOCONTEXT */ |
|
5492 |
Screencoord c_xmin, c_ymin; |
|
4718 | 5493 |
Icoord c_x1, c_y1, c_x2, c_y2; |
294 | 5494 |
|
5495 |
_SCREENCOORD_ (xmin, c_xmin) |
|
5496 |
_SCREENCOORD_ (ymin, c_ymin) |
|
5497 |
_ICOORD_ (x1, c_x1) |
|
5498 |
_ICOORD_ (y1, c_y1) |
|
5499 |
_ICOORD_ (x2, c_x2) |
|
5500 |
_ICOORD_ (y2, c_y2) |
|
5501 |
SETWIN(aGLXWindowId) |
|
1932 | 5502 |
#ifdef GLX |
294 | 5503 |
bbox2i(c_xmin, c_ymin, c_x1, c_y1, c_x2, c_y2); |
1932 | 5504 |
#endif |
5505 |
%} |
|
294 | 5506 |
! |
5507 |
||
5508 |
glxBbox2sXmin: xmin ymin: ymin x1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
5509 |
||
5510 |
%{ /* NOCONTEXT */ |
|
5511 |
Screencoord c_xmin, c_ymin; |
|
4718 | 5512 |
Scoord c_x1, c_y1, c_x2, c_y2; |
294 | 5513 |
|
5514 |
_SCREENCOORD_ (xmin, c_xmin) |
|
5515 |
_SCREENCOORD_ (ymin, c_ymin) |
|
5516 |
_SCOORD_ (x1, c_x1) |
|
5517 |
_SCOORD_ (y1, c_y1) |
|
5518 |
_SCOORD_ (x2, c_x2) |
|
5519 |
_SCOORD_ (y2, c_y2) |
|
5520 |
SETWIN(aGLXWindowId) |
|
1932 | 5521 |
#ifdef GLX |
294 | 5522 |
bbox2s(c_xmin, c_ymin, c_x1, c_y1, c_x2, c_y2); |
1932 | 5523 |
#endif |
5524 |
%} |
|
294 | 5525 |
! |
5526 |
||
5527 |
glxBeginTrimIn: aGLXWindowId |
|
5528 |
||
5529 |
%{ /* NOCONTEXT */ |
|
1932 | 5530 |
SETWIN(aGLXWindowId) |
5531 |
#ifdef GLX |
|
294 | 5532 |
bgntrim(); |
1932 | 5533 |
#endif |
5534 |
%} |
|
294 | 5535 |
! |
5536 |
||
5537 |
glxBlankscreen: b in: aGLXWindowId |
|
5538 |
||
5539 |
%{ /* NOCONTEXT */ |
|
1932 | 5540 |
SETWIN(aGLXWindowId) |
5541 |
#ifdef GLX |
|
294 | 5542 |
blankscreen(_booleanVal(b)); |
1932 | 5543 |
#endif |
5544 |
%} |
|
294 | 5545 |
! |
5546 |
||
5547 |
glxBlanktime: count in: aGLXWindowId |
|
5548 |
||
5549 |
%{ /* NOCONTEXT */ |
|
1932 | 5550 |
SETWIN(aGLXWindowId) |
5551 |
#ifdef GLX |
|
294 | 5552 |
blanktime(__intVal(count)); |
1932 | 5553 |
#endif |
5554 |
%} |
|
294 | 5555 |
! |
5556 |
||
5557 |
glxBlendcolorRed: red green: green blue: blue alpha: alpha in: aGLXWindowId |
|
5558 |
||
5559 |
%{ /* NOCONTEXT */ |
|
1932 | 5560 |
SETWIN(aGLXWindowId) |
294 | 5561 |
#ifdef FULL_GLX |
4718 | 5562 |
blendcolor(_floatVal(red), _floatVal(green), _floatVal(blue), _floatVal(alpha)); |
1932 | 5563 |
#endif |
5564 |
%} |
|
294 | 5565 |
! |
5566 |
||
5567 |
glxBlendfunctionSfactr: sfactr dfactr: dfactr in: aGLXWindowId |
|
5568 |
||
5569 |
%{ /* NOCONTEXT */ |
|
1932 | 5570 |
SETWIN(aGLXWindowId) |
5571 |
#ifdef GLX |
|
294 | 5572 |
blendfunction(__intVal(sfactr), __intVal(dfactr)); |
1932 | 5573 |
#endif |
5574 |
%} |
|
294 | 5575 |
! |
5576 |
||
5577 |
glxBlinkRate: rate i: i red: red green: green blue: blue in: aGLXWindowId |
|
5578 |
||
5579 |
%{ /* NOCONTEXT */ |
|
1932 | 5580 |
SETWIN(aGLXWindowId) |
5581 |
#ifdef GLX |
|
4718 | 5582 |
blink(_shortVal(rate), _colorindexVal(i), |
294 | 5583 |
_shortVal(red), _shortVal(green), _shortVal(blue)); |
1932 | 5584 |
#endif |
5585 |
%} |
|
294 | 5586 |
! |
5587 |
||
5588 |
glxBlkqreadData: data n: n in: aGLXWindowId |
|
5589 |
||
5590 |
%{ /* NOCONTEXT */ |
|
1932 | 5591 |
int rslt = -1; |
5592 |
||
5593 |
SETWIN(aGLXWindowId) |
|
5594 |
#ifdef GLX |
|
5595 |
rslt = blkqread((short *)_indexedArea(data), __intVal(n)); |
|
5596 |
#endif |
|
5597 |
RETURN (__MKSMALLINT(rslt)); |
|
5598 |
%} |
|
294 | 5599 |
! |
5600 |
||
5601 |
glxC3f: v in: aGLXWindowId |
|
5602 |
||
5603 |
%{ /* NOCONTEXT */ |
|
5604 |
float vec[3], *c_v; |
|
5605 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5606 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 3))) RETURN(false); |
294 | 5607 |
SETWIN(aGLXWindowId) |
1932 | 5608 |
#ifdef GLX |
294 | 5609 |
c3f(c_v); |
1932 | 5610 |
#endif |
5611 |
%} |
|
294 | 5612 |
! |
5613 |
||
5614 |
glxC3i: v in: aGLXWindowId |
|
5615 |
||
5616 |
%{ /* NOCONTEXT */ |
|
5617 |
long vec[3], *c_v; |
|
5618 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5619 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 3))) RETURN(false); |
294 | 5620 |
SETWIN(aGLXWindowId) |
1932 | 5621 |
#ifdef GLX |
294 | 5622 |
c3i(c_v); |
1932 | 5623 |
#endif |
5624 |
%} |
|
294 | 5625 |
! |
5626 |
||
5627 |
glxC3s: v in: aGLXWindowId |
|
5628 |
||
5629 |
%{ /* NOCONTEXT */ |
|
5630 |
short vec[3], *c_v; |
|
5631 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5632 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 3))) RETURN(false); |
294 | 5633 |
SETWIN(aGLXWindowId) |
1932 | 5634 |
#ifdef GLX |
294 | 5635 |
c3s(c_v); |
1932 | 5636 |
#endif |
5637 |
%} |
|
294 | 5638 |
! |
5639 |
||
5640 |
glxC4f: v in: aGLXWindowId |
|
5641 |
||
5642 |
%{ /* NOCONTEXT */ |
|
5643 |
float vec[4], *c_v; |
|
5644 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5645 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 4))) RETURN(false); |
294 | 5646 |
SETWIN(aGLXWindowId) |
1932 | 5647 |
#ifdef GLX |
294 | 5648 |
c4f(c_v); |
1932 | 5649 |
#endif |
5650 |
%} |
|
294 | 5651 |
! |
5652 |
||
5653 |
glxC4i: v in: aGLXWindowId |
|
5654 |
||
5655 |
%{ /* NOCONTEXT */ |
|
5656 |
long vec[4], *c_v; |
|
5657 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5658 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 4))) RETURN(false); |
294 | 5659 |
SETWIN(aGLXWindowId) |
1932 | 5660 |
#ifdef GLX |
294 | 5661 |
c4i(c_v); |
1932 | 5662 |
#endif |
5663 |
%} |
|
294 | 5664 |
! |
5665 |
||
5666 |
glxC4s: v in: aGLXWindowId |
|
5667 |
||
5668 |
%{ /* NOCONTEXT */ |
|
5669 |
short vec[4], *c_v; |
|
5670 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5671 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 4))) RETURN(false); |
294 | 5672 |
SETWIN(aGLXWindowId) |
1932 | 5673 |
#ifdef GLX |
294 | 5674 |
c4s(c_v); |
1932 | 5675 |
#endif |
5676 |
%} |
|
294 | 5677 |
! |
5678 |
||
5679 |
glxClearhitcodeIn: aGLXWindowId |
|
5680 |
||
5681 |
%{ /* NOCONTEXT */ |
|
1932 | 5682 |
SETWIN(aGLXWindowId) |
5683 |
#ifdef GLX |
|
294 | 5684 |
clearhitcode(); |
1932 | 5685 |
#endif |
5686 |
%} |
|
294 | 5687 |
! |
5688 |
||
5689 |
glxClipplaneIndex: index mode: mode params: params in: aGLXWindowId |
|
5690 |
||
5691 |
%{ /* NOCONTEXT */ |
|
5692 |
float vec[4], *v; |
|
5693 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5694 |
if (! (v = __glx_getFloatsFromInto(params, vec, 4))) RETURN(false); |
294 | 5695 |
SETWIN(aGLXWindowId) |
1932 | 5696 |
#ifdef GLX |
294 | 5697 |
clipplane(__intVal(index), __intVal(mode), v); |
1932 | 5698 |
#endif |
5699 |
%} |
|
294 | 5700 |
! |
5701 |
||
5702 |
glxCmodeIn: aGLXWindowId |
|
5703 |
||
5704 |
%{ /* NOCONTEXT */ |
|
1932 | 5705 |
SETWIN(aGLXWindowId) |
5706 |
#ifdef GLX |
|
294 | 5707 |
cmode(); |
1932 | 5708 |
#endif |
5709 |
%} |
|
294 | 5710 |
! |
5711 |
||
5712 |
glxColorfIndex: index in: aGLXWindowId |
|
5713 |
||
5714 |
^self glxColor: index in: aGLXWindowId |
|
5715 |
! |
|
5716 |
||
5717 |
glxCuroriginN: n xorigin: xorigin yorigin: yorigin in: aGLXWindowId |
|
5718 |
||
5719 |
%{ /* NOCONTEXT */ |
|
1932 | 5720 |
SETWIN(aGLXWindowId) |
5721 |
#ifdef GLX |
|
294 | 5722 |
curorigin(_shortVal(n), _shortVal(xorigin), _shortVal(yorigin)); |
1932 | 5723 |
#endif |
5724 |
%} |
|
294 | 5725 |
! |
5726 |
||
5727 |
glxCursoffIn: aGLXWindowId |
|
5728 |
||
5729 |
%{ /* NOCONTEXT */ |
|
1932 | 5730 |
SETWIN(aGLXWindowId) |
5731 |
#ifdef GLX |
|
294 | 5732 |
cursoff(); |
1932 | 5733 |
#endif |
5734 |
%} |
|
294 | 5735 |
! |
5736 |
||
5737 |
glxCursonIn: aGLXWindowId |
|
5738 |
||
5739 |
%{ /* NOCONTEXT */ |
|
1932 | 5740 |
SETWIN(aGLXWindowId) |
5741 |
#ifdef GLX |
|
294 | 5742 |
curson(); |
1932 | 5743 |
#endif |
5744 |
%} |
|
294 | 5745 |
! |
5746 |
||
5747 |
glxCurstype: type in: aGLXWindowId |
|
5748 |
||
5749 |
%{ /* NOCONTEXT */ |
|
1932 | 5750 |
SETWIN(aGLXWindowId) |
5751 |
#ifdef GLX |
|
294 | 5752 |
curstype(__intVal(type)); |
1932 | 5753 |
#endif |
5754 |
%} |
|
294 | 5755 |
! |
5756 |
||
5757 |
glxCyclemapDuration: duration map: map nxtmap: nxtmap in: aGLXWindowId |
|
5758 |
||
5759 |
%{ /* NOCONTEXT */ |
|
1932 | 5760 |
SETWIN(aGLXWindowId) |
5761 |
#ifdef GLX |
|
294 | 5762 |
cyclemap(_shortVal(duration), _shortVal(map), _shortVal(nxtmap)); |
1932 | 5763 |
#endif |
5764 |
%} |
|
294 | 5765 |
! |
5766 |
||
5767 |
glxDefpatternN: n size: size mask: mask in: aGLXWindowId |
|
5768 |
||
5769 |
%{ /* NOCONTEXT */ |
|
1932 | 5770 |
SETWIN(aGLXWindowId) |
5771 |
#ifdef GLX |
|
294 | 5772 |
defpattern(_shortVal(n), _shortVal(size), (unsigned short *)_indexedArea(mask)); |
1932 | 5773 |
#endif |
5774 |
%} |
|
294 | 5775 |
! |
5776 |
||
5777 |
glxDeltag: t in: aGLXWindowId |
|
5778 |
||
5779 |
%{ /* NOCONTEXT */ |
|
1932 | 5780 |
SETWIN(aGLXWindowId) |
5781 |
#ifdef GLX |
|
294 | 5782 |
deltag(_tagVal(t)); |
1932 | 5783 |
#endif |
5784 |
%} |
|
294 | 5785 |
! |
5786 |
||
5787 |
glxDepthcueMode: mode in: aGLXWindowId |
|
5788 |
||
5789 |
%{ /* NOCONTEXT */ |
|
1932 | 5790 |
SETWIN(aGLXWindowId) |
5791 |
#ifdef GLX |
|
294 | 5792 |
depthcue(_booleanVal(mode)); |
1932 | 5793 |
#endif |
5794 |
%} |
|
294 | 5795 |
! |
5796 |
||
5797 |
glxDitherMode: mode in: aGLXWindowId |
|
5798 |
||
5799 |
%{ /* NOCONTEXT */ |
|
1932 | 5800 |
SETWIN(aGLXWindowId) |
5801 |
#ifdef GLX |
|
294 | 5802 |
dither(_longVal(mode)); |
1932 | 5803 |
#endif |
5804 |
%} |
|
294 | 5805 |
! |
5806 |
||
5807 |
glxDopup: pup in: aGLXWindowId |
|
5808 |
||
5809 |
%{ /* NOCONTEXT */ |
|
1932 | 5810 |
SETWIN(aGLXWindowId) |
5811 |
#ifdef GLX |
|
294 | 5812 |
dopup(_longVal(pup)); |
1932 | 5813 |
#endif |
5814 |
%} |
|
294 | 5815 |
! |
5816 |
||
5817 |
glxDrawmode: mode in: aGLXWindowId |
|
5818 |
||
5819 |
%{ /* NOCONTEXT */ |
|
1932 | 5820 |
SETWIN(aGLXWindowId) |
5821 |
#ifdef GLX |
|
294 | 5822 |
drawmode(_longVal(mode)); |
1932 | 5823 |
#endif |
5824 |
%} |
|
294 | 5825 |
! |
5826 |
||
5827 |
glxEditobj: obj in: aGLXWindowId |
|
5828 |
||
5829 |
%{ /* NOCONTEXT */ |
|
1932 | 5830 |
SETWIN(aGLXWindowId) |
5831 |
#ifdef GLX |
|
294 | 5832 |
editobj(_objectVal(obj)); |
1932 | 5833 |
#endif |
5834 |
%} |
|
294 | 5835 |
! |
5836 |
||
5837 |
glxEndTrimIn: aGLXWindowId |
|
5838 |
||
5839 |
%{ /* NOCONTEXT */ |
|
1932 | 5840 |
SETWIN(aGLXWindowId) |
5841 |
#ifdef GLX |
|
294 | 5842 |
endtrim(); |
1932 | 5843 |
#endif |
5844 |
%} |
|
294 | 5845 |
! |
5846 |
||
5847 |
glxEndfullscrnIn: aGLXWindowId |
|
5848 |
||
5849 |
%{ /* NOCONTEXT */ |
|
1932 | 5850 |
SETWIN(aGLXWindowId) |
5851 |
#ifdef GLX |
|
294 | 5852 |
endfullscrn(); |
1932 | 5853 |
#endif |
5854 |
%} |
|
294 | 5855 |
! |
5856 |
||
5857 |
glxEndpupmodeIn: aGLXWindowId |
|
5858 |
||
5859 |
%{ /* NOCONTEXT */ |
|
1932 | 5860 |
SETWIN(aGLXWindowId) |
5861 |
#ifdef GLX |
|
294 | 5862 |
endpupmode(); |
1932 | 5863 |
#endif |
5864 |
%} |
|
294 | 5865 |
! |
5866 |
||
5867 |
glxFinishIn: aGLXWindowId |
|
5868 |
||
5869 |
%{ /* NOCONTEXT */ |
|
1932 | 5870 |
SETWIN(aGLXWindowId) |
5871 |
#ifdef GLX |
|
294 | 5872 |
finish(); |
1932 | 5873 |
#endif |
5874 |
%} |
|
294 | 5875 |
! |
5876 |
||
5877 |
glxFont: fntnum in: aGLXWindowId |
|
5878 |
||
5879 |
%{ /* NOCONTEXT */ |
|
5880 |
SETWIN(aGLXWindowId) |
|
1932 | 5881 |
#ifdef GLX |
294 | 5882 |
font(_shortVal(fntnum)); |
1932 | 5883 |
#endif |
294 | 5884 |
%} |
5885 |
! |
|
5886 |
||
5887 |
glxForegroundIn: aGLXWindowId |
|
5888 |
||
5889 |
%{ /* NOCONTEXT */ |
|
5890 |
SETWIN(aGLXWindowId) |
|
1932 | 5891 |
#ifdef OPENGL |
5892 |
#else |
|
294 | 5893 |
foreground(); |
1932 | 5894 |
#endif |
294 | 5895 |
%} |
5896 |
! |
|
5897 |
||
5898 |
glxFreepup: pup in: aGLXWindowId |
|
5899 |
||
5900 |
%{ /* NOCONTEXT */ |
|
1932 | 5901 |
SETWIN(aGLXWindowId) |
5902 |
#ifdef GLX |
|
294 | 5903 |
freepup(_longVal(pup)); |
1932 | 5904 |
#endif |
5905 |
%} |
|
294 | 5906 |
! |
5907 |
||
5908 |
glxFudgeXfudge: xfudge yfudge: yfudge in: aGLXWindowId |
|
5909 |
||
5910 |
%{ /* NOCONTEXT */ |
|
1932 | 5911 |
SETWIN(aGLXWindowId) |
5912 |
#ifdef GLX |
|
294 | 5913 |
fudge(_longVal(xfudge), _longVal(yfudge)); |
1932 | 5914 |
#endif |
5915 |
%} |
|
294 | 5916 |
! |
5917 |
||
5918 |
glxFullscrnIn: aGLXWindowId |
|
5919 |
||
5920 |
%{ /* NOCONTEXT */ |
|
1932 | 5921 |
SETWIN(aGLXWindowId) |
5922 |
#ifdef GLX |
|
294 | 5923 |
fullscrn(); |
1932 | 5924 |
#endif |
5925 |
%} |
|
294 | 5926 |
! |
5927 |
||
5928 |
glxGbeginIn: aGLXWindowId |
|
5929 |
||
5930 |
%{ /* NOCONTEXT */ |
|
1932 | 5931 |
SETWIN(aGLXWindowId) |
5932 |
#ifdef GLX |
|
294 | 5933 |
gbegin(); |
1932 | 5934 |
#endif |
5935 |
%} |
|
294 | 5936 |
! |
5937 |
||
5938 |
glxGentagIn: aGLXWindowId |
|
5939 |
||
5940 |
%{ /* NOCONTEXT */ |
|
1932 | 5941 |
int rslt = -1; |
5942 |
||
5943 |
#ifdef GLX |
|
5944 |
SETWIN(aGLXWindowId) |
|
5945 |
rslt = gentag(); |
|
5946 |
#endif |
|
5947 |
RETURN (__MKSMALLINT(rslt)); |
|
5948 |
%} |
|
294 | 5949 |
! |
5950 |
||
5951 |
glxGetbackfaceIn: aGLXWindowId |
|
5952 |
||
5953 |
%{ /* NOCONTEXT */ |
|
1932 | 5954 |
int rslt = -1; |
5955 |
||
5956 |
#ifdef GLX |
|
5957 |
SETWIN(aGLXWindowId) |
|
5958 |
rslt = getbackface(); |
|
5959 |
#endif |
|
5960 |
RETURN (__MKSMALLINT(rslt)); |
|
5961 |
%} |
|
294 | 5962 |
! |
5963 |
||
5964 |
glxGetbufferIn: aGLXWindowId |
|
5965 |
||
5966 |
%{ /* NOCONTEXT */ |
|
1932 | 5967 |
int rslt = -1; |
5968 |
||
5969 |
#ifdef GLX |
|
5970 |
SETWIN(aGLXWindowId) |
|
5971 |
rslt = getbuffer(); |
|
5972 |
#endif |
|
5973 |
RETURN (__MKSMALLINT(rslt)); |
|
5974 |
%} |
|
294 | 5975 |
! |
5976 |
||
5977 |
glxGetbutton: num in: aGLXWindowId |
|
5978 |
||
5979 |
%{ /* NOCONTEXT */ |
|
1932 | 5980 |
int rslt = -1; |
5981 |
||
5982 |
SETWIN(aGLXWindowId) |
|
5983 |
#ifdef OPENGL |
|
5984 |
#else |
|
5985 |
rslt = getbutton(_deviceVal(num)); |
|
5986 |
#endif |
|
5987 |
RETURN (__MKSMALLINT(rslt)); |
|
294 | 5988 |
%} |
5989 |
! |
|
5990 |
||
5991 |
glxGetcmmodeIn: aGLXWindowId |
|
5992 |
||
5993 |
%{ /* NOCONTEXT */ |
|
1932 | 5994 |
int rslt = 0; |
5995 |
||
5996 |
SETWIN(aGLXWindowId) |
|
5997 |
#ifdef GLX |
|
5998 |
rslt = getcmmode(); |
|
5999 |
#endif |
|
6000 |
RETURN (__MKBOOLEAN(rslt)); |
|
6001 |
%} |
|
294 | 6002 |
! |
6003 |
||
6004 |
glxGetcolorIn: aGLXWindowId |
|
6005 |
"return the current drawing color" |
|
6006 |
||
6007 |
%{ /* NOCONTEXT */ |
|
1932 | 6008 |
int rslt = -1; |
6009 |
||
6010 |
SETWIN(aGLXWindowId) |
|
6011 |
#ifdef OPENGL |
|
6012 |
#else |
|
6013 |
rslt = getcolor(); |
|
6014 |
#endif |
|
6015 |
RETURN (__MKSMALLINT(rslt)); |
|
294 | 6016 |
%} |
6017 |
! |
|
6018 |
||
6019 |
glxGetdcmIn: aGLXWindowId |
|
6020 |
||
6021 |
%{ /* NOCONTEXT */ |
|
6022 |
#ifdef GLX |
|
6023 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6024 |
RETURN (__MKBOOLEAN(getdcm())); |
294 | 6025 |
#endif |
6026 |
%} |
|
6027 |
. |
|
6028 |
^ false |
|
6029 |
! |
|
6030 |
||
6031 |
glxGetdescenderIn: aGLXWindowId |
|
6032 |
||
6033 |
%{ /* NOCONTEXT */ |
|
6034 |
#ifdef GLX |
|
6035 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6036 |
RETURN (__MKSMALLINT(getdescender())); |
294 | 6037 |
#endif |
6038 |
%} |
|
6039 |
. |
|
6040 |
^ false |
|
6041 |
! |
|
6042 |
||
6043 |
glxGetdisplaymodeIn: aGLXWindowId |
|
6044 |
||
6045 |
%{ /* NOCONTEXT */ |
|
6046 |
#ifdef GLX |
|
6047 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6048 |
RETURN (__MKSMALLINT(getdisplaymode())); |
294 | 6049 |
#endif |
6050 |
%} |
|
6051 |
. |
|
6052 |
^ false |
|
6053 |
! |
|
6054 |
||
6055 |
glxGetdrawmodeIn: aGLXWindowId |
|
6056 |
||
6057 |
%{ /* NOCONTEXT */ |
|
6058 |
#ifdef GLX |
|
6059 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6060 |
RETURN (__MKSMALLINT(getdrawmode())); |
294 | 6061 |
#endif |
6062 |
%} |
|
6063 |
. |
|
6064 |
^ false |
|
6065 |
! |
|
6066 |
||
6067 |
glxGetfontIn: aGLXWindowId |
|
6068 |
||
6069 |
%{ /* NOCONTEXT */ |
|
6070 |
#ifdef GLX |
|
6071 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6072 |
RETURN (__MKSMALLINT(getfont())); |
294 | 6073 |
#endif |
6074 |
%} |
|
6075 |
. |
|
6076 |
^ false |
|
6077 |
! |
|
6078 |
||
6079 |
glxGetgconfigBuffer: buffer in: aGLXWindowId |
|
6080 |
||
6081 |
%{ /* NOCONTEXT */ |
|
6082 |
#ifdef FULL_GLX |
|
6083 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6084 |
RETURN (__MKSMALLINT(getgconfig(_longVal(buffer)))); |
294 | 6085 |
#endif |
6086 |
%} |
|
6087 |
. |
|
6088 |
^ false |
|
6089 |
! |
|
6090 |
||
6091 |
glxGetgdescInquiry: inquiry in: aGLXWindowId |
|
6092 |
||
6093 |
%{ /* NOCONTEXT */ |
|
1932 | 6094 |
int rslt = 0; |
6095 |
||
6096 |
SETWIN(aGLXWindowId) |
|
6097 |
#ifdef OPENGL |
|
6098 |
#else |
|
6099 |
rslt = getgdesc(_longVal(inquiry)); |
|
6100 |
#endif |
|
6101 |
RETURN (__MKSMALLINT(rslt)); |
|
294 | 6102 |
%} |
6103 |
! |
|
6104 |
||
6105 |
glxGetheightIn: aGLXWindowId |
|
6106 |
||
6107 |
%{ /* NOCONTEXT */ |
|
1932 | 6108 |
int rslt = 0; |
6109 |
||
6110 |
SETWIN(aGLXWindowId) |
|
6111 |
#ifdef OPENGL |
|
6112 |
#else |
|
6113 |
rslt = getheight(); |
|
6114 |
#endif |
|
6115 |
RETURN (__MKSMALLINT(rslt)); |
|
294 | 6116 |
%} |
6117 |
! |
|
6118 |
||
6119 |
glxGethitcodeIn: aGLXWindowId |
|
6120 |
||
6121 |
%{ /* NOCONTEXT */ |
|
6122 |
#ifdef GLX |
|
6123 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6124 |
RETURN (__MKSMALLINT(gethitcode())); |
294 | 6125 |
#endif |
6126 |
%} |
|
6127 |
. |
|
6128 |
^ false |
|
6129 |
! |
|
6130 |
||
6131 |
glxGetlsbackupIn: aGLXWindowId |
|
6132 |
||
6133 |
%{ /* NOCONTEXT */ |
|
6134 |
#ifdef GLX |
|
6135 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6136 |
RETURN (__MKBOOLEAN(getlsbackup())); |
294 | 6137 |
#endif |
6138 |
%} |
|
6139 |
. |
|
6140 |
^ false |
|
6141 |
! |
|
6142 |
||
6143 |
glxGetlsrepeatIn: aGLXWindowId |
|
6144 |
||
6145 |
%{ /* NOCONTEXT */ |
|
6146 |
#ifdef GLX |
|
6147 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6148 |
RETURN (__MKSMALLINT(getlsrepeat())); |
294 | 6149 |
#endif |
6150 |
%} |
|
6151 |
. |
|
6152 |
^ false |
|
6153 |
! |
|
6154 |
||
6155 |
glxGetlstyleIn: aGLXWindowId |
|
6156 |
||
6157 |
%{ /* NOCONTEXT */ |
|
6158 |
#ifdef GLX |
|
6159 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6160 |
RETURN (__MKSMALLINT(getlstyle())); |
294 | 6161 |
#endif |
6162 |
%} |
|
6163 |
. |
|
6164 |
^ false |
|
6165 |
! |
|
6166 |
||
6167 |
glxGetlwidthIn: aGLXWindowId |
|
6168 |
||
6169 |
%{ /* NOCONTEXT */ |
|
6170 |
#ifdef GLX |
|
6171 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6172 |
RETURN (__MKSMALLINT(getlwidth())); |
294 | 6173 |
#endif |
6174 |
%} |
|
6175 |
. |
|
6176 |
^ false |
|
6177 |
! |
|
6178 |
||
6179 |
glxGetmapIn: aGLXWindowId |
|
6180 |
||
6181 |
%{ /* NOCONTEXT */ |
|
6182 |
#ifdef GLX |
|
6183 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6184 |
RETURN (__MKSMALLINT(getmap())); |
294 | 6185 |
#endif |
6186 |
%} |
|
6187 |
. |
|
6188 |
^ false |
|
6189 |
! |
|
6190 |
||
6191 |
glxGetmmodeIn: aGLXWindowId |
|
6192 |
||
6193 |
%{ /* NOCONTEXT */ |
|
6194 |
#ifdef GLX |
|
6195 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6196 |
RETURN (__MKSMALLINT(getmmode())); |
294 | 6197 |
#endif |
6198 |
%} |
|
6199 |
. |
|
6200 |
^ false |
|
6201 |
! |
|
6202 |
||
6203 |
glxGetmonitorIn: aGLXWindowId |
|
6204 |
||
6205 |
%{ /* NOCONTEXT */ |
|
6206 |
#ifdef GLX |
|
6207 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6208 |
RETURN (__MKSMALLINT(getmonitor())); |
294 | 6209 |
#endif |
6210 |
%} |
|
6211 |
. |
|
6212 |
^ false |
|
6213 |
! |
|
6214 |
||
6215 |
glxGetmultisampleIn: aGLXWindowId |
|
6216 |
||
6217 |
%{ /* NOCONTEXT */ |
|
6218 |
#ifdef FULL_GLX |
|
6219 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6220 |
RETURN (__MKBOOLEAN(getmultisample())); |
294 | 6221 |
#endif |
6222 |
%} |
|
6223 |
. |
|
6224 |
^ false |
|
6225 |
! |
|
6226 |
||
6227 |
glxGetothermonitorIn: 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(getothermonitor())); |
294 | 6233 |
#endif |
6234 |
%} |
|
6235 |
. |
|
6236 |
^ false |
|
6237 |
! |
|
6238 |
||
6239 |
glxGetpatternIn: 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 (__MKSMALLINT(getpattern())); |
294 | 6245 |
#endif |
6246 |
%} |
|
6247 |
. |
|
6248 |
^ false |
|
6249 |
! |
|
6250 |
||
6251 |
glxGetresetlsIn: 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 (__MKBOOLEAN(getresetls())); |
294 | 6257 |
#endif |
6258 |
%} |
|
6259 |
. |
|
6260 |
^ false |
|
6261 |
! |
|
6262 |
||
6263 |
glxGetshadeIn: 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(getshade())); |
294 | 6269 |
#endif |
6270 |
%} |
|
6271 |
. |
|
6272 |
^ false |
|
6273 |
! |
|
6274 |
||
6275 |
glxGetsmIn: 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(getsm())); |
294 | 6281 |
#endif |
6282 |
%} |
|
6283 |
. |
|
6284 |
^ false |
|
6285 |
! |
|
6286 |
||
6287 |
glxGetvaluator: dev in: aGLXWindowId |
|
6288 |
||
6289 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
6290 |
#ifndef OPENGL |
294 | 6291 |
SETWIN(aGLXWindowId) |
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6292 |
RETURN (__MKSMALLINT(getvaluator(_deviceVal(dev)))); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
6293 |
#endif |
294 | 6294 |
%} |
6295 |
. |
|
6296 |
^ false |
|
6297 |
! |
|
6298 |
||
6299 |
glxGetvideo: reg in: 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(getvideo(_longVal(reg)))); |
294 | 6305 |
#endif |
6306 |
%} |
|
6307 |
. |
|
6308 |
^ false |
|
6309 |
! |
|
6310 |
||
6311 |
glxGetwritemaskIn: 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(getwritemask())); |
294 | 6317 |
#endif |
6318 |
%} |
|
6319 |
. |
|
6320 |
^ false |
|
6321 |
! |
|
6322 |
||
6323 |
glxGetwscrnIn: aGLXWindowId |
|
6324 |
||
6325 |
%{ /* NOCONTEXT */ |
|
6326 |
#ifdef GLX |
|
6327 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6328 |
RETURN (__MKSMALLINT(getwscrn())); |
294 | 6329 |
#endif |
6330 |
%} |
|
6331 |
. |
|
6332 |
^ false |
|
6333 |
! |
|
6334 |
||
6335 |
glxGetzbufferIn: 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 (__MKBOOLEAN(getzbuffer())); |
294 | 6341 |
#endif |
6342 |
%} |
|
6343 |
. |
|
6344 |
^ false |
|
6345 |
! |
|
6346 |
||
6347 |
glxGexitIn: aGLXWindowId |
|
6348 |
||
6349 |
%{ /* NOCONTEXT */ |
|
1932 | 6350 |
SETWIN(aGLXWindowId) |
6351 |
#ifdef OPENGL |
|
6352 |
#else |
|
294 | 6353 |
gexit(); |
1932 | 6354 |
#endif |
6355 |
%} |
|
294 | 6356 |
! |
6357 |
||
6358 |
glxGflushIn: aGLXWindowId |
|
6359 |
||
6360 |
%{ /* NOCONTEXT */ |
|
6361 |
#ifdef GLX |
|
6362 |
SETWIN(aGLXWindowId) |
|
6363 |
gflush(); |
|
1932 | 6364 |
#endif |
6365 |
%} |
|
294 | 6366 |
! |
6367 |
||
6368 |
glxGinitIn: aGLXWindowId |
|
6369 |
||
6370 |
%{ /* NOCONTEXT */ |
|
1932 | 6371 |
SETWIN(aGLXWindowId) |
6372 |
#ifdef OPENGL |
|
6373 |
#else |
|
294 | 6374 |
ginit(); |
1932 | 6375 |
#endif |
6376 |
%} |
|
294 | 6377 |
! |
6378 |
||
6379 |
glxGlcompatMode: mode value: value in: aGLXWindowId |
|
6380 |
||
6381 |
%{ /* NOCONTEXT */ |
|
6382 |
#ifdef GLX |
|
6383 |
SETWIN(aGLXWindowId) |
|
6384 |
glcompat(_longVal(mode), _longVal(value)); |
|
1932 | 6385 |
#endif |
6386 |
%} |
|
294 | 6387 |
! |
6388 |
||
6389 |
glxGresetIn: aGLXWindowId |
|
6390 |
||
6391 |
%{ /* NOCONTEXT */ |
|
6392 |
#ifdef GLX |
|
6393 |
SETWIN(aGLXWindowId) |
|
6394 |
greset(); |
|
1932 | 6395 |
#endif |
6396 |
%} |
|
294 | 6397 |
! |
6398 |
||
6399 |
glxGsyncIn: aGLXWindowId |
|
6400 |
||
6401 |
%{ /* NOCONTEXT */ |
|
6402 |
#ifdef GLX |
|
6403 |
SETWIN(aGLXWindowId) |
|
6404 |
gsync(); |
|
1932 | 6405 |
#endif |
6406 |
%} |
|
294 | 6407 |
! |
6408 |
||
6409 |
glxIconsizeX: x y: y in: aGLXWindowId |
|
6410 |
||
6411 |
%{ /* NOCONTEXT */ |
|
6412 |
#ifdef GLX |
|
6413 |
SETWIN(aGLXWindowId) |
|
6414 |
iconsize(_longVal(x), _longVal(y)); |
|
1932 | 6415 |
#endif |
6416 |
%} |
|
294 | 6417 |
! |
6418 |
||
6419 |
glxImakebackgroundIn: aGLXWindowId |
|
6420 |
||
6421 |
%{ /* NOCONTEXT */ |
|
6422 |
#ifdef GLX |
|
6423 |
SETWIN(aGLXWindowId) |
|
6424 |
imakebackground(); |
|
1932 | 6425 |
#endif |
6426 |
%} |
|
294 | 6427 |
! |
6428 |
||
6429 |
glxInitnamesIn: aGLXWindowId |
|
6430 |
||
6431 |
%{ /* NOCONTEXT */ |
|
6432 |
#ifdef GLX |
|
6433 |
SETWIN(aGLXWindowId) |
|
6434 |
initnames(); |
|
1932 | 6435 |
#endif |
6436 |
%} |
|
294 | 6437 |
! |
6438 |
||
6439 |
glxIsqueued: dev in: aGLXWindowId |
|
6440 |
||
6441 |
%{ /* NOCONTEXT */ |
|
6442 |
#ifdef GLX |
|
6443 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6444 |
RETURN (__MKBOOLEAN(isqueued(_deviceVal(dev)))); |
294 | 6445 |
#endif |
6446 |
%} |
|
6447 |
. |
|
6448 |
^ false |
|
6449 |
! |
|
6450 |
||
6451 |
glxIstag: t in: aGLXWindowId |
|
6452 |
||
6453 |
%{ /* NOCONTEXT */ |
|
6454 |
#ifdef GLX |
|
6455 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6456 |
RETURN (__MKBOOLEAN(istag(_tagVal(t)))); |
294 | 6457 |
#endif |
6458 |
%} |
|
6459 |
. |
|
6460 |
^ false |
|
6461 |
! |
|
6462 |
||
6463 |
glxKeepaspectX: x y: y in: aGLXWindowId |
|
6464 |
||
6465 |
%{ /* NOCONTEXT */ |
|
6466 |
#ifdef GLX |
|
6467 |
SETWIN(aGLXWindowId) |
|
6468 |
keepaspect(_longVal(x), _longVal(y)); |
|
6469 |
RETURN (true); |
|
6470 |
#endif |
|
6471 |
%} |
|
6472 |
. |
|
6473 |
^ false |
|
6474 |
! |
|
6475 |
||
6476 |
glxLinesmoothMode: mode in: aGLXWindowId |
|
6477 |
||
6478 |
%{ /* NOCONTEXT */ |
|
6479 |
#ifdef GLX |
|
6480 |
SETWIN(aGLXWindowId) |
|
6481 |
linesmooth((ulong)__intVal(mode)); |
|
6482 |
RETURN (true); |
|
6483 |
#endif |
|
6484 |
%} |
|
6485 |
. |
|
6486 |
^ false |
|
6487 |
! |
|
6488 |
||
6489 |
glxLmcolorMode: mode in: aGLXWindowId |
|
6490 |
||
6491 |
%{ /* NOCONTEXT */ |
|
6492 |
#ifdef GLX |
|
6493 |
SETWIN(aGLXWindowId) |
|
6494 |
lmcolor(_longVal(mode)); |
|
6495 |
RETURN (true); |
|
6496 |
#endif |
|
6497 |
%} |
|
6498 |
. |
|
6499 |
^ false |
|
6500 |
! |
|
6501 |
||
6502 |
glxLoadname: name in: aGLXWindowId |
|
6503 |
||
6504 |
%{ /* NOCONTEXT */ |
|
6505 |
#ifdef GLX |
|
6506 |
SETWIN(aGLXWindowId) |
|
6507 |
loadname(_shortVal(name)); |
|
6508 |
RETURN (true); |
|
6509 |
#endif |
|
6510 |
%} |
|
6511 |
. |
|
6512 |
^ false |
|
6513 |
! |
|
6514 |
||
6515 |
glxLogicop: opcode in: aGLXWindowId |
|
6516 |
||
6517 |
%{ /* NOCONTEXT */ |
|
6518 |
#ifdef GLX |
|
6519 |
SETWIN(aGLXWindowId) |
|
6520 |
logicop(_longVal(opcode)); |
|
6521 |
RETURN (true); |
|
6522 |
#endif |
|
6523 |
%} |
|
6524 |
. |
|
6525 |
^ false |
|
6526 |
! |
|
6527 |
||
6528 |
glxLsbackup: b in: aGLXWindowId |
|
6529 |
||
6530 |
%{ /* NOCONTEXT */ |
|
6531 |
#ifdef GLX |
|
6532 |
SETWIN(aGLXWindowId) |
|
6533 |
lsbackup(_booleanVal(b)); |
|
6534 |
RETURN (true); |
|
6535 |
#endif |
|
6536 |
%} |
|
6537 |
. |
|
6538 |
^ false |
|
6539 |
! |
|
6540 |
||
2422
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
6541 |
glxLsetdepthNear:znear far:zfar in: aGLXWindowId |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
6542 |
|
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
6543 |
%{ /* NOCONTEXT */ |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
6544 |
#ifdef GLX |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
6545 |
SETWIN(aGLXWindowId) |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
6546 |
lsetdepth(_longVal(znear), _longVal(zfar)); |
294 | 6547 |
RETURN (true); |
6548 |
#endif |
|
6549 |
%} |
|
6550 |
. |
|
6551 |
^ false |
|
6552 |
! |
|
6553 |
||
6554 |
glxLshaderangeLowin: lowin hiwin: hiwin znear: znear zfar: zfar in: aGLXWindowId |
|
6555 |
||
6556 |
%{ /* NOCONTEXT */ |
|
6557 |
#ifdef GLX |
|
6558 |
SETWIN(aGLXWindowId) |
|
4718 | 6559 |
lshaderange(_colorindexVal(lowin), _colorindexVal(hiwin), |
294 | 6560 |
_longVal(znear), _longVal(zfar)); |
6561 |
RETURN (true); |
|
6562 |
#endif |
|
6563 |
%} |
|
6564 |
. |
|
6565 |
^ false |
|
6566 |
! |
|
6567 |
||
6568 |
glxLsrepeatFactor: factor in: aGLXWindowId |
|
6569 |
||
6570 |
%{ /* NOCONTEXT */ |
|
6571 |
#ifdef GLX |
|
6572 |
SETWIN(aGLXWindowId) |
|
6573 |
lsrepeat(_longVal(factor)); |
|
6574 |
RETURN (true); |
|
6575 |
#endif |
|
6576 |
%} |
|
6577 |
. |
|
6578 |
^ false |
|
6579 |
! |
|
6580 |
||
6581 |
glxMaketag: t in: aGLXWindowId |
|
6582 |
||
6583 |
%{ /* NOCONTEXT */ |
|
6584 |
#ifdef GLX |
|
6585 |
SETWIN(aGLXWindowId) |
|
6586 |
maketag(_tagVal(t)); |
|
6587 |
RETURN (true); |
|
6588 |
#endif |
|
6589 |
%} |
|
6590 |
. |
|
6591 |
^ false |
|
6592 |
! |
|
6593 |
||
6594 |
glxMaxsizeX: x y: y in: aGLXWindowId |
|
6595 |
||
6596 |
%{ /* NOCONTEXT */ |
|
6597 |
#ifdef GLX |
|
6598 |
SETWIN(aGLXWindowId) |
|
6599 |
maxsize(_longVal(x), _longVal(y)); |
|
6600 |
RETURN (true); |
|
6601 |
#endif |
|
6602 |
%} |
|
6603 |
. |
|
6604 |
^ false |
|
6605 |
! |
|
6606 |
||
6607 |
glxMinsizeX: x y: y in: aGLXWindowId |
|
6608 |
||
6609 |
%{ /* NOCONTEXT */ |
|
6610 |
#ifdef GLX |
|
6611 |
SETWIN(aGLXWindowId) |
|
6612 |
minsize(_longVal(x), _longVal(y)); |
|
6613 |
RETURN (true); |
|
6614 |
#endif |
|
6615 |
%} |
|
6616 |
. |
|
6617 |
^ false |
|
6618 |
! |
|
6619 |
||
6620 |
glxMsalphaMode: mode in: aGLXWindowId |
|
6621 |
||
6622 |
%{ /* NOCONTEXT */ |
|
6623 |
#ifdef FULL_GLX |
|
6624 |
SETWIN(aGLXWindowId) |
|
6625 |
msalpha(_longVal(mode)); |
|
6626 |
RETURN (true); |
|
6627 |
#endif |
|
6628 |
%} |
|
6629 |
. |
|
6630 |
^ false |
|
6631 |
! |
|
6632 |
||
6633 |
glxMsmask: mask inverse: inverse in: aGLXWindowId |
|
6634 |
||
6635 |
%{ /* NOCONTEXT */ |
|
6636 |
#ifdef FULL_GLX |
|
6637 |
SETWIN(aGLXWindowId) |
|
6638 |
msmask(_floatVal(mask), _booleanVal(inverse)); |
|
6639 |
RETURN (true); |
|
6640 |
#endif |
|
6641 |
%} |
|
6642 |
. |
|
6643 |
^ false |
|
6644 |
! |
|
6645 |
||
6646 |
glxMspattern: pattern in: aGLXWindowId |
|
6647 |
||
6648 |
%{ /* NOCONTEXT */ |
|
6649 |
#ifdef FULL_GLX |
|
6650 |
SETWIN(aGLXWindowId) |
|
6651 |
mspattern(_longVal(pattern)); |
|
6652 |
RETURN (true); |
|
6653 |
#endif |
|
6654 |
%} |
|
6655 |
. |
|
6656 |
^ false |
|
6657 |
! |
|
6658 |
||
6659 |
glxMssizeSamples: samples zsize: zsize ssize: ssize in: aGLXWindowId |
|
6660 |
||
6661 |
%{ /* NOCONTEXT */ |
|
6662 |
#ifdef FULL_GLX |
|
6663 |
SETWIN(aGLXWindowId) |
|
6664 |
mssize(_longVal(samples), _longVal(zsize), _longVal(ssize)); |
|
6665 |
RETURN (true); |
|
6666 |
#endif |
|
6667 |
%} |
|
6668 |
. |
|
6669 |
^ false |
|
6670 |
! |
|
6671 |
||
6672 |
glxMswapbuffers: fbuf in: aGLXWindowId |
|
6673 |
||
6674 |
%{ /* NOCONTEXT */ |
|
6675 |
#ifdef GLX |
|
6676 |
SETWIN(aGLXWindowId) |
|
6677 |
mswapbuffers(_longVal(fbuf)); |
|
6678 |
RETURN (true); |
|
6679 |
#endif |
|
6680 |
%} |
|
6681 |
. |
|
6682 |
^ false |
|
6683 |
! |
|
6684 |
||
6685 |
glxMultimapIn: aGLXWindowId |
|
6686 |
||
6687 |
%{ /* NOCONTEXT */ |
|
6688 |
#ifdef GLX |
|
6689 |
SETWIN(aGLXWindowId) |
|
6690 |
multimap(); |
|
6691 |
RETURN (true); |
|
6692 |
#endif |
|
6693 |
%} |
|
6694 |
. |
|
6695 |
^ false |
|
6696 |
! |
|
6697 |
||
6698 |
glxMultisample: bool in: aGLXWindowId |
|
6699 |
||
6700 |
%{ /* NOCONTEXT */ |
|
6701 |
#ifdef FULL_GLX |
|
6702 |
SETWIN(aGLXWindowId) |
|
6703 |
multisample(_booleanVal(bool)); |
|
6704 |
RETURN (true); |
|
6705 |
#endif |
|
6706 |
%} |
|
6707 |
. |
|
6708 |
^ false |
|
6709 |
! |
|
6710 |
||
6711 |
glxNewpupIn: aGLXWindowId |
|
6712 |
||
6713 |
%{ /* NOCONTEXT */ |
|
6714 |
#ifdef GLX |
|
6715 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6716 |
RETURN (__MKSMALLINT(newpup())); |
294 | 6717 |
#endif |
6718 |
%} |
|
6719 |
. |
|
6720 |
^ false |
|
6721 |
! |
|
6722 |
||
6723 |
glxNewtag: newtg oldtg: oldtg offst: offst in: aGLXWindowId |
|
6724 |
||
6725 |
%{ /* NOCONTEXT */ |
|
6726 |
#ifdef GLX |
|
6727 |
SETWIN(aGLXWindowId) |
|
6728 |
newtag(_tagVal(newtg), _tagVal(oldtg), _offsetVal(offst)); |
|
6729 |
RETURN (true); |
|
6730 |
#endif |
|
6731 |
%} |
|
6732 |
. |
|
6733 |
^ false |
|
6734 |
! |
|
6735 |
||
6736 |
glxNoborderIn: aGLXWindowId |
|
6737 |
||
6738 |
%{ /* NOCONTEXT */ |
|
6739 |
#ifdef GLX |
|
6740 |
SETWIN(aGLXWindowId) |
|
6741 |
noborder(); |
|
6742 |
RETURN (true); |
|
6743 |
#endif |
|
6744 |
%} |
|
6745 |
. |
|
6746 |
^ false |
|
6747 |
! |
|
6748 |
||
6749 |
glxNoise: v delta: delta in: aGLXWindowId |
|
6750 |
||
6751 |
%{ /* NOCONTEXT */ |
|
6752 |
#ifdef GLX |
|
6753 |
SETWIN(aGLXWindowId) |
|
6754 |
noise(_deviceVal(v), _shortVal(delta)); |
|
6755 |
RETURN (true); |
|
6756 |
#endif |
|
6757 |
%} |
|
6758 |
. |
|
6759 |
^ false |
|
6760 |
! |
|
6761 |
||
6762 |
glxNoportIn: aGLXWindowId |
|
6763 |
||
6764 |
%{ /* NOCONTEXT */ |
|
6765 |
#ifdef GLX |
|
6766 |
SETWIN(aGLXWindowId) |
|
6767 |
noport(); |
|
6768 |
RETURN (true); |
|
6769 |
#endif |
|
6770 |
%} |
|
6771 |
. |
|
6772 |
^ false |
|
6773 |
! |
|
6774 |
||
6775 |
glxNurbscurveKnotCount: knotCount knotList: knotList |
|
4718 | 6776 |
offset: offset ctlArray: ctlArray |
294 | 6777 |
order: order type: type in: aGLXWindowId |
6778 |
||
6779 |
| ctlPoints i | |
|
6780 |
ctlPoints := DoubleArray new: ctlArray size * (ctlArray first size). |
|
6781 |
i := 1. |
|
6782 |
ctlArray do: [:point | |
|
4718 | 6783 |
point do: [:coord | |
294 | 6784 |
ctlPoints at: i put: coord. |
6785 |
i := i + 1]]. |
|
6786 |
||
6787 |
%{ /* NOCONTEXT */ |
|
6788 |
#ifdef GLX |
|
6789 |
char *knotElements, *ctlElements; |
|
6790 |
OBJ cls; |
|
6791 |
int ninstVars, nInstBytes; |
|
6792 |
||
6793 |
SETWIN(aGLXWindowId) |
|
6794 |
cls = __qClass(ctlPoints); |
|
6795 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
|
6796 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
|
6797 |
||
6798 |
ctlElements = (char *)(_InstPtr(ctlPoints)) + nInstBytes; |
|
6799 |
knotElements = (char *)(_InstPtr(knotList)) + nInstBytes; |
|
6800 |
||
6801 |
nurbscurve ( |
|
6802 |
_longVal(knotCount), (double *)knotElements, |
|
4718 | 6803 |
_longVal(offset), (double *)ctlElements, |
294 | 6804 |
_longVal(order), _longVal(type)); |
6805 |
RETURN(true); |
|
6806 |
#endif |
|
6807 |
%} |
|
6808 |
. |
|
6809 |
^ false |
|
6810 |
! |
|
6811 |
||
6812 |
glxObjdeleteTag1: tag1 tag2: tag2 in: aGLXWindowId |
|
6813 |
||
6814 |
%{ /* NOCONTEXT */ |
|
6815 |
#ifdef GLX |
|
6816 |
SETWIN(aGLXWindowId) |
|
6817 |
objdelete(_tagVal(tag1), _tagVal(tag2)); |
|
6818 |
RETURN (true); |
|
6819 |
#endif |
|
6820 |
%} |
|
6821 |
. |
|
6822 |
^ false |
|
6823 |
! |
|
6824 |
||
6825 |
glxObjinsert: t in: aGLXWindowId |
|
6826 |
||
6827 |
%{ /* NOCONTEXT */ |
|
6828 |
#ifdef GLX |
|
6829 |
SETWIN(aGLXWindowId) |
|
6830 |
objinsert(_tagVal(t)); |
|
6831 |
RETURN (true); |
|
6832 |
#endif |
|
6833 |
%} |
|
6834 |
. |
|
6835 |
^ false |
|
6836 |
! |
|
6837 |
||
6838 |
glxObjreplace: t in: aGLXWindowId |
|
6839 |
||
6840 |
%{ /* NOCONTEXT */ |
|
6841 |
#ifdef GLX |
|
6842 |
SETWIN(aGLXWindowId) |
|
6843 |
objreplace(_tagVal(t)); |
|
6844 |
RETURN (true); |
|
6845 |
#endif |
|
6846 |
%} |
|
6847 |
. |
|
6848 |
^ false |
|
6849 |
! |
|
6850 |
||
6851 |
glxOnemapIn: aGLXWindowId |
|
6852 |
||
6853 |
%{ /* NOCONTEXT */ |
|
6854 |
#ifdef GLX |
|
6855 |
SETWIN(aGLXWindowId) |
|
6856 |
onemap(); |
|
6857 |
RETURN (true); |
|
6858 |
#endif |
|
6859 |
%} |
|
6860 |
. |
|
6861 |
^ false |
|
6862 |
! |
|
6863 |
||
6864 |
glxPagecolor: pcolor in: aGLXWindowId |
|
6865 |
||
6866 |
%{ /* NOCONTEXT */ |
|
6867 |
#ifdef GLX |
|
6868 |
SETWIN(aGLXWindowId) |
|
6869 |
pagecolor(_colorindexVal(pcolor)); |
|
6870 |
RETURN (true); |
|
6871 |
#endif |
|
6872 |
%} |
|
6873 |
. |
|
6874 |
^ false |
|
6875 |
! |
|
6876 |
||
6877 |
glxPassthroughToken: token in: aGLXWindowId |
|
6878 |
||
6879 |
%{ /* NOCONTEXT */ |
|
6880 |
#ifdef GLX |
|
6881 |
SETWIN(aGLXWindowId) |
|
6882 |
passthrough(_shortVal(token)); |
|
6883 |
RETURN (true); |
|
6884 |
#endif |
|
6885 |
%} |
|
6886 |
. |
|
6887 |
^ false |
|
6888 |
! |
|
6889 |
||
6890 |
glxPclosIn: aGLXWindowId |
|
6891 |
||
6892 |
%{ /* NOCONTEXT */ |
|
6893 |
#ifdef GLX |
|
6894 |
SETWIN(aGLXWindowId) |
|
6895 |
pclos(); |
|
6896 |
RETURN (true); |
|
6897 |
#endif |
|
6898 |
%} |
|
6899 |
. |
|
6900 |
^ false |
|
6901 |
! |
|
6902 |
||
6903 |
glxPicksizeX: x y: y in: aGLXWindowId |
|
6904 |
||
6905 |
%{ /* NOCONTEXT */ |
|
6906 |
#ifdef GLX |
|
6907 |
SETWIN(aGLXWindowId) |
|
6908 |
picksize(_shortVal(x), _shortVal(y)); |
|
6909 |
RETURN (true); |
|
6910 |
#endif |
|
6911 |
%} |
|
6912 |
. |
|
6913 |
^ false |
|
6914 |
! |
|
6915 |
||
6916 |
glxPixmode: mode value: value in: aGLXWindowId |
|
6917 |
||
6918 |
%{ /* NOCONTEXT */ |
|
6919 |
#ifdef GLX |
|
6920 |
SETWIN(aGLXWindowId) |
|
6921 |
pixmode(_longVal(mode), _longVal(value)); |
|
6922 |
RETURN (true); |
|
6923 |
#endif |
|
6924 |
%} |
|
6925 |
. |
|
6926 |
^ false |
|
6927 |
! |
|
6928 |
||
6929 |
glxPntsmoothMode: mode in: aGLXWindowId |
|
6930 |
||
6931 |
%{ /* NOCONTEXT */ |
|
6932 |
#ifdef GLX |
|
6933 |
SETWIN(aGLXWindowId) |
|
6934 |
pntsmooth((ulong)__intVal(mode)); |
|
6935 |
RETURN (true); |
|
6936 |
#endif |
|
6937 |
%} |
|
6938 |
. |
|
6939 |
^ false |
|
6940 |
! |
|
6941 |
||
6942 |
glxPolysmoothMode: mode in: aGLXWindowId |
|
6943 |
||
6944 |
%{ /* NOCONTEXT */ |
|
6945 |
#ifdef GLX |
|
6946 |
SETWIN(aGLXWindowId) |
|
6947 |
polysmooth(_longVal(mode)); |
|
6948 |
RETURN (true); |
|
6949 |
#endif |
|
6950 |
%} |
|
6951 |
. |
|
6952 |
^ false |
|
6953 |
! |
|
6954 |
||
6955 |
glxPopnameIn: aGLXWindowId |
|
6956 |
||
6957 |
%{ /* NOCONTEXT */ |
|
6958 |
#ifdef GLX |
|
6959 |
SETWIN(aGLXWindowId) |
|
6960 |
popname(); |
|
6961 |
RETURN (true); |
|
6962 |
#endif |
|
6963 |
%} |
|
6964 |
. |
|
6965 |
^ false |
|
6966 |
! |
|
6967 |
||
6968 |
glxPrefpositionX1: x1 x2: x2 y1: y1 y2: y2 in: aGLXWindowId |
|
6969 |
||
6970 |
%{ /* NOCONTEXT */ |
|
6971 |
SETWIN(aGLXWindowId) |
|
1932 | 6972 |
#ifdef OPENGL |
6973 |
#else |
|
294 | 6974 |
prefposition(_longVal(x1), _longVal(x2), _longVal(y1), _longVal(y2)); |
1932 | 6975 |
#endif |
294 | 6976 |
RETURN (true); |
6977 |
%} |
|
6978 |
! |
|
6979 |
||
6980 |
glxPrefsizeX: x y: y in: aGLXWindowId |
|
6981 |
||
6982 |
%{ /* NOCONTEXT */ |
|
6983 |
SETWIN(aGLXWindowId) |
|
1932 | 6984 |
#ifdef OPENGL |
6985 |
#else |
|
294 | 6986 |
prefsize(_longVal(x), _longVal(y)); |
1932 | 6987 |
#endif |
294 | 6988 |
RETURN (true); |
6989 |
%} |
|
6990 |
! |
|
6991 |
||
6992 |
glxPupmodeIn: aGLXWindowId |
|
6993 |
||
6994 |
%{ /* NOCONTEXT */ |
|
6995 |
#ifdef GLX |
|
6996 |
SETWIN(aGLXWindowId) |
|
6997 |
pupmode(); |
|
6998 |
RETURN (true); |
|
6999 |
#endif |
|
7000 |
%} |
|
7001 |
. |
|
7002 |
^ false |
|
7003 |
! |
|
7004 |
||
7005 |
glxPushname: name In: aGLXWindowId |
|
7006 |
||
7007 |
%{ /* NOCONTEXT */ |
|
7008 |
#ifdef GLX |
|
7009 |
SETWIN(aGLXWindowId) |
|
7010 |
pushname(_shortVal(name)); |
|
7011 |
RETURN (true); |
|
7012 |
#endif |
|
7013 |
%} |
|
7014 |
. |
|
7015 |
^ false |
|
7016 |
! |
|
7017 |
||
7018 |
glxQdevice: dev in: aGLXWindowId |
|
7019 |
||
7020 |
%{ /* NOCONTEXT */ |
|
1932 | 7021 |
SETWIN(aGLXWindowId) |
7022 |
#ifdef OPENGL |
|
7023 |
#else |
|
294 | 7024 |
qdevice(_deviceVal(dev)); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
7025 |
#endif |
294 | 7026 |
%} |
7027 |
! |
|
7028 |
||
7029 |
glxQenterDev: dev val: val in: aGLXWindowId |
|
7030 |
||
7031 |
%{ /* NOCONTEXT */ |
|
7032 |
SETWIN(aGLXWindowId) |
|
1932 | 7033 |
#ifdef OPENGL |
7034 |
#else |
|
294 | 7035 |
qenter(_deviceVal(dev), _shortVal(val)); |
1932 | 7036 |
#endif |
294 | 7037 |
%} |
7038 |
! |
|
7039 |
||
7040 |
glxQgetfdIn: aGLXWindowId |
|
7041 |
||
7042 |
%{ /* NOCONTEXT */ |
|
7043 |
#ifdef GLX |
|
7044 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
7045 |
RETURN (__MKSMALLINT(qgetfd())); |
294 | 7046 |
#endif |
7047 |
%} |
|
7048 |
. |
|
7049 |
^ false |
|
7050 |
! |
|
7051 |
||
7052 |
glxQreadIn: aGLXWindowId |
|
7053 |
||
7054 |
| dev data | |
|
4718 | 7055 |
%{ |
294 | 7056 |
short c_data; |
7057 |
||
7058 |
SETWIN(aGLXWindowId) |
|
1932 | 7059 |
#ifdef OPENGL |
7060 |
#else |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
7061 |
dev = __MKSMALLINT(qread(&c_data)); |
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
7062 |
data = __MKSMALLINT(c_data); |
1932 | 7063 |
#endif |
294 | 7064 |
%} |
7065 |
. |
|
7066 |
^ Array with: dev with: data |
|
7067 |
! |
|
7068 |
||
7069 |
glxQresetIn: aGLXWindowId |
|
7070 |
||
7071 |
%{ /* NOCONTEXT */ |
|
7072 |
SETWIN(aGLXWindowId) |
|
1932 | 7073 |
#ifdef OPENGL |
7074 |
#else |
|
294 | 7075 |
qreset(); |
1932 | 7076 |
#endif |
294 | 7077 |
RETURN (true); |
7078 |
%} |
|
7079 |
! |
|
7080 |
||
7081 |
glxQtestIn: aGLXWindowId |
|
7082 |
||
7083 |
%{ /* NOCONTEXT */ |
|
1932 | 7084 |
int rslt = 0; |
7085 |
||
7086 |
SETWIN(aGLXWindowId) |
|
7087 |
#ifdef OPENGL |
|
7088 |
#else |
|
7089 |
rslt = qtest(); |
|
7090 |
#endif |
|
7091 |
RETURN (__MKSMALLINT(rslt)); |
|
294 | 7092 |
%} |
7093 |
! |
|
7094 |
||
4718 | 7095 |
glxRGBcursorIndex: index red: red green: green blue: blue |
294 | 7096 |
redm: redm greenm: greenm bluem: bluem in: aGLXWindowId |
7097 |
||
7098 |
%{ /* NOCONTEXT */ |
|
7099 |
#ifdef GLX |
|
7100 |
SETWIN(aGLXWindowId) |
|
4718 | 7101 |
RGBcursor(_shortVal(index), |
7102 |
_shortVal(red), _shortVal(green), _shortVal(blue), |
|
294 | 7103 |
_shortVal(redm), _shortVal(greenm), _shortVal(bluem)); |
7104 |
RETURN (true); |
|
7105 |
#endif |
|
7106 |
%} |
|
7107 |
. |
|
7108 |
^ false |
|
7109 |
! |
|
7110 |
||
7111 |
glxRGBwritemaskRed: red green: green blue: blue in: aGLXWindowId |
|
7112 |
||
7113 |
%{ /* NOCONTEXT */ |
|
7114 |
#ifdef GLX |
|
7115 |
SETWIN(aGLXWindowId) |
|
7116 |
RGBwritemask(_shortVal(red), _shortVal(green), _shortVal(blue)); |
|
7117 |
RETURN (true); |
|
7118 |
#endif |
|
7119 |
%} |
|
7120 |
. |
|
7121 |
^ false |
|
7122 |
! |
|
7123 |
||
7124 |
glxRectzoomX: xfactor y: yfactor in: aGLXWindowId |
|
7125 |
||
7126 |
%{ /* NOCONTEXT */ |
|
7127 |
#ifdef GLX |
|
7128 |
SETWIN(aGLXWindowId) |
|
7129 |
rectzoom(_floatVal(xfactor), _floatVal(yfactor)); |
|
7130 |
RETURN (true); |
|
7131 |
#endif |
|
7132 |
%} |
|
7133 |
. |
|
7134 |
^ false |
|
7135 |
! |
|
7136 |
||
7137 |
glxResetls: b in: aGLXWindowId |
|
7138 |
||
7139 |
%{ /* NOCONTEXT */ |
|
7140 |
#ifdef GLX |
|
7141 |
SETWIN(aGLXWindowId) |
|
7142 |
resetls(_booleanVal(b)); |
|
7143 |
RETURN (true); |
|
7144 |
#endif |
|
7145 |
%} |
|
7146 |
. |
|
7147 |
^ false |
|
7148 |
! |
|
7149 |
||
7150 |
glxRingbellIn: aGLXWindowId |
|
7151 |
||
7152 |
%{ /* NOCONTEXT */ |
|
7153 |
#ifdef GLX |
|
7154 |
SETWIN(aGLXWindowId) |
|
7155 |
ringbell(); |
|
7156 |
RETURN (true); |
|
7157 |
#endif |
|
7158 |
%} |
|
7159 |
. |
|
7160 |
^ false |
|
7161 |
! |
|
7162 |
||
7163 |
glxSboxX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
7164 |
||
7165 |
%{ /* NOCONTEXT */ |
|
7166 |
#ifdef GLX |
|
7167 |
SETWIN(aGLXWindowId) |
|
7168 |
sbox(_coordVal(x1), _coordVal(y1), _coordVal(x2), _coordVal(y2)); |
|
7169 |
RETURN (true); |
|
7170 |
#endif |
|
7171 |
%} |
|
7172 |
. |
|
7173 |
^ false |
|
7174 |
! |
|
7175 |
||
7176 |
glxSboxfX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
7177 |
||
7178 |
%{ /* NOCONTEXT */ |
|
7179 |
#ifdef GLX |
|
7180 |
SETWIN(aGLXWindowId) |
|
7181 |
sboxf(_coordVal(x1), _coordVal(y1), _coordVal(x2), _coordVal(y2)); |
|
7182 |
RETURN (true); |
|
7183 |
#endif |
|
7184 |
%} |
|
7185 |
. |
|
7186 |
^ false |
|
7187 |
! |
|
7188 |
||
7189 |
glxSboxfiX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
7190 |
||
7191 |
%{ /* NOCONTEXT */ |
|
7192 |
#ifdef GLX |
|
7193 |
SETWIN(aGLXWindowId) |
|
7194 |
sboxfi(_icoordVal(x1), _icoordVal(y1), _icoordVal(x2), _icoordVal(y2)); |
|
7195 |
RETURN (true); |
|
7196 |
#endif |
|
7197 |
%} |
|
7198 |
. |
|
7199 |
^ false |
|
7200 |
! |
|
7201 |
||
7202 |
glxSboxfsX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
7203 |
||
7204 |
%{ /* NOCONTEXT */ |
|
7205 |
#ifdef GLX |
|
7206 |
SETWIN(aGLXWindowId) |
|
7207 |
sboxfs(_scoordVal(x1), _scoordVal(y1), _scoordVal(x2), _scoordVal(y2)); |
|
7208 |
RETURN (true); |
|
7209 |
#endif |
|
7210 |
%} |
|
7211 |
. |
|
7212 |
^ false |
|
7213 |
! |
|
7214 |
||
7215 |
glxSboxiX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
7216 |
||
7217 |
%{ /* NOCONTEXT */ |
|
7218 |
#ifdef GLX |
|
7219 |
SETWIN(aGLXWindowId) |
|
7220 |
sboxi(_icoordVal(x1), _icoordVal(y1), _icoordVal(x2), _icoordVal(y2)); |
|
7221 |
RETURN (true); |
|
7222 |
#endif |
|
7223 |
%} |
|
7224 |
. |
|
7225 |
^ false |
|
7226 |
! |
|
7227 |
||
7228 |
glxSboxsX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
7229 |
||
7230 |
%{ /* NOCONTEXT */ |
|
7231 |
#ifdef GLX |
|
7232 |
SETWIN(aGLXWindowId) |
|
7233 |
sboxs(_scoordVal(x1), _scoordVal(y1), _scoordVal(x2), _scoordVal(y2)); |
|
7234 |
RETURN (true); |
|
7235 |
#endif |
|
7236 |
%} |
|
7237 |
. |
|
7238 |
^ false |
|
7239 |
! |
|
7240 |
||
7241 |
glxSclearSval: sval in: aGLXWindowId |
|
7242 |
||
7243 |
%{ /* NOCONTEXT */ |
|
7244 |
#ifdef GLX |
|
7245 |
SETWIN(aGLXWindowId) |
|
7246 |
sclear((ulong)__intVal(sval)); |
|
7247 |
RETURN (true); |
|
7248 |
#endif |
|
7249 |
%} |
|
7250 |
. |
|
7251 |
^ false |
|
7252 |
! |
|
7253 |
||
7254 |
glxScrbox: arg in: aGLXWindowId |
|
7255 |
||
7256 |
%{ /* NOCONTEXT */ |
|
7257 |
#ifdef GLX |
|
7258 |
SETWIN(aGLXWindowId) |
|
7259 |
scrbox(_longVal(arg)); |
|
7260 |
RETURN (true); |
|
7261 |
#endif |
|
7262 |
%} |
|
7263 |
. |
|
7264 |
^ false |
|
7265 |
! |
|
7266 |
||
7267 |
glxScreenspaceIn: aGLXWindowId |
|
7268 |
||
7269 |
%{ /* NOCONTEXT */ |
|
7270 |
#ifdef GLX |
|
7271 |
SETWIN(aGLXWindowId) |
|
7272 |
screenspace(); |
|
7273 |
RETURN (true); |
|
7274 |
#endif |
|
7275 |
%} |
|
7276 |
. |
|
7277 |
^ false |
|
7278 |
! |
|
7279 |
||
7280 |
glxScrmaskLeft: left right: right bottom: bottom top: top in: aGLXWindowId |
|
7281 |
||
7282 |
%{ /* NOCONTEXT */ |
|
7283 |
#ifdef GLX |
|
7284 |
SETWIN(aGLXWindowId) |
|
4718 | 7285 |
scrmask(_screencoordVal(left), _screencoordVal(right), |
294 | 7286 |
_screencoordVal(bottom), _screencoordVal(top)); |
7287 |
RETURN (true); |
|
7288 |
#endif |
|
7289 |
%} |
|
7290 |
. |
|
7291 |
^ false |
|
7292 |
! |
|
7293 |
||
7294 |
glxScrnattach: gsnr in: aGLXWindowId |
|
7295 |
||
7296 |
%{ /* NOCONTEXT */ |
|
7297 |
#ifdef GLX |
|
7298 |
SETWIN(aGLXWindowId) |
|
7299 |
scrnattach(_longVal(gsnr)); |
|
7300 |
RETURN (true); |
|
7301 |
#endif |
|
7302 |
%} |
|
7303 |
. |
|
7304 |
^ false |
|
7305 |
! |
|
7306 |
||
7307 |
glxScrnselect: gsnr in: aGLXWindowId |
|
7308 |
||
7309 |
%{ /* NOCONTEXT */ |
|
7310 |
#ifdef GLX |
|
7311 |
SETWIN(aGLXWindowId) |
|
7312 |
scrnselect(_longVal(gsnr)); |
|
7313 |
RETURN (true); |
|
7314 |
#endif |
|
7315 |
%} |
|
7316 |
. |
|
7317 |
^ false |
|
7318 |
! |
|
7319 |
||
7320 |
glxSetcursorIndex: index color: color wtn: wtn in: aGLXWindowId |
|
7321 |
||
7322 |
%{ /* NOCONTEXT */ |
|
7323 |
#ifdef GLX |
|
7324 |
SETWIN(aGLXWindowId) |
|
7325 |
setcursor(_shortVal(index), _colorindexVal(color), _colorindexVal(wtn)); |
|
7326 |
RETURN (true); |
|
7327 |
#endif |
|
7328 |
%} |
|
7329 |
. |
|
7330 |
^ false |
|
7331 |
! |
|
7332 |
||
7333 |
glxSetdblightsMask: mask in: aGLXWindowId |
|
7334 |
||
7335 |
%{ /* NOCONTEXT */ |
|
7336 |
#ifdef GLX |
|
7337 |
SETWIN(aGLXWindowId) |
|
7338 |
setdblights((ulong)__intVal(mask)); |
|
7339 |
RETURN (true); |
|
7340 |
#endif |
|
7341 |
%} |
|
7342 |
. |
|
7343 |
^ false |
|
7344 |
! |
|
7345 |
||
2422
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
7346 |
glxSetdepthNear:znear far:zfar in: aGLXWindowId |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
7347 |
|
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
7348 |
%{ /* NOCONTEXT */ |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
7349 |
#ifdef GLX |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
7350 |
SETWIN(aGLXWindowId) |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
7351 |
setdepth(_screencoordVal(znear), _screencoordVal(zfar)); |
294 | 7352 |
RETURN (true); |
7353 |
#endif |
|
7354 |
%} |
|
7355 |
. |
|
7356 |
^ false |
|
7357 |
! |
|
7358 |
||
7359 |
glxSetmap: mapnum in: aGLXWindowId |
|
7360 |
||
7361 |
%{ /* NOCONTEXT */ |
|
7362 |
#ifdef GLX |
|
7363 |
SETWIN(aGLXWindowId) |
|
7364 |
setmap(_shortVal(mapnum)); |
|
7365 |
RETURN (true); |
|
7366 |
#endif |
|
7367 |
%} |
|
7368 |
. |
|
7369 |
^ false |
|
7370 |
! |
|
7371 |
||
7372 |
glxSetmonitor: mtype in: aGLXWindowId |
|
7373 |
||
7374 |
%{ /* NOCONTEXT */ |
|
7375 |
#ifdef GLX |
|
7376 |
SETWIN(aGLXWindowId) |
|
7377 |
setmonitor(_shortVal(mtype)); |
|
7378 |
RETURN (true); |
|
7379 |
#endif |
|
7380 |
%} |
|
7381 |
. |
|
7382 |
^ false |
|
7383 |
! |
|
7384 |
||
7385 |
glxSetnurbsproperty: property value: value in: aGLXWindowId |
|
7386 |
||
7387 |
%{ /* NOCONTEXT */ |
|
7388 |
#ifdef GLX |
|
7389 |
SETWIN(aGLXWindowId) |
|
7390 |
setnurbsproperty(_longVal(property), _floatVal(value)); |
|
7391 |
RETURN (true); |
|
7392 |
#endif |
|
7393 |
%} |
|
7394 |
. |
|
7395 |
^ false |
|
7396 |
! |
|
7397 |
||
7398 |
glxSetpattern: index in: aGLXWindowId |
|
7399 |
||
7400 |
%{ /* NOCONTEXT */ |
|
7401 |
#ifdef GLX |
|
7402 |
SETWIN(aGLXWindowId) |
|
7403 |
setpattern(_shortVal(index)); |
|
7404 |
RETURN (true); |
|
7405 |
#endif |
|
7406 |
%} |
|
7407 |
. |
|
7408 |
^ false |
|
7409 |
! |
|
7410 |
||
7411 |
glxSetpup: pup entry: entry mode: mode in: aGLXWindowId |
|
7412 |
||
7413 |
%{ /* NOCONTEXT */ |
|
7414 |
#ifdef GLX |
|
7415 |
SETWIN(aGLXWindowId) |
|
7416 |
setpup(_longVal(pup), _longVal(entry), (ulong)__intVal(mode)); |
|
7417 |
RETURN (true); |
|
7418 |
#endif |
|
7419 |
%} |
|
7420 |
. |
|
7421 |
^ false |
|
7422 |
! |
|
7423 |
||
7424 |
glxSetvaluator: v init: init vmin: vmin vmax: vmax in: aGLXWindowId |
|
7425 |
||
7426 |
%{ /* NOCONTEXT */ |
|
7427 |
#ifdef GLX |
|
7428 |
SETWIN(aGLXWindowId) |
|
7429 |
setvaluator(_deviceVal(v), _shortVal(init), _shortVal(vmin), _shortVal(vmax)); |
|
7430 |
RETURN (true); |
|
7431 |
#endif |
|
7432 |
%} |
|
7433 |
. |
|
7434 |
^ false |
|
7435 |
! |
|
7436 |
||
7437 |
glxSetvideo: reg value: value in: aGLXWindowId |
|
7438 |
||
7439 |
%{ /* NOCONTEXT */ |
|
7440 |
#ifdef GLX |
|
7441 |
SETWIN(aGLXWindowId) |
|
7442 |
setvideo(_longVal(reg), _longVal(value)); |
|
7443 |
RETURN (true); |
|
7444 |
#endif |
|
7445 |
%} |
|
7446 |
. |
|
7447 |
^ false |
|
7448 |
! |
|
7449 |
||
7450 |
glxShademodel: model in: aGLXWindowId |
|
7451 |
||
7452 |
%{ /* NOCONTEXT */ |
|
7453 |
#ifdef GLX |
|
7454 |
SETWIN(aGLXWindowId) |
|
7455 |
shademodel(_longVal(model)); |
|
7456 |
RETURN (true); |
|
7457 |
#endif |
|
7458 |
%} |
|
7459 |
. |
|
7460 |
^ false |
|
7461 |
! |
|
7462 |
||
7463 |
glxShaderangeLowin: lowin hiwin: hiwin z1: z1 z2: z2 in: aGLXWindowId |
|
7464 |
||
7465 |
%{ /* NOCONTEXT */ |
|
7466 |
#ifdef GLX |
|
7467 |
SETWIN(aGLXWindowId) |
|
4718 | 7468 |
shaderange(_colorindexVal(lowin), _colorindexVal(hiwin), |
294 | 7469 |
_screencoordVal(z1), _screencoordVal(z2)); |
7470 |
RETURN (true); |
|
7471 |
#endif |
|
7472 |
%} |
|
7473 |
. |
|
7474 |
^ false |
|
7475 |
! |
|
7476 |
||
7477 |
glxSmoothline: mode in: aGLXWindowId |
|
7478 |
||
7479 |
%{ /* NOCONTEXT */ |
|
7480 |
#ifdef GLX |
|
7481 |
SETWIN(aGLXWindowId) |
|
7482 |
smoothline(_longVal(mode)); |
|
7483 |
RETURN (true); |
|
7484 |
#endif |
|
7485 |
%} |
|
7486 |
. |
|
7487 |
^ false |
|
7488 |
! |
|
7489 |
||
4718 | 7490 |
glxStencilEnable: enable ref: ref func: func mask: mask fail: fail |
294 | 7491 |
pass: pass zpass: zpass in: aGLXWindowId |
7492 |
||
7493 |
%{ /* NOCONTEXT */ |
|
7494 |
#ifdef GLX |
|
7495 |
SETWIN(aGLXWindowId) |
|
4718 | 7496 |
stencil(_longVal(enable), (ulong)__intVal(ref), _longVal(func), |
294 | 7497 |
(ulong)__intVal(mask), _longVal(fail), _longVal(pass), _longVal(zpass)); |
7498 |
RETURN (true); |
|
7499 |
#endif |
|
7500 |
%} |
|
7501 |
. |
|
7502 |
^ false |
|
7503 |
! |
|
7504 |
||
7505 |
glxStensize: planes in: aGLXWindowId |
|
7506 |
||
7507 |
%{ /* NOCONTEXT */ |
|
7508 |
#ifdef GLX |
|
7509 |
SETWIN(aGLXWindowId) |
|
7510 |
stensize(_longVal(planes)); |
|
7511 |
RETURN (true); |
|
7512 |
#endif |
|
7513 |
%} |
|
7514 |
. |
|
7515 |
^ false |
|
7516 |
! |
|
7517 |
||
7518 |
glxStepunitX: x y: y in: aGLXWindowId |
|
7519 |
||
7520 |
%{ /* NOCONTEXT */ |
|
7521 |
#ifdef GLX |
|
7522 |
SETWIN(aGLXWindowId) |
|
7523 |
stepunit(_longVal(x), _longVal(y)); |
|
7524 |
RETURN (true); |
|
7525 |
#endif |
|
7526 |
%} |
|
7527 |
. |
|
7528 |
^ false |
|
7529 |
! |
|
7530 |
||
7531 |
glxSubpixel: b in: aGLXWindowId |
|
7532 |
||
7533 |
%{ /* NOCONTEXT */ |
|
7534 |
#ifdef GLX |
|
7535 |
SETWIN(aGLXWindowId) |
|
7536 |
subpixel(_booleanVal(b)); |
|
7537 |
RETURN (true); |
|
7538 |
#endif |
|
7539 |
%} |
|
7540 |
. |
|
7541 |
^ false |
|
7542 |
! |
|
7543 |
||
7544 |
glxSwapinterval: i in: aGLXWindowId |
|
7545 |
||
7546 |
%{ /* NOCONTEXT */ |
|
7547 |
#ifdef GLX |
|
7548 |
SETWIN(aGLXWindowId) |
|
7549 |
swapinterval(_shortVal(i)); |
|
7550 |
RETURN (true); |
|
7551 |
#endif |
|
7552 |
%} |
|
7553 |
. |
|
7554 |
^ false |
|
7555 |
! |
|
7556 |
||
7557 |
glxSwaptmeshIn: aGLXWindowId |
|
7558 |
||
7559 |
%{ /* NOCONTEXT */ |
|
7560 |
#ifdef GLX |
|
7561 |
SETWIN(aGLXWindowId) |
|
7562 |
swaptmesh(); |
|
7563 |
RETURN (true); |
|
7564 |
#endif |
|
7565 |
%} |
|
7566 |
. |
|
7567 |
^ false |
|
7568 |
! |
|
7569 |
||
7570 |
glxSwinopen: parent in: aGLXWindowId |
|
7571 |
||
7572 |
%{ /* NOCONTEXT */ |
|
7573 |
#ifdef GLX |
|
7574 |
SETWIN(aGLXWindowId) |
|
7575 |
swinopen(_longVal(parent)); |
|
7576 |
RETURN (true); |
|
7577 |
#endif |
|
7578 |
%} |
|
7579 |
. |
|
7580 |
^ false |
|
7581 |
! |
|
7582 |
||
7583 |
glxSwritemask: mask in: aGLXWindowId |
|
7584 |
||
7585 |
%{ /* NOCONTEXT */ |
|
7586 |
#ifdef GLX |
|
7587 |
SETWIN(aGLXWindowId) |
|
7588 |
swritemask((ulong)__intVal(mask)); |
|
7589 |
RETURN (true); |
|
7590 |
#endif |
|
7591 |
%} |
|
7592 |
. |
|
7593 |
^ false |
|
7594 |
! |
|
7595 |
||
7596 |
glxTextinitIn: aGLXWindowId |
|
7597 |
||
7598 |
%{ /* NOCONTEXT */ |
|
7599 |
#ifdef GLX |
|
7600 |
SETWIN(aGLXWindowId) |
|
7601 |
textinit(); |
|
7602 |
RETURN (true); |
|
7603 |
#endif |
|
7604 |
%} |
|
7605 |
. |
|
7606 |
^ false |
|
7607 |
! |
|
7608 |
||
7609 |
glxTextportLeft: left right: right bottom: bottom top: top in: aGLXWindowId |
|
7610 |
||
7611 |
%{ /* NOCONTEXT */ |
|
7612 |
#ifdef GLX |
|
7613 |
SETWIN(aGLXWindowId) |
|
4718 | 7614 |
textport(_screencoordVal(left), _screencoordVal(right), |
294 | 7615 |
_screencoordVal(bottom), _screencoordVal(top)); |
7616 |
RETURN (true); |
|
7617 |
#endif |
|
7618 |
%} |
|
7619 |
. |
|
7620 |
^ false |
|
7621 |
! |
|
7622 |
||
7623 |
glxTieB: b v1: v1 v2: v2 in: aGLXWindowId |
|
7624 |
||
7625 |
%{ /* NOCONTEXT */ |
|
7626 |
#ifdef GLX |
|
7627 |
SETWIN(aGLXWindowId) |
|
7628 |
tie(_deviceVal(b), _deviceVal(v1), _deviceVal(v2)); |
|
7629 |
RETURN (true); |
|
7630 |
#endif |
|
7631 |
%} |
|
7632 |
. |
|
7633 |
^ false |
|
7634 |
! |
|
7635 |
||
7636 |
glxTlutbind: target index: index in: aGLXWindowId |
|
7637 |
||
7638 |
%{ /* NOCONTEXT */ |
|
7639 |
#ifdef FULL_GLX |
|
7640 |
SETWIN(aGLXWindowId) |
|
7641 |
tlutbind(_longVal(target), _longVal(index)); |
|
7642 |
RETURN (true); |
|
7643 |
#endif |
|
7644 |
%} |
|
7645 |
. |
|
7646 |
^ false |
|
7647 |
! |
|
7648 |
||
7649 |
glxTpoffIn: aGLXWindowId |
|
7650 |
||
7651 |
%{ /* NOCONTEXT */ |
|
7652 |
#ifdef GLX |
|
7653 |
SETWIN(aGLXWindowId) |
|
7654 |
tpoff(); |
|
7655 |
RETURN (true); |
|
7656 |
#endif |
|
7657 |
%} |
|
7658 |
. |
|
7659 |
^ false |
|
7660 |
! |
|
7661 |
||
7662 |
glxTponIn: aGLXWindowId |
|
7663 |
||
7664 |
%{ /* NOCONTEXT */ |
|
7665 |
#ifdef GLX |
|
7666 |
SETWIN(aGLXWindowId) |
|
7667 |
tpon(); |
|
7668 |
RETURN (true); |
|
7669 |
#endif |
|
7670 |
%} |
|
7671 |
. |
|
7672 |
^ false |
|
7673 |
! |
|
7674 |
||
7675 |
glxUnqdevice: dev in: aGLXWindowId |
|
7676 |
||
7677 |
%{ /* NOCONTEXT */ |
|
1932 | 7678 |
SETWIN(aGLXWindowId) |
7679 |
#ifdef OPENGL |
|
7680 |
#else |
|
294 | 7681 |
unqdevice(_deviceVal(dev)); |
1932 | 7682 |
#endif |
7683 |
%} |
|
294 | 7684 |
! |
7685 |
||
7686 |
glxWmpack: pack in: aGLXWindowId |
|
7687 |
||
7688 |
%{ /* NOCONTEXT */ |
|
7689 |
#ifdef GLX |
|
7690 |
SETWIN(aGLXWindowId) |
|
7691 |
wmpack((ulong)__intVal(pack)); |
|
7692 |
RETURN (true); |
|
7693 |
#endif |
|
7694 |
%} |
|
7695 |
. |
|
7696 |
^ false |
|
7697 |
! |
|
7698 |
||
7699 |
glxWritemask: wtm in: aGLXWindowId |
|
7700 |
||
7701 |
%{ /* NOCONTEXT */ |
|
7702 |
#ifdef GLX |
|
7703 |
SETWIN(aGLXWindowId) |
|
7704 |
writemask(_colorindexVal(wtm)); |
|
7705 |
RETURN (true); |
|
7706 |
#endif |
|
7707 |
%} |
|
7708 |
. |
|
7709 |
^ false |
|
7710 |
! |
|
7711 |
||
7712 |
glxXfpt2X: x y: y in: aGLXWindowId |
|
7713 |
||
7714 |
%{ /* NOCONTEXT */ |
|
7715 |
#ifdef GLX |
|
7716 |
Coord c_x, c_y; |
|
7717 |
||
7718 |
_COORD_ (x, c_x) |
|
7719 |
_COORD_ (y, c_y) |
|
7720 |
SETWIN(aGLXWindowId) |
|
7721 |
xfpt2(c_x, c_y); |
|
7722 |
RETURN (true); |
|
7723 |
#endif |
|
7724 |
%} |
|
7725 |
. |
|
7726 |
^ false |
|
7727 |
! |
|
7728 |
||
7729 |
glxXfpt2iX: x y: y in: aGLXWindowId |
|
7730 |
||
7731 |
%{ /* NOCONTEXT */ |
|
7732 |
#ifdef GLX |
|
7733 |
Icoord c_x, c_y; |
|
7734 |
||
7735 |
_ICOORD_ (x, c_x) |
|
7736 |
_ICOORD_ (y, c_y) |
|
7737 |
SETWIN(aGLXWindowId) |
|
7738 |
xfpt2i(c_x, c_y); |
|
7739 |
RETURN (true); |
|
7740 |
#endif |
|
7741 |
%} |
|
7742 |
. |
|
7743 |
^ false |
|
7744 |
! |
|
7745 |
||
7746 |
glxXfpt2sX: x y: y in: aGLXWindowId |
|
7747 |
||
7748 |
%{ /* NOCONTEXT */ |
|
7749 |
#ifdef GLX |
|
7750 |
Scoord c_x, c_y; |
|
7751 |
||
7752 |
_SCOORD_ (x, c_x) |
|
7753 |
_SCOORD_ (y, c_y) |
|
7754 |
SETWIN(aGLXWindowId) |
|
7755 |
xfpt2s(c_x, c_y); |
|
7756 |
RETURN (true); |
|
7757 |
#endif |
|
7758 |
%} |
|
7759 |
. |
|
7760 |
^ false |
|
7761 |
! |
|
7762 |
||
7763 |
glxXfpt4X: x y: y z: z w: w in: aGLXWindowId |
|
7764 |
||
7765 |
%{ /* NOCONTEXT */ |
|
7766 |
#ifdef GLX |
|
7767 |
Coord c_x, c_y, c_z, c_w; |
|
7768 |
||
7769 |
_COORD_ (x, c_x) |
|
7770 |
_COORD_ (y, c_y) |
|
7771 |
_COORD_ (z, c_z) |
|
7772 |
_COORD_ (w, c_w) |
|
7773 |
SETWIN(aGLXWindowId) |
|
7774 |
xfpt4(c_x, c_y, c_z, c_w); |
|
7775 |
RETURN (true); |
|
7776 |
#endif |
|
7777 |
%} |
|
7778 |
. |
|
7779 |
^ false |
|
7780 |
! |
|
7781 |
||
7782 |
glxXfpt4iX: x y: y z: z w: w in: aGLXWindowId |
|
7783 |
||
7784 |
%{ /* NOCONTEXT */ |
|
7785 |
#ifdef GLX |
|
7786 |
Icoord c_x, c_y, c_z, c_w; |
|
7787 |
||
7788 |
_ICOORD_ (x, c_x) |
|
7789 |
_ICOORD_ (y, c_y) |
|
7790 |
_ICOORD_ (z, c_z) |
|
7791 |
_ICOORD_ (w, c_w) |
|
7792 |
SETWIN(aGLXWindowId) |
|
7793 |
xfpt4i(c_x, c_y, c_z, c_w); |
|
7794 |
RETURN (true); |
|
7795 |
#endif |
|
7796 |
%} |
|
7797 |
. |
|
7798 |
^ false |
|
7799 |
! |
|
7800 |
||
7801 |
glxXfpt4sX: x y: y z: z w: w in: aGLXWindowId |
|
7802 |
||
7803 |
%{ /* NOCONTEXT */ |
|
7804 |
#ifdef GLX |
|
7805 |
Scoord c_x, c_y, c_z, c_w; |
|
7806 |
||
7807 |
_SCOORD_ (x, c_x) |
|
7808 |
_SCOORD_ (y, c_y) |
|
7809 |
_SCOORD_ (z, c_z) |
|
7810 |
_SCOORD_ (w, c_w) |
|
7811 |
SETWIN(aGLXWindowId) |
|
7812 |
xfpt4s(c_x, c_y, c_z, c_w); |
|
7813 |
RETURN (true); |
|
7814 |
#endif |
|
7815 |
%} |
|
7816 |
. |
|
7817 |
^ false |
|
7818 |
! |
|
7819 |
||
7820 |
glxXfptX: x y: y z: z in: aGLXWindowId |
|
7821 |
||
7822 |
%{ /* NOCONTEXT */ |
|
7823 |
#ifdef GLX |
|
7824 |
Coord c_x, c_y, c_z; |
|
7825 |
||
7826 |
_COORD_ (x, c_x) |
|
7827 |
_COORD_ (y, c_y) |
|
7828 |
_COORD_ (z, c_z) |
|
7829 |
SETWIN(aGLXWindowId) |
|
7830 |
xfpt(c_x, c_y, c_z); |
|
7831 |
RETURN (true); |
|
7832 |
#endif |
|
7833 |
%} |
|
7834 |
. |
|
7835 |
^ false |
|
7836 |
! |
|
7837 |
||
7838 |
glxXfptiX: x y: y z: z in: aGLXWindowId |
|
7839 |
||
7840 |
%{ /* NOCONTEXT */ |
|
7841 |
#ifdef GLX |
|
7842 |
Icoord c_x, c_y, c_z; |
|
7843 |
||
7844 |
_ICOORD_ (x, c_x) |
|
7845 |
_ICOORD_ (y, c_y) |
|
7846 |
_ICOORD_ (z, c_z) |
|
7847 |
SETWIN(aGLXWindowId) |
|
7848 |
xfpti(c_x, c_y, c_z); |
|
7849 |
RETURN (true); |
|
7850 |
#endif |
|
7851 |
%} |
|
7852 |
. |
|
7853 |
^ false |
|
7854 |
! |
|
7855 |
||
7856 |
glxXfptsX: x y: y z: z in: aGLXWindowId |
|
7857 |
||
7858 |
%{ /* NOCONTEXT */ |
|
7859 |
#ifdef GLX |
|
7860 |
Scoord c_x, c_y, c_z; |
|
7861 |
||
7862 |
_SCOORD_ (x, c_x) |
|
7863 |
_SCOORD_ (y, c_y) |
|
7864 |
_SCOORD_ (z, c_z) |
|
7865 |
SETWIN(aGLXWindowId) |
|
7866 |
xfpts(c_x, c_y, c_z); |
|
7867 |
RETURN (true); |
|
7868 |
#endif |
|
7869 |
%} |
|
7870 |
. |
|
7871 |
^ false |
|
7872 |
! ! |
|
7873 |
||
7874 |
!GLXWorkstation methodsFor:'vertex data transfer'! |
|
7875 |
||
7876 |
glxN3f:arrayOf3Floats in:aGLXWindowId |
|
7877 |
"argument must be an array of 3 floats containing the |
|
7878 |
current vertex normal - in real GL only" |
|
7879 |
||
7880 |
%{ /* NOCONTEXT */ |
|
7881 |
#ifdef GLX |
|
7882 |
float vec[3], *v; |
|
7883 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
7884 |
if (! (v = __glx_getFloatsFromInto(arrayOf3Floats, vec, 3))) RETURN(false); |
294 | 7885 |
SETWIN(aGLXWindowId) |
7886 |
n3f(v); |
|
7887 |
RETURN (true); |
|
7888 |
#endif |
|
7889 |
%} |
|
7890 |
. |
|
7891 |
^ false |
|
7892 |
! |
|
7893 |
||
7894 |
glxV2d:v in:aGLXWindowId |
|
7895 |
"pass a vertex; v must be a vector with 2 doubles; z is taken as 0" |
|
7896 |
||
7897 |
%{ /* NOCONTEXT */ |
|
7898 |
double vec[2], *c_v; |
|
7899 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
7900 |
if (! (c_v = __glx_getDoublesFromInto(v, vec, 2))) RETURN(false); |
294 | 7901 |
SETWIN(aGLXWindowId) |
1932 | 7902 |
#ifdef OPENGL |
7903 |
#else |
|
294 | 7904 |
v2d(c_v); |
1932 | 7905 |
#endif |
294 | 7906 |
RETURN (true); |
7907 |
%} |
|
7908 |
! |
|
7909 |
||
7910 |
glxV2f:v in:aGLXWindowId |
|
7911 |
"pass a vertex; v must be a vector with 2 floats; z is taken as 0" |
|
7912 |
||
7913 |
%{ /* NOCONTEXT */ |
|
7914 |
float vec[2], *c_v; |
|
7915 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
7916 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 2))) RETURN(false); |
294 | 7917 |
SETWIN(aGLXWindowId) |
1932 | 7918 |
#ifdef OPENGL |
7919 |
#else |
|
294 | 7920 |
v2f(c_v); |
1932 | 7921 |
#endif |
294 | 7922 |
RETURN (true); |
7923 |
%} |
|
7924 |
! |
|
7925 |
||
7926 |
glxV2fX:x y:y in:aGLXWindowId |
|
7927 |
"pass a vertex from individual x and y values; z is taken as 0.0" |
|
7928 |
||
7929 |
%{ /* NOCONTEXT */ |
|
7930 |
float vec[2]; |
|
7931 |
||
7932 |
_FLOAT_(x, vec[0]) |
|
7933 |
_FLOAT_(y, vec[1]) |
|
7934 |
SETWIN(aGLXWindowId) |
|
1932 | 7935 |
#ifdef OPENGL |
7936 |
#else |
|
294 | 7937 |
v2f(vec); |
1932 | 7938 |
#endif |
294 | 7939 |
RETURN (true); |
7940 |
%} |
|
7941 |
! |
|
7942 |
||
7943 |
glxV2i:v in:aGLXWindowId |
|
7944 |
"pass a vertex; v must be a vector with 2 longs; z is taken as 0" |
|
7945 |
||
7946 |
%{ /* NOCONTEXT */ |
|
7947 |
long vec[2], *c_v; |
|
7948 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
7949 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 2))) RETURN(false); |
294 | 7950 |
SETWIN(aGLXWindowId) |
1932 | 7951 |
#ifdef OPENGL |
7952 |
#else |
|
294 | 7953 |
v2i(c_v); |
1932 | 7954 |
#endif |
294 | 7955 |
RETURN (true); |
7956 |
%} |
|
7957 |
! |
|
7958 |
||
7959 |
glxV2s:v in:aGLXWindowId |
|
7960 |
"pass a vertex; v must be a vector with 2 shorts; z is taken as 0" |
|
7961 |
||
7962 |
%{ /* NOCONTEXT */ |
|
7963 |
short vec[2], *c_v; |
|
7964 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
7965 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 2))) RETURN(false); |
294 | 7966 |
SETWIN(aGLXWindowId) |
1932 | 7967 |
#ifdef OPENGL |
7968 |
#else |
|
294 | 7969 |
v2s(c_v); |
1932 | 7970 |
#endif |
294 | 7971 |
RETURN (true); |
7972 |
%} |
|
7973 |
! |
|
7974 |
||
7975 |
glxV3d:v in:aGLXWindowId |
|
7976 |
"pass a vertex; v must be a 3-element double-vector" |
|
7977 |
||
7978 |
%{ /* NOCONTEXT */ |
|
7979 |
double vec[3], *c_v; |
|
7980 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
7981 |
if (! (c_v = __glx_getDoublesFromInto(v, vec, 3))) RETURN(false); |
294 | 7982 |
SETWIN(aGLXWindowId) |
1932 | 7983 |
#ifdef OPENGL |
7984 |
#else |
|
294 | 7985 |
v3d(c_v); |
1932 | 7986 |
#endif |
294 | 7987 |
RETURN (true); |
7988 |
%} |
|
7989 |
. |
|
7990 |
^ false |
|
7991 |
! |
|
7992 |
||
7993 |
glxV3f:v in:aGLXWindowId |
|
7994 |
"pass a vertex; v must be a 3-element float-vector" |
|
7995 |
||
7996 |
%{ /* NOCONTEXT */ |
|
7997 |
float vec[3], *c_v; |
|
7998 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
7999 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 3))) RETURN(false); |
294 | 8000 |
SETWIN(aGLXWindowId) |
1932 | 8001 |
#ifdef OPENGL |
8002 |
#else |
|
294 | 8003 |
v3f(c_v); |
1932 | 8004 |
#endif |
294 | 8005 |
RETURN (true); |
8006 |
%} |
|
8007 |
! |
|
8008 |
||
8009 |
glxV3fX:x y:y z:z in: aGLXWindowId |
|
8010 |
"pass a vector from individual x, y and z (float) values" |
|
8011 |
||
8012 |
%{ /* NOCONTEXT */ |
|
8013 |
float vec[3]; |
|
8014 |
||
8015 |
_FLOAT_(x, vec[0]) |
|
8016 |
_FLOAT_(y, vec[1]) |
|
8017 |
_FLOAT_(z, vec[2]) |
|
8018 |
SETWIN(aGLXWindowId) |
|
1932 | 8019 |
#ifdef OPENGL |
8020 |
#else |
|
294 | 8021 |
v3f(vec); |
1932 | 8022 |
#endif |
294 | 8023 |
RETURN (true); |
8024 |
%} |
|
8025 |
! |
|
8026 |
||
8027 |
glxV3i:v in:aGLXWindowId |
|
8028 |
"pass a vertex; v must be a vector with 3 longs" |
|
8029 |
||
8030 |
%{ /* NOCONTEXT */ |
|
8031 |
long vec[3], *c_v; |
|
8032 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8033 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 3))) RETURN(false); |
294 | 8034 |
SETWIN(aGLXWindowId) |
1932 | 8035 |
#ifdef OPENGL |
8036 |
#else |
|
294 | 8037 |
v3i(c_v); |
1932 | 8038 |
#endif |
294 | 8039 |
RETURN (true); |
8040 |
%} |
|
8041 |
! |
|
8042 |
||
8043 |
glxV3s:v in:aGLXWindowId |
|
8044 |
"pass a vertex; v must be a vector with 3 shorts" |
|
8045 |
||
8046 |
%{ /* NOCONTEXT */ |
|
8047 |
short vec[3], *c_v; |
|
8048 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8049 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 3))) RETURN(false); |
294 | 8050 |
SETWIN(aGLXWindowId) |
1932 | 8051 |
#ifdef OPENGL |
8052 |
#else |
|
294 | 8053 |
v3s(c_v); |
1932 | 8054 |
#endif |
294 | 8055 |
RETURN (true); |
8056 |
%} |
|
8057 |
! |
|
8058 |
||
8059 |
glxV4d:v in:aGLXWindowId |
|
8060 |
"pass a vertex; v must be a 4-element double-vector, |
|
8061 |
containing x, y, z and w" |
|
8062 |
||
8063 |
%{ /* NOCONTEXT */ |
|
8064 |
double vec[4], *c_v; |
|
8065 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8066 |
if (! (c_v = __glx_getDoublesFromInto(v, vec, 4))) RETURN(false); |
294 | 8067 |
SETWIN(aGLXWindowId) |
1932 | 8068 |
#ifdef OPENGL |
8069 |
#else |
|
294 | 8070 |
v4d(c_v); |
1932 | 8071 |
#endif |
294 | 8072 |
RETURN (true); |
8073 |
%} |
|
8074 |
! |
|
8075 |
||
8076 |
glxV4f:v in:aGLXWindowId |
|
8077 |
"pass a vertex; v must be a 4-element float-vector, |
|
8078 |
containing x, y, z and w" |
|
8079 |
||
8080 |
%{ /* NOCONTEXT */ |
|
8081 |
float vec[4], *c_v; |
|
8082 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8083 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 4))) RETURN(false); |
294 | 8084 |
SETWIN(aGLXWindowId) |
1932 | 8085 |
#ifdef OPENGL |
8086 |
#else |
|
294 | 8087 |
v4f(c_v); |
1932 | 8088 |
#endif |
294 | 8089 |
RETURN (true); |
8090 |
%} |
|
8091 |
! |
|
8092 |
||
8093 |
glxV4i:v in:aGLXWindowId |
|
8094 |
"pass a vertex; v must be a 4-element int-vector, |
|
8095 |
containing x, y, z and w" |
|
8096 |
||
8097 |
%{ /* NOCONTEXT */ |
|
8098 |
long vec[4], *c_v; |
|
8099 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8100 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 4))) RETURN(false); |
294 | 8101 |
SETWIN(aGLXWindowId) |
1932 | 8102 |
#ifdef OPENGL |
8103 |
#else |
|
294 | 8104 |
v4i(c_v); |
1932 | 8105 |
#endif |
294 | 8106 |
RETURN (true); |
8107 |
%} |
|
8108 |
! |
|
8109 |
||
8110 |
glxV4s:v in:aGLXWindowId |
|
8111 |
"pass a vertex; v must be a 4-element short-vector, |
|
8112 |
containing x, y, z and w" |
|
8113 |
||
8114 |
%{ /* NOCONTEXT */ |
|
8115 |
short vec[4], *c_v; |
|
8116 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8117 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 4))) RETURN(false); |
294 | 8118 |
SETWIN(aGLXWindowId) |
1932 | 8119 |
#ifdef OPENGL |
8120 |
#else |
|
294 | 8121 |
v4s(c_v); |
1932 | 8122 |
#endif |
294 | 8123 |
RETURN (true); |
8124 |
%} |
|
8125 |
! |
|
8126 |
||
8127 |
glxVOriginIn:aGLXWindowId |
|
8128 |
"pass a 0.0/0.0/0.0 vector. |
|
8129 |
This is the same as v3f:#(0.0 0.0 0.0), but, since its so |
|
8130 |
common, this somewhat faster method has been provided" |
|
8131 |
||
8132 |
%{ /* NOCONTEXT */ |
|
8133 |
static float vec[3] = {0.0, 0.0, 0.0}; |
|
8134 |
||
8135 |
SETWIN(aGLXWindowId) |
|
1932 | 8136 |
#ifdef OPENGL |
8137 |
#else |
|
294 | 8138 |
v3f(vec); |
1932 | 8139 |
#endif |
294 | 8140 |
RETURN (true); |
8141 |
%} |
|
8142 |
! |
|
8143 |
||
8144 |
glxVUnitXIn:aGLXWindowId |
|
8145 |
"pass a 1.0/0.0/0.0 vector. |
|
8146 |
This is the same as v3f:#(1.0 0.0 0.0), but, since its so |
|
8147 |
common, this somewhat faster method has been provided" |
|
8148 |
||
8149 |
%{ /* NOCONTEXT */ |
|
8150 |
static float vec[3] = {1.0, 0.0, 0.0}; |
|
8151 |
||
8152 |
SETWIN(aGLXWindowId) |
|
1932 | 8153 |
#ifdef OPENGL |
8154 |
#else |
|
294 | 8155 |
v3f(vec); |
1932 | 8156 |
#endif |
294 | 8157 |
RETURN (true); |
8158 |
%} |
|
8159 |
! |
|
8160 |
||
8161 |
glxVUnitYIn:aGLXWindowId |
|
8162 |
"pass a 0.0/1.0/0.0 vector. |
|
8163 |
This is the same as v3f:#(0.0 1.0 0.0), but, since its so |
|
8164 |
common, this somewhat faster method has been provided" |
|
8165 |
||
8166 |
%{ /* NOCONTEXT */ |
|
8167 |
static float vec[3] = {0.0, 1.0, 0.0}; |
|
8168 |
||
8169 |
SETWIN(aGLXWindowId) |
|
1932 | 8170 |
#ifdef OPENGL |
8171 |
#else |
|
294 | 8172 |
v3f(vec); |
1932 | 8173 |
#endif |
294 | 8174 |
RETURN (true); |
8175 |
%} |
|
8176 |
! |
|
8177 |
||
8178 |
glxVUnitZIn:aGLXWindowId |
|
8179 |
"pass a 0.0/0.0/1.0 vector. |
|
8180 |
This is the same as v3f:#(0.0 0.0 1.0), but, since its so |
|
8181 |
common, this somewhat faster method has been provided" |
|
8182 |
||
8183 |
%{ /* NOCONTEXT */ |
|
8184 |
static float vec[3] = {0.0, 0.0, 1.0}; |
|
8185 |
||
8186 |
SETWIN(aGLXWindowId) |
|
1932 | 8187 |
#ifdef OPENGL |
8188 |
#else |
|
294 | 8189 |
v3f(vec); |
1932 | 8190 |
#endif |
294 | 8191 |
RETURN (true); |
8192 |
%} |
|
8193 |
! ! |
|
8194 |
||
8195 |
!GLXWorkstation methodsFor:'video and planes'! |
|
8196 |
||
8197 |
glxOverlayPlanes: planes in: aGLXWindowId |
|
8198 |
||
8199 |
%{ /* NOCONTEXT */ |
|
8200 |
#ifdef GLX |
|
8201 |
SETWIN(aGLXWindowId) |
|
8202 |
overlay(_longVal(planes)); |
|
8203 |
RETURN (true); |
|
8204 |
#endif |
|
8205 |
%} |
|
8206 |
. |
|
8207 |
^ false |
|
8208 |
! |
|
8209 |
||
8210 |
glxStereobufferIn: aGLXWindowId |
|
8211 |
||
8212 |
%{ /* NOCONTEXT */ |
|
8213 |
#ifdef FULL_GLX |
|
8214 |
SETWIN(aGLXWindowId) |
|
8215 |
stereobuffer(); |
|
8216 |
RETURN (true); |
|
8217 |
#endif |
|
8218 |
%} |
|
8219 |
. |
|
8220 |
^ false |
|
8221 |
! |
|
8222 |
||
8223 |
glxUnderlay: planes in: aGLXWindowId |
|
8224 |
||
8225 |
%{ /* NOCONTEXT */ |
|
8226 |
#ifdef GLX |
|
8227 |
SETWIN(aGLXWindowId) |
|
8228 |
underlay(_longVal(planes)); |
|
8229 |
RETURN (true); |
|
8230 |
#endif |
|
8231 |
%} |
|
8232 |
. |
|
8233 |
^ false |
|
8234 |
! |
|
8235 |
||
8236 |
glxVideocmd:cmd in:aGLXWindowId |
|
8237 |
||
8238 |
%{ /* NOCONTEXT */ |
|
8239 |
#ifdef GLX |
|
8240 |
SETWIN(aGLXWindowId) |
|
8241 |
videocmd(_longVal(cmd)); |
|
8242 |
RETURN (true); |
|
8243 |
#endif |
|
8244 |
%} |
|
8245 |
. |
|
8246 |
^ false |
|
8247 |
! ! |
|
8248 |
||
8249 |
!GLXWorkstation methodsFor:'viewing'! |
|
8250 |
||
8251 |
glxLookatVx:vx vy:vy vz:vz px:px py:py pz:pz twist:twist in:aGLXWindowId |
|
8252 |
"define viewing transformation" |
|
8253 |
||
8254 |
%{ /* NOCONTEXT */ |
|
8255 |
||
8256 |
Coord f_vx, f_vy, f_vz, f_px, f_py, f_pz; |
|
8257 |
Angle a_twist; |
|
8258 |
||
8259 |
_COORD_ (vx, f_vx) |
|
8260 |
_COORD_ (vy, f_vy) |
|
8261 |
_COORD_ (vz, f_vz) |
|
8262 |
_COORD_ (px, f_px) |
|
8263 |
_COORD_ (py, f_py) |
|
8264 |
_COORD_ (pz, f_pz) |
|
8265 |
_ANGLE_ (twist, a_twist) |
|
8266 |
SETWIN(aGLXWindowId) |
|
1932 | 8267 |
#ifdef OPENGL |
8268 |
#else |
|
294 | 8269 |
lookat(f_vx, f_vy, f_vz, f_px, f_py, f_pz, a_twist); |
1932 | 8270 |
#endif |
294 | 8271 |
%} |
8272 |
! |
|
8273 |
||
8274 |
glxOrtho2Left: left right: right bottom: bottom top: top in: aGLXWindowId |
|
8275 |
"define 2D orthogonal projection" |
|
8276 |
||
8277 |
%{ /* NOCONTEXT */ |
|
8278 |
float f_left, f_right, f_top, f_bottom; |
|
8279 |
||
8280 |
SETWIN(aGLXWindowId) |
|
8281 |
_FLOAT_(left, f_left) |
|
8282 |
_FLOAT_(right, f_right) |
|
8283 |
_FLOAT_(bottom, f_bottom) |
|
8284 |
_FLOAT_(top, f_top) |
|
1932 | 8285 |
#ifdef OPENGL |
8286 |
#else |
|
294 | 8287 |
ortho2(f_left, f_right, f_bottom, f_top); |
1932 | 8288 |
#endif |
8289 |
%} |
|
294 | 8290 |
! |
8291 |
||
2422
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8292 |
glxOrthoLeft: left right: right bottom: bottom top: top near: znear far: zfar in: aGLXWindowId |
294 | 8293 |
"define orthogonal projection" |
8294 |
||
8295 |
%{ /* NOCONTEXT */ |
|
8296 |
float f_left, f_right, f_bottom, f_top, |
|
8297 |
f_near, f_far; |
|
8298 |
||
8299 |
_FLOAT_(left, f_left) |
|
8300 |
_FLOAT_(right, f_right) |
|
8301 |
_FLOAT_(bottom, f_bottom) |
|
8302 |
_FLOAT_(top, f_top) |
|
2422
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8303 |
_FLOAT_(znear, f_near) |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8304 |
_FLOAT_(zfar, f_far) |
294 | 8305 |
SETWIN(aGLXWindowId) |
1932 | 8306 |
#ifdef OPENGL |
8307 |
#else |
|
294 | 8308 |
ortho(f_left, f_right, f_bottom, f_top, f_near, f_far); |
1932 | 8309 |
#endif |
294 | 8310 |
%} |
8311 |
! |
|
8312 |
||
2422
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8313 |
glxPerspectiveFovy:fovy aspect:aspect near:znear far:zfar in:aGLXWindowId |
294 | 8314 |
"define perspective projection" |
8315 |
||
8316 |
%{ /* NOCONTEXT */ |
|
8317 |
||
8318 |
Angle a_fovy; |
|
8319 |
Coord c_near, c_far; |
|
8320 |
float f_aspect; |
|
8321 |
||
8322 |
_ANGLE_ (fovy, a_fovy) |
|
8323 |
_FLOAT_ (aspect, f_aspect) |
|
2422
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8324 |
_COORD_ (znear, c_near) |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8325 |
_COORD_ (zfar, c_far) |
294 | 8326 |
|
8327 |
SETWIN(aGLXWindowId) |
|
1932 | 8328 |
#ifdef OPENGL |
8329 |
#else |
|
294 | 8330 |
perspective(a_fovy, f_aspect, c_near, c_far); |
1932 | 8331 |
#endif |
294 | 8332 |
%} |
8333 |
! |
|
8334 |
||
8335 |
glxPolarviewDist: dist azim: azim inc: inc twist: twist in: aGLXWindowId |
|
8336 |
||
8337 |
%{ /* NOCONTEXT */ |
|
8338 |
Coord c_dist; |
|
8339 |
Angle a_azim, a_inc, a_twist; |
|
8340 |
||
8341 |
_COORD_(dist, c_dist) |
|
8342 |
_ANGLE_(azim, a_azim) |
|
8343 |
_ANGLE_(inc, a_inc) |
|
8344 |
_ANGLE_(twist, a_twist) |
|
8345 |
SETWIN(aGLXWindowId) |
|
1932 | 8346 |
#ifdef OPENGL |
8347 |
#else |
|
294 | 8348 |
polarview(c_dist, a_azim, a_inc, a_twist); |
1932 | 8349 |
#endif |
294 | 8350 |
%} |
8351 |
! |
|
8352 |
||
528 | 8353 |
glxPopviewportIn: aGLXWindowId |
8354 |
"pops the top viewport off the viewport stack" |
|
8355 |
||
8356 |
%{ /* NOCONTEXT */ |
|
8357 |
SETWIN(aGLXWindowId) |
|
1932 | 8358 |
#ifdef OPENGL |
8359 |
#else |
|
528 | 8360 |
popviewport(); |
1932 | 8361 |
#endif |
528 | 8362 |
%} |
8363 |
||
8364 |
"Modified: 19.3.1996 / 18:58:24 / cg" |
|
8365 |
! |
|
8366 |
||
8367 |
glxPushviewportIn: aGLXWindowId |
|
8368 |
"pushes the current viewport on the viewport stack" |
|
8369 |
||
8370 |
%{ /* NOCONTEXT */ |
|
8371 |
SETWIN(aGLXWindowId) |
|
1932 | 8372 |
#ifdef OPENGL |
8373 |
#else |
|
528 | 8374 |
pushviewport(); |
1932 | 8375 |
#endif |
528 | 8376 |
%} |
8377 |
||
8378 |
"Modified: 19.3.1996 / 18:58:02 / cg" |
|
8379 |
! |
|
8380 |
||
294 | 8381 |
glxReshapeViewPortIn: aGLXWindowId |
8382 |
||
8383 |
%{ /* NOCONTEXT */ |
|
8384 |
SETWIN(aGLXWindowId) |
|
1932 | 8385 |
#ifdef OPENGL |
8386 |
#else |
|
294 | 8387 |
reshapeviewport(); |
1932 | 8388 |
#endif |
8389 |
%} |
|
294 | 8390 |
! |
8391 |
||
8392 |
glxViewportLeft:left right:right bottom:bottom top:top in:aGLXWindowId |
|
8393 |
||
8394 |
%{ /* NOCONTEXT */ |
|
8395 |
SETWIN(aGLXWindowId) |
|
1932 | 8396 |
#ifdef OPENGL |
8397 |
#else |
|
4718 | 8398 |
viewport(_screencoordVal(left), _screencoordVal(right), |
294 | 8399 |
_screencoordVal(bottom), _screencoordVal(top)); |
1932 | 8400 |
#endif |
294 | 8401 |
%} |
8402 |
! |
|
8403 |
||
2422
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8404 |
glxWindowLeft: left right: right bottom: bottom top: top near: znear far: zfar in: aGLXWindowId |
294 | 8405 |
"this one was added independently by JEFF - kept for his programs ..." |
8406 |
||
2422
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8407 |
self glxWindowLeft:left right:right top:top bottom:bottom near:znear far:zfar in:aGLXWindowId |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8408 |
! |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8409 |
|
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8410 |
glxWindowLeft:left right:right top:top bottom:bottom near:znear far:zfar in:aGLXWindowId |
294 | 8411 |
"define perspective viewing pyramid" |
8412 |
||
8413 |
%{ /* NOCONTEXT */ |
|
8414 |
Coord c_left, c_right, c_top, c_bot, c_near, c_far; |
|
8415 |
||
8416 |
_COORD_ (left, c_left) |
|
8417 |
_COORD_ (right, c_right) |
|
8418 |
_COORD_ (top, c_top) |
|
8419 |
_COORD_ (bottom, c_bot) |
|
2422
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8420 |
_COORD_ (znear, c_near) |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8421 |
_COORD_ (zfar, c_far) |
294 | 8422 |
SETWIN(aGLXWindowId) |
1932 | 8423 |
#ifdef OPENGL |
8424 |
#else |
|
294 | 8425 |
window(c_left, c_right, c_bot, c_top, c_near, c_far); |
1932 | 8426 |
#endif |
294 | 8427 |
%} |
8428 |
! ! |
|
8429 |
||
8430 |
!GLXWorkstation methodsFor:'window control'! |
|
8431 |
||
2045 | 8432 |
glxResizedView:aGLXWindowId width:width height:height |
2048 | 8433 |
"pass down resize info to the GL - this adjusts the viewport. |
8434 |
This only works with VGL or openGL" |
|
8435 |
||
8436 |
%{ /* NOCONTEXT */ |
|
2074 | 8437 |
SETWIN(aGLXWindowId) |
8438 |
#ifdef VGL |
|
2045 | 8439 |
X11_resized(__intVal(width), __intVal(height)); |
8440 |
RETURN (true); |
|
8441 |
#endif |
|
8442 |
%} |
|
8443 |
. |
|
8444 |
^ false |
|
8445 |
! |
|
8446 |
||
294 | 8447 |
glxWinclose:gwid in:aGLXWindowId |
8448 |
||
8449 |
%{ /* NOCONTEXT */ |
|
8450 |
#ifdef GLX |
|
8451 |
SETWIN(aGLXWindowId) |
|
8452 |
winclose(_longVal(gwid)); |
|
8453 |
RETURN (true); |
|
8454 |
#endif |
|
8455 |
%} |
|
8456 |
. |
|
8457 |
^ false |
|
8458 |
! |
|
8459 |
||
8460 |
glxWinconstraintsIn: aGLXWindowId |
|
8461 |
||
8462 |
%{ /* NOCONTEXT */ |
|
8463 |
#ifdef GLX |
|
8464 |
SETWIN(aGLXWindowId) |
|
8465 |
winconstraints(); |
|
8466 |
RETURN (true); |
|
8467 |
#endif |
|
8468 |
%} |
|
8469 |
. |
|
8470 |
^ false |
|
8471 |
! |
|
8472 |
||
8473 |
glxWindepth: gwid in: aGLXWindowId |
|
8474 |
||
8475 |
%{ /* NOCONTEXT */ |
|
8476 |
#ifdef GLX |
|
8477 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
8478 |
RETURN (__MKSMALLINT(windepth(_longVal(gwid)))); |
294 | 8479 |
#endif |
8480 |
%} |
|
8481 |
. |
|
8482 |
^ false |
|
8483 |
! |
|
8484 |
||
8485 |
glxWingetIn: aGLXWindowId |
|
8486 |
||
8487 |
%{ /* NOCONTEXT */ |
|
8488 |
#ifdef GLX |
|
8489 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
8490 |
RETURN (__MKSMALLINT(winget())); |
294 | 8491 |
#endif |
8492 |
%} |
|
8493 |
. |
|
8494 |
^ false |
|
8495 |
! |
|
8496 |
||
8497 |
glxWinmoveX: x y: y in: aGLXWindowId |
|
8498 |
||
8499 |
%{ /* NOCONTEXT */ |
|
8500 |
#ifdef GLX |
|
8501 |
SETWIN(aGLXWindowId) |
|
8502 |
winmove(_longVal(x), _longVal(y)); |
|
8503 |
RETURN (true); |
|
8504 |
#endif |
|
8505 |
%} |
|
8506 |
. |
|
8507 |
^ false |
|
8508 |
! |
|
8509 |
||
8510 |
glxWinpopIn: aGLXWindowId |
|
8511 |
||
8512 |
%{ /* NOCONTEXT */ |
|
8513 |
#ifdef GLX |
|
8514 |
SETWIN(aGLXWindowId) |
|
8515 |
winpop(); |
|
8516 |
RETURN (true); |
|
8517 |
#endif |
|
8518 |
%} |
|
8519 |
. |
|
8520 |
^ false |
|
8521 |
! |
|
8522 |
||
8523 |
glxWinpositionX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
8524 |
||
8525 |
%{ /* NOCONTEXT */ |
|
8526 |
#ifdef GLX |
|
8527 |
SETWIN(aGLXWindowId) |
|
8528 |
winposition(_longVal(x1), _longVal(y1), _longVal(x2), _longVal(y2)); |
|
8529 |
RETURN (true); |
|
8530 |
#endif |
|
8531 |
%} |
|
8532 |
. |
|
8533 |
^ false |
|
8534 |
! |
|
8535 |
||
8536 |
glxWinpushIn: aGLXWindowId |
|
8537 |
||
8538 |
%{ /* NOCONTEXT */ |
|
8539 |
#ifdef GLX |
|
8540 |
SETWIN(aGLXWindowId) |
|
8541 |
winpush(); |
|
8542 |
RETURN (true); |
|
8543 |
#endif |
|
8544 |
%} |
|
8545 |
. |
|
8546 |
^ false |
|
8547 |
! |
|
8548 |
||
8549 |
glxWinset: gwid in: aGLXWindowId |
|
8550 |
||
8551 |
%{ /* NOCONTEXT */ |
|
8552 |
#ifdef GLX |
|
8553 |
SETWIN(aGLXWindowId) |
|
8554 |
winset(_longVal(gwid)); |
|
8555 |
RETURN (true); |
|
8556 |
#endif |
|
8557 |
%} |
|
8558 |
. |
|
8559 |
^ false |
|
8560 |
! ! |
|
8561 |
||
0 | 8562 |
!GLXWorkstation methodsFor:'window creation'! |
8563 |
||
12 | 8564 |
createGLXWindowFor:aView left:xpos top:ypos width:wwidth height:wheight type:glxType |
157 | 8565 |
|ext wsuperView wsuperViewId windowId| |
0 | 8566 |
|
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
8567 |
glOK ifFalse:[^ nil]. |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
8568 |
|
793 | 8569 |
wsuperView := aView superView view. |
0 | 8570 |
wsuperView notNil ifTrue:[ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8571 |
wsuperViewId := wsuperView id |
0 | 8572 |
]. |
8573 |
||
524 | 8574 |
%{ /* CALLSSTACK: 20000 */ |
0 | 8575 |
Display *dpy = myDpy; |
185 | 8576 |
int screen = __intVal(_INST(screen)); |
0 | 8577 |
Window newWindow, parentWindow; |
12 | 8578 |
int t; |
0 | 8579 |
|
97 | 8580 |
if (__isSmallInteger(xpos) && __isSmallInteger(ypos) |
8581 |
&& __isSmallInteger(wwidth) && __isSmallInteger(wheight)) { |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8582 |
if (__isExternalAddress(wsuperViewId)) { |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8583 |
parentWindow = _WindowVal(wsuperViewId); |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8584 |
} else { |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8585 |
parentWindow = RootWindow(dpy, screen); |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8586 |
} |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8587 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8588 |
if (glxType == @symbol(colorIndexSingleBuffer)) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8589 |
t = GLXcolorIndexSingleBuffer; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8590 |
else if (glxType == @symbol(colorIndexDoubleBuffer)) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8591 |
t = GLXcolorIndexDoubleBuffer; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8592 |
else if (glxType == @symbol(rgbSingleBuffer)) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8593 |
t = GLXrgbSingleBuffer; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8594 |
else if (glxType == @symbol(rgbDoubleBuffer)) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8595 |
t = GLXrgbDoubleBuffer; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8596 |
else { |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8597 |
RETURN ( nil ); |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8598 |
} |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8599 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8600 |
ENTERGLX; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8601 |
newWindow = __GLXCreateWindow(dpy, parentWindow, |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8602 |
__intVal(xpos), __intVal(ypos), |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8603 |
__intVal(wwidth), __intVal(wheight), |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8604 |
0, t); |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8605 |
LEAVEGLX; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8606 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8607 |
if (! newWindow) { |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8608 |
RETURN ( nil ); |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8609 |
} |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8610 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8611 |
windowId = __MKOBJ(newWindow); |
0 | 8612 |
} |
206
4284b80bebdf
changed to use ExternalAddress handles for all Window, Font,
Claus Gittinger <cg@exept.de>
parents:
190
diff
changeset
|
8613 |
%}. |
0 | 8614 |
windowId notNil ifTrue:[ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8615 |
self addKnownView:aView withId:windowId. |
0 | 8616 |
]. |
8617 |
^ windowId |
|
20 | 8618 |
! |
8619 |
||
8620 |
unlinkGLXView:aGLXWindowId |
|
8621 |
"remove X/GLX link" |
|
524 | 8622 |
|
8623 |
%{ /* CALLSSTACK: 20000 */ |
|
206
4284b80bebdf
changed to use ExternalAddress handles for all Window, Font,
Claus Gittinger <cg@exept.de>
parents:
190
diff
changeset
|
8624 |
if (__isExternalAddress(aGLXWindowId)) { |
134 | 8625 |
ENTERGLX; |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8626 |
__GLXUnlinkWindow(myDpy, _WindowVal(aGLXWindowId)); |
134 | 8627 |
LEAVEGLX; |
8628 |
} |
|
20 | 8629 |
%} |
0 | 8630 |
! ! |
8631 |
||
294 | 8632 |
!GLXWorkstation methodsFor:'zbuffer'! |
8633 |
||
8634 |
glxZbsize: planes in: aGLXWindowId |
|
127 | 8635 |
|
8636 |
%{ /* NOCONTEXT */ |
|
8637 |
#ifdef FULL_GLX |
|
8638 |
SETWIN(aGLXWindowId) |
|
294 | 8639 |
zbsize(_longVal(planes)); |
8640 |
RETURN (true); |
|
8641 |
#endif |
|
8642 |
%} |
|
8643 |
. |
|
8644 |
^ false |
|
8645 |
! |
|
64 | 8646 |
|
8647 |
glxZbuffer:aBoolean in:aGLXWindowId |
|
8648 |
"enable/disable z-buffer operation" |
|
8649 |
||
8650 |
%{ /* NOCONTEXT */ |
|
8651 |
#ifdef GLX |
|
8652 |
SETWIN(aGLXWindowId) |
|
8653 |
zbuffer(aBoolean == false ? FALSE : TRUE); |
|
8654 |
RETURN (true); |
|
8655 |
#endif |
|
8656 |
%} |
|
8657 |
. |
|
8658 |
^ false |
|
294 | 8659 |
! |
64 | 8660 |
|
8661 |
glxZdraw: b in: aGLXWindowId |
|
8662 |
"enable/disable drawing into the z-buffer" |
|
8663 |
||
8664 |
%{ /* NOCONTEXT */ |
|
8665 |
#ifdef GLX |
|
8666 |
SETWIN(aGLXWindowId) |
|
8667 |
zdraw(_booleanVal(b)); |
|
8668 |
RETURN (true); |
|
8669 |
#endif |
|
8670 |
%} |
|
8671 |
. |
|
8672 |
^ false |
|
294 | 8673 |
! |
64 | 8674 |
|
8675 |
glxZfunction: func in: aGLXWindowId |
|
8676 |
"set the z-buffer comparison function. |
|
8677 |
func may be either the numeric value or a symbol (preferred)" |
|
8678 |
||
8679 |
%{ /* NOCONTEXT */ |
|
8680 |
#ifdef GLX |
|
8681 |
long f; |
|
8682 |
||
8683 |
SETWIN(aGLXWindowId) |
|
8684 |
if (func == @symbol(NEVER)) |
|
77 | 8685 |
f = ZF_NEVER; |
64 | 8686 |
else if (func == @symbol(LESS)) |
77 | 8687 |
f = ZF_LESS; |
64 | 8688 |
else if (func == @symbol(EQUAL)) |
77 | 8689 |
f = ZF_EQUAL; |
64 | 8690 |
else if (func == @symbol(LEQUAL)) |
77 | 8691 |
f = ZF_LEQUAL; |
64 | 8692 |
else if (func == @symbol(GREATER)) |
77 | 8693 |
f = ZF_GREATER; |
64 | 8694 |
else if (func == @symbol(NOTEQUAL)) |
77 | 8695 |
f = ZF_NOTEQUAL; |
64 | 8696 |
else if (func == @symbol(GEQUAL)) |
77 | 8697 |
f = ZF_GEQUAL; |
64 | 8698 |
else if (func == @symbol(ALWAYS)) |
77 | 8699 |
f = ZF_ALWAYS; |
64 | 8700 |
else |
77 | 8701 |
f = _longVal(func); |
64 | 8702 |
zfunction(f); |
8703 |
RETURN (true); |
|
8704 |
#endif |
|
8705 |
%} |
|
8706 |
. |
|
8707 |
^ false |
|
294 | 8708 |
! |
64 | 8709 |
|
8710 |
glxZsource: src in: aGLXWindowId |
|
8711 |
||
8712 |
%{ /* NOCONTEXT */ |
|
8713 |
#ifdef GLX |
|
8714 |
SETWIN(aGLXWindowId) |
|
8715 |
zsource(_longVal(src)); |
|
8716 |
RETURN (true); |
|
8717 |
#endif |
|
8718 |
%} |
|
8719 |
. |
|
8720 |
^ false |
|
294 | 8721 |
! |
64 | 8722 |
|
8723 |
glxZwritemask: mask in: aGLXWindowId |
|
8724 |
||
8725 |
%{ /* NOCONTEXT */ |
|
8726 |
#ifdef GLX |
|
8727 |
SETWIN(aGLXWindowId) |
|
185 | 8728 |
zwritemask((ulong)__intVal(mask)); |
64 | 8729 |
RETURN (true); |
8730 |
#endif |
|
8731 |
%} |
|
8732 |
. |
|
8733 |
^ false |
|
8734 |
! ! |
|
8735 |
||
294 | 8736 |
!GLXWorkstation class methodsFor:'documentation'! |
8737 |
||
8738 |
version |
|
6978 | 8739 |
^ '$Header$' |
5479
ae6b3ac21920
__isByteArray() to __isByteArrayLike() in primitive code
Stefan Vogel <sv@exept.de>
parents:
4718
diff
changeset
|
8740 |
! |
ae6b3ac21920
__isByteArray() to __isByteArrayLike() in primitive code
Stefan Vogel <sv@exept.de>
parents:
4718
diff
changeset
|
8741 |
|
ae6b3ac21920
__isByteArray() to __isByteArrayLike() in primitive code
Stefan Vogel <sv@exept.de>
parents:
4718
diff
changeset
|
8742 |
version_CVS |
6978 | 8743 |
^ '$Header$' |
89 | 8744 |
! ! |
7656 | 8745 |