author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Sat, 02 Feb 2019 01:04:01 +0000 | |
branch | jv |
changeset 8623 | b8c81b323931 |
parent 8622 | ecb4248c23a4 |
parent 8420 | 76e39223f5ab |
permissions | -rw-r--r-- |
0 | 1 |
" |
614 | 2 |
COPYRIGHT (c) 1993 by Claus Gittinger |
8420 | 3 |
COPYRIGHT (c) 2017 Jan Vrany |
77 | 4 |
All Rights Reserved |
0 | 5 |
|
6 |
This software is furnished under a license and may be used |
|
7 |
only in accordance with the terms of that license and with the |
|
8 |
inclusion of the above copyright notice. This software may not |
|
9 |
be provided or otherwise made available to, or used by, any |
|
10 |
other person. No title to or ownership of the software is |
|
11 |
hereby transferred. |
|
12 |
" |
|
3214 | 13 |
"{ Package: 'stx:libview' }" |
14 |
||
7656 | 15 |
"{ NameSpace: Smalltalk }" |
16 |
||
0 | 17 |
XWorkstation subclass:#GLXWorkstation |
528 | 18 |
instanceVariableNames:'activeWindow hasStereoExtension glOK' |
19 |
classVariableNames:'ForceGL' |
|
20 |
poolDictionaries:'' |
|
21 |
category:'Interface-Graphics' |
|
294 | 22 |
! |
77 | 23 |
|
89 | 24 |
!GLXWorkstation primitiveDefinitions! |
0 | 25 |
%{ |
6617
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
26 |
#include "stxOSDefs.h" |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
27 |
|
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
|
28 |
|
1899 | 29 |
#ifdef String |
30 |
# undef String |
|
31 |
#endif |
|
32 |
#define String GLX_String |
|
33 |
||
34 |
#ifdef Object |
|
35 |
# undef Object |
|
36 |
#endif |
|
37 |
#define Object GLX_Object |
|
38 |
||
39 |
#undef True |
|
40 |
#undef False |
|
41 |
||
2768 | 42 |
#ifdef Time |
43 |
# undef Time |
|
44 |
#endif |
|
45 |
#define Time X_Time |
|
46 |
||
2422
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
47 |
|
1899 | 48 |
#ifdef __VMS__ |
49 |
# include "vms_Xnames.h" |
|
50 |
#endif |
|
24 | 51 |
|
6617
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
52 |
#ifdef __arm__ |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
53 |
// # define _POSIX_C_SOURCE |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
54 |
#endif |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
55 |
|
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
56 |
#ifndef _STDIO_H_INCLUDED_ |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
57 |
# include <stdio.h> |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
58 |
# define _STDIO_H_INCLUDED_ |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
59 |
#endif |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
60 |
|
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
61 |
#ifdef __arm__ |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
62 |
# ifndef _SYS_TYPES_H_INCLUDED_ |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
63 |
# include <sys/types.h> |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
64 |
# define _SYS_TYPES_H_INCLUDED_ |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
65 |
# endif |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
66 |
# ifndef _SYS_SIGNAL_H_INCLUDED_ |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
67 |
# include <sys/signal.h> |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
68 |
# define _SYS_SIGNAL_H_INCLUDED_ |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
69 |
# endif |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
70 |
|
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
71 |
#endif |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
72 |
|
6254 | 73 |
#ifdef __osx__ |
74 |
# include <sys/signal.h> |
|
75 |
# define DYNAMICALLY_LOADABLE |
|
76 |
#endif |
|
168 | 77 |
|
8622
ecb4248c23a4
GLXWorkstation: `#include <signal.h>` also on FreeBSD
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8183
diff
changeset
|
78 |
#if defined(__linux__) || defined(__freebsd__) |
8181
7cd36eb4b09c
X11: fixed `GLXWorkstation` to compile with OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
7657
diff
changeset
|
79 |
# include <signal.h> |
7cd36eb4b09c
X11: fixed `GLXWorkstation` to compile with OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
7657
diff
changeset
|
80 |
#endif |
7cd36eb4b09c
X11: fixed `GLXWorkstation` to compile with OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
7657
diff
changeset
|
81 |
|
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
|
82 |
#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
|
83 |
#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
|
84 |
|
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 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
|
86 |
#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
|
87 |
|
0 | 88 |
|
185 | 89 |
/* |
90 |
* XSGIStereo extension - if available |
|
91 |
*/ |
|
92 |
#ifdef XSGIStereo |
|
93 |
# include <X11/extensions/SGIStereo.h> |
|
94 |
#endif |
|
95 |
||
0 | 96 |
typedef enum { |
97 |
GLXcolorIndexSingleBuffer, |
|
98 |
GLXcolorIndexDoubleBuffer, |
|
99 |
GLXrgbSingleBuffer, |
|
100 |
GLXrgbDoubleBuffer |
|
101 |
} GLXWindowType; |
|
102 |
||
333 | 103 |
# define ENTERGLX __BEGIN_PROTECT_REGISTERS__ |
104 |
# define LEAVEGLX __END_PROTECT_REGISTERS__ |
|
134 | 105 |
|
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
106 |
/* |
8181
7cd36eb4b09c
X11: fixed `GLXWorkstation` to compile with OpenGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
7657
diff
changeset
|
107 |
* 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
|
108 |
*/ |
0 | 109 |
#undef String |
969 | 110 |
#ifdef __DEF_String |
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
111 |
# define String __DEF_String |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
112 |
#endif |
969 | 113 |
#undef Object |
114 |
#ifdef __DEF_Object |
|
115 |
# define Object __DEF_Object |
|
116 |
#endif |
|
0 | 117 |
|
118 |
/* |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
119 |
* mhmh - openGL has its separate gl-context, |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
120 |
* which is distinct (?) from the windowID. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
121 |
* We dont want to add another instvar to View - do we ? |
0 | 122 |
*/ |
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
|
123 |
#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
|
124 |
# 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
|
125 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
126 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
127 |
struct windowIDToGLContextMapping { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
128 |
Window win; |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
129 |
OPENGLCONTEXT con; |
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 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
132 |
static struct windowIDToGLContextMapping windowIDToGLContextMapping[MAX_OPENGL_VIEWS]; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
133 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
134 |
static OPENGLCONTEXT |
4718 | 135 |
__glxWindowIdToGLContext(xId) |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
136 |
Window xId; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
137 |
{ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
138 |
int i; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
139 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
140 |
for (i=0; i<MAX_OPENGL_VIEWS; i++) { |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
141 |
if (windowIDToGLContextMapping[i].win == xId) { |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
142 |
return windowIDToGLContextMapping[i].con; |
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 |
} |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
145 |
return (OPENGLCONTEXT) 0; |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
146 |
} |
0 | 147 |
|
157 | 148 |
/* |
149 |
* set the GLXWindow for followup drawing |
|
150 |
*/ |
|
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
151 |
#define SETWIN(aGLXWindowId) \ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
152 |
{ \ |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
153 |
OPENGLCONTEXT context; \ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
154 |
\ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
155 |
if (_INST(activeWindow) != aGLXWindowId) { \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
156 |
if (! ISCONNECTED ) { \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
157 |
RETURN (false); \ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
158 |
} \ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
159 |
if (! __isExternalAddress(aGLXWindowId)) { \ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
160 |
RETURN (false); \ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
161 |
} \ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
162 |
context = (OPENGLCONTEXT) __glxWindowIdToGLContext(_WindowVal(aGLXWindowId)); \ |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
163 |
if (! context) { \ |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
164 |
RETURN (false); \ |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
165 |
} \ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
166 |
GLXMAKECURRENT(myDpy, _WindowVal(aGLXWindowId), context ); \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
167 |
_INST(activeWindow) = aGLXWindowId; \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
168 |
__STORE(self, aGLXWindowId); \ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
169 |
} else { \ |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
170 |
if (aGLXWindowId == nil) { \ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
171 |
RETURN (false); \ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
172 |
} \ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
173 |
} \ |
12 | 174 |
} |
175 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
176 |
|
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
|
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 |
|
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 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
|
180 |
#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
|
181 |
#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
|
182 |
#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
|
183 |
#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
|
184 |
#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
|
185 |
#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
|
186 |
#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
|
187 |
#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
|
188 |
#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
|
189 |
#define Screencoord int |
553
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 |
/* |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
192 |
* some defines - tired of typing ... |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
193 |
* 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
|
194 |
* put/pack them into corresponding c variables. |
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 |
*/ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
197 |
#define myDpy (Display *)(__MKCP(_INST(displayId))) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
198 |
#define ISCONNECTED (_INST(displayId) != nil) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
199 |
#define _WindowVal(o) (Window)(__MKCP(o)) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
200 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
201 |
#define __MKBOOLEAN(b) ((b==FALSE) ? false : true) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
202 |
#define _booleanVal(b) ((b==false) ? (Boolean)FALSE : (Boolean)TRUE) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
203 |
#define _coordVal(c) ((__isFloat(c)) ? (Coord)(_floatVal(c)) : (Coord)(__intVal(c))) |
185 | 204 |
#define _icoordVal(c) ((Icoord)(__intVal(c))) |
205 |
#define _scoordVal(c) ((Scoord)(__intVal(c))) |
|
206 |
#define _screencoordVal(c) ((Screencoord)(__intVal(c))) |
|
207 |
#define _colorindexVal(c) ((Colorindex)(__intVal(c))) |
|
208 |
#define _linestyleVal(l) ((Linestyle)(__intVal(l))) |
|
209 |
#define _shortVal(l) ((short)(__intVal(l))) |
|
210 |
#define _longVal(l) ((long)(__intVal(l))) |
|
211 |
#define _deviceVal(l) ((Device)(__intVal(l))) |
|
212 |
#define _tagVal(l) ((Tag)(__intVal(l))) |
|
969 | 213 |
#define _objectVal(l) ((GLX_Object)(__intVal(l))) |
185 | 214 |
#define _offsetVal(l) ((Offset)(__intVal(l))) |
215 |
#define _rgbVal(l) ((RGBvalue)(__intVal(l))) |
|
216 |
#define _angleVal(c) ((Angle)(__intVal(c))) |
|
157 | 217 |
|
29 | 218 |
/* |
219 |
* 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
|
220 |
* ST-object must be true or false. Return from method if invalid. |
29 | 221 |
*/ |
222 |
#define _BOOLEAN_(arg, dst) \ |
|
30 | 223 |
if (arg==true) \ |
77 | 224 |
dst = (Boolean)TRUE; \ |
30 | 225 |
else if (arg==false) \ |
77 | 226 |
dst = (Boolean)FALSE; \ |
29 | 227 |
else { RETURN(false); } |
228 |
||
229 |
/* |
|
230 |
* check for and fetch a coord from ST-arg into C-dst |
|
157 | 231 |
* ST-object must be Float, SmallInteger or Fraction. |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
232 |
* Return from method if invalid. |
29 | 233 |
*/ |
0 | 234 |
#define _COORD_(arg, dst) \ |
97 | 235 |
if (__isFloat(arg)) \ |
77 | 236 |
dst = (Coord)(_floatVal(arg)); \ |
97 | 237 |
else if (__isSmallInteger(arg)) \ |
185 | 238 |
dst = (Coord)(__intVal(arg)); \ |
97 | 239 |
else if (__isFraction(arg) \ |
240 |
&& __isSmallInteger(_FractionInstPtr(arg)->f_numerator) \ |
|
241 |
&& __isSmallInteger(_FractionInstPtr(arg)->f_denominator)) { \ |
|
77 | 242 |
float n, d; \ |
243 |
\ |
|
185 | 244 |
n = (float)(__intVal(_FractionInstPtr(arg)->f_numerator)); \ |
245 |
d = (float)(__intVal(_FractionInstPtr(arg)->f_denominator)); \ |
|
77 | 246 |
dst = (Coord)(n / d); \ |
29 | 247 |
} else { RETURN(false); } |
248 |
||
249 |
/* |
|
250 |
* check for and fetch an icoord from ST-arg into C-dst |
|
4718 | 251 |
* ST-object must be SmallInteger. Return from method if invalid. |
29 | 252 |
*/ |
253 |
#define _ICOORD_(arg, dst) \ |
|
97 | 254 |
if (__isSmallInteger(arg)) \ |
185 | 255 |
dst = (Icoord)(__intVal(arg)); \ |
29 | 256 |
else { RETURN(false); } |
257 |
||
258 |
/* |
|
157 | 259 |
* check for and fetch an scoord from ST-arg into C-dst |
4718 | 260 |
* ST-object must be SmallInteger. Return from method if invalid. |
29 | 261 |
*/ |
262 |
#define _SCOORD_(arg, dst) \ |
|
97 | 263 |
if (__isSmallInteger(arg)) \ |
185 | 264 |
dst = (Scoord)(__intVal(arg)); \ |
29 | 265 |
else { RETURN(false); } |
266 |
||
267 |
#define _SCREENCOORD_(arg, dst) \ |
|
97 | 268 |
if (__isSmallInteger(arg)) \ |
185 | 269 |
dst = (Screencoord)(__intVal(arg)); \ |
29 | 270 |
else { RETURN(false); } |
271 |
||
272 |
#define _COLORINDEX_(arg, dst) \ |
|
97 | 273 |
if (__isSmallInteger(arg)) \ |
185 | 274 |
dst = (Colorindex)(__intVal(arg)); \ |
29 | 275 |
else { RETURN(false); } |
276 |
||
277 |
#define _ANGLE_(arg, dst) \ |
|
97 | 278 |
if (__isSmallInteger(arg)) \ |
185 | 279 |
dst = (Angle)(__intVal(arg)); \ |
29 | 280 |
else { RETURN(false); } |
0 | 281 |
|
282 |
#define _FLOAT_(arg, dst) \ |
|
97 | 283 |
if (__isFloat(arg)) \ |
77 | 284 |
dst = (float)(_floatVal(arg)); \ |
97 | 285 |
else if (__isSmallInteger(arg)) \ |
185 | 286 |
dst = (float)(__intVal(arg)); \ |
97 | 287 |
else if (__isFraction(arg) \ |
288 |
&& __isSmallInteger(_FractionInstPtr(arg)->f_numerator) \ |
|
289 |
&& __isSmallInteger(_FractionInstPtr(arg)->f_denominator)) { \ |
|
77 | 290 |
float n, d; \ |
291 |
\ |
|
185 | 292 |
n = (float)(__intVal(_FractionInstPtr(arg)->f_numerator)); \ |
293 |
d = (float)(__intVal(_FractionInstPtr(arg)->f_denominator)); \ |
|
77 | 294 |
dst = (float)(n / d); \ |
29 | 295 |
} else { RETURN(false); } |
0 | 296 |
|
297 |
#define _INT_(arg, dst) \ |
|
97 | 298 |
if (__isSmallInteger(arg)) \ |
185 | 299 |
dst = (int)(__intVal(arg)); \ |
29 | 300 |
else { RETURN(false); } |
301 |
||
30 | 302 |
#define _indexedArea(object) \ |
303 |
(((char *) (_InstPtr(object))) \ |
|
77 | 304 |
+ OHDR_SIZE \ |
185 | 305 |
+ (__intVal(_ClassInstPtr(__qClass(object))->c_ninstvars)) * sizeof(OBJ)) |
77 | 306 |
%} |
307 |
! ! |
|
308 |
||
168 | 309 |
!GLXWorkstation primitiveVariables! |
310 |
%{ |
|
311 |
/* |
|
312 |
* remembered info from private error handler |
|
313 |
*/ |
|
4164
390662205891
#resourceIdOfLastError return ExternalAddress as in XWorkstation
Stefan Vogel <sv@exept.de>
parents:
3743
diff
changeset
|
314 |
static char lastErrorMsg[128] = ""; |
390662205891
#resourceIdOfLastError return ExternalAddress as in XWorkstation
Stefan Vogel <sv@exept.de>
parents:
3743
diff
changeset
|
315 |
static unsigned INT lastRequestCode = 0; |
390662205891
#resourceIdOfLastError return ExternalAddress as in XWorkstation
Stefan Vogel <sv@exept.de>
parents:
3743
diff
changeset
|
316 |
static unsigned INT lastMinorCode = 0; |
390662205891
#resourceIdOfLastError return ExternalAddress as in XWorkstation
Stefan Vogel <sv@exept.de>
parents:
3743
diff
changeset
|
317 |
static unsigned INT lastResource = 0; |
168 | 318 |
|
319 |
%} |
|
320 |
! ! |
|
321 |
||
89 | 322 |
!GLXWorkstation primitiveFunctions! |
77 | 323 |
%{ |
151 | 324 |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
325 |
#ifdef DYNAMICALLY_LOADABLE |
168 | 326 |
/* |
327 |
* catch X-errors and forward as errorInterrupt:#DisplayError, |
|
4251 | 328 |
* (which itself invokes my handler and optionally raises an exception) |
168 | 329 |
* the implementation below is somewhat wrong: it will |
330 |
* report all errors for Display, even though there could be |
|
331 |
* more than one display connection. (being fixed, new errorInterrupt mechanism |
|
332 |
* allows passing an additional argument, which is the displayID ...) |
|
333 |
* |
|
4251 | 334 |
* this duplicates the functionality as found in XWorkstation; |
168 | 335 |
* the reason is to allow dynamic loading systems to load this module |
336 |
* before XWorkstation (which was not possible otherwise, due to unresolved |
|
337 |
* external references while loading this one) |
|
338 |
*/ |
|
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
|
339 |
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
|
340 |
__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
|
341 |
; |
168 | 342 |
{ |
343 |
XGetErrorText(dpy, event->error_code, lastErrorMsg, 80); |
|
344 |
if (lastErrorMsg[0] == '\0') { |
|
4718 | 345 |
sprintf(lastErrorMsg, "code: %d", event->error_code); |
168 | 346 |
} |
347 |
lastRequestCode = event->request_code; |
|
348 |
lastMinorCode = event->minor_code; |
|
349 |
lastResource = event->resourceid; |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
350 |
if ((event->error_code == BadWindow) && (lastRequestCode == 4) && (lastMinorCode == 0)) { |
4718 | 351 |
/* |
352 |
* this is a BadWindow error for X_DestroyWindow. |
|
353 |
* ignore it here, since it results from the GC freeing windows |
|
354 |
* in non bottom-up window order. |
|
355 |
*/ |
|
356 |
return 0; |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
357 |
} |
168 | 358 |
|
218
10072d9beba5
can now turn off Xlib error messages from the errorHandler
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
359 |
if (@global(ErrorPrinting) == true) { |
4718 | 360 |
console_fprintf(stderr, "GLXWORKSTAT: x-error caught maj=%d (0x%x) min=%d (0x%x) resource=%x\n", |
361 |
event->request_code, event->request_code, |
|
362 |
event->minor_code, event->minor_code, event->resourceid); |
|
363 |
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
|
364 |
} |
168 | 365 |
|
207
9124817bbb03
use new c-pointer wrapper macros (based on externalAddress)
Claus Gittinger <cg@exept.de>
parents:
206
diff
changeset
|
366 |
__errorInterruptWithIDAndParameter__(@symbol(DisplayError), __MKOBJ(dpy)); |
168 | 367 |
return 0; |
368 |
} |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
369 |
#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
|
370 |
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
|
371 |
#endif |
168 | 372 |
|
4718 | 373 |
/* |
151 | 374 |
* begin moved from GLXsupport.c |
375 |
*/ |
|
376 |
||
377 |
/* |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
378 |
* This provides a helper function "GLXCreateWindow", which does |
4718 | 379 |
* all the necessary magic to create an X window suitable for GL drawing |
380 |
* to take place within. See the definition of GLXCreateWindow for a |
|
151 | 381 |
* description of how to call it. |
382 |
* |
|
383 |
* claus: I really had no time to look into all this, |
|
384 |
* this file has been just copied from a 4Dgifts demo .. |
|
385 |
* (will need more than a day to show more ...) |
|
386 |
*/ |
|
1932 | 387 |
#if !defined(OPENGL) |
151 | 388 |
|
1899 | 389 |
# include <X11/Xlib.h> |
390 |
# include <X11/Xutil.h> |
|
391 |
# ifndef VGL |
|
4718 | 392 |
# include <gl/glws.h> |
1899 | 393 |
# endif |
6617
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
394 |
# ifndef _SIGNAL_H_INCLUDED_ |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
395 |
# include <signal.h> |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
396 |
# endif |
1899 | 397 |
# include <setjmp.h> |
398 |
# include "stcIntern.h" |
|
151 | 399 |
|
400 |
/* |
|
401 |
* glxhelper.h: |
|
402 |
* |
|
403 |
* List of drawing modes supported by GLXCreateWindow (in glxhelper.c). |
|
4718 | 404 |
* More than this are possible with mixed model, but this is just an |
405 |
* example. You can either expand this list (and the corresponding code in |
|
406 |
* GLXCreateWindow) or call the mixed model calls yourself, using |
|
151 | 407 |
* GLXCreateWindow as an example. |
408 |
*/ |
|
409 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
410 |
static char * |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
411 |
typeToName[] = { |
151 | 412 |
"color index single buffer", |
413 |
"color index double buffer", |
|
414 |
"rgb single buffer", |
|
415 |
"rgb double buffer", |
|
416 |
}; |
|
417 |
||
1932 | 418 |
#endif /* GLX || VGL */ |
419 |
||
420 |
#if defined(GLX) && !defined(VGL) |
|
151 | 421 |
/* |
422 |
* Dorky little helper function used to build up a GLXconfig array. |
|
423 |
*/ |
|
424 |
||
4718 | 425 |
static void |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
426 |
set_entry (GLXconfig* ptr, int b, int m, int a) |
151 | 427 |
{ |
428 |
ptr->buffer = b; |
|
429 |
ptr->mode = m; |
|
430 |
ptr->arg = a; |
|
431 |
} |
|
1932 | 432 |
#endif /* GLX & not VGL */ |
151 | 433 |
|
4711 | 434 |
static stx_jmp_buf errorReturn; |
151 | 435 |
|
436 |
static void |
|
437 |
glAbort() { |
|
6002 | 438 |
stx_longjmp(errorReturn, 1); |
151 | 439 |
} |
440 |
||
441 |
/* |
|
442 |
* GLXCreateWindow(dpy, parent, x, y, w, h, boderWidth, type) |
|
443 |
* |
|
444 |
* Return value is the X window id of the newly created window. |
|
445 |
* |
|
446 |
* Arguments are: |
|
447 |
* dpy The X "Display*" returned by XOpenDisplay |
|
448 |
* parent The parent of the newly created window, |
|
449 |
* a typical value for this is |
|
450 |
* RootWindow(dpy, DefaultScreen(dpy)) |
|
451 |
* x,y The location of the window to be created, |
|
452 |
* y coordinate is measured from the top down. |
|
453 |
* w,h size of the new window |
|
454 |
* borderWidth the X border size for this window, should probably |
|
455 |
* be zero. |
|
456 |
* type the GLXWindowType (see glxhelper.h) desribing the |
|
457 |
* typer of GL drawing to be done in this window |
|
458 |
*/ |
|
4718 | 459 |
Window |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
460 |
__GLXCreateWindow(dpy, parent, x, y, w, h, borderWidth, type) |
151 | 461 |
Display* dpy; |
462 |
Window parent; |
|
463 |
GLXWindowType type; |
|
464 |
{ |
|
1932 | 465 |
#if !defined(OPENGL) |
466 |
# ifndef VGL |
|
151 | 467 |
GLXconfig params[50]; |
468 |
GLXconfig* next; |
|
469 |
GLXconfig* retconfig; |
|
470 |
Colormap cmap = DefaultColormap(dpy, DefaultScreen(dpy)); |
|
1932 | 471 |
# endif |
472 |
#endif |
|
473 |
Visual visual; |
|
151 | 474 |
XVisualInfo *vis; |
475 |
XVisualInfo template; |
|
476 |
XColor white; |
|
477 |
XSetWindowAttributes cwa; |
|
478 |
XWindowAttributes pwa; |
|
479 |
int scr, i, nret; |
|
480 |
Window win; |
|
1932 | 481 |
#ifdef HAS_SIGACTION |
6617
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
482 |
struct sigaction oldSigSegv, newSigSegv; |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
483 |
#else |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
484 |
void *oldSigSegv; |
1932 | 485 |
#endif |
486 |
||
487 |
#if !defined(OPENGL) |
|
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
488 |
__catchExit(1); |
1932 | 489 |
#endif |
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
490 |
|
6002 | 491 |
if (stx_setjmp(errorReturn)) { |
4718 | 492 |
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
|
493 |
#ifdef SIGSEGV |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
494 |
# ifdef HAS_SIGACTION |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
495 |
sigaction(SIGSEGV, &oldSigSegv, 0); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
496 |
# else |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
497 |
signal(SIGSEGV, oldSigSegv); |
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 |
#endif |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
500 |
|
1932 | 501 |
#if !defined(OPENGL) |
4718 | 502 |
__catchExit(0); |
503 |
#endif |
|
504 |
return 0; |
|
151 | 505 |
} |
506 |
__CONT__ |
|
507 |
||
1932 | 508 |
if (w <= 0) { |
4718 | 509 |
console_fprintf(stderr, "GL: bad width: %d\n", w); |
510 |
w = 1; |
|
1932 | 511 |
} |
512 |
if (h <= 0) { |
|
4718 | 513 |
console_fprintf(stderr, "GL: bad height: %d\n", h); |
514 |
h = 1; |
|
1932 | 515 |
} |
516 |
||
517 |
#if !defined(OPENGL) |
|
1899 | 518 |
# ifdef VGL |
151 | 519 |
/* |
520 |
* I know what VGL supports; its somewhat unclean to hard code it here |
|
521 |
*/ |
|
522 |
switch (type) { |
|
523 |
case GLXcolorIndexSingleBuffer: |
|
524 |
case GLXcolorIndexDoubleBuffer: |
|
4718 | 525 |
break; |
151 | 526 |
|
527 |
case GLXrgbSingleBuffer: |
|
528 |
case GLXrgbDoubleBuffer: |
|
4718 | 529 |
console_fprintf(stderr, "Sorry, VGL can't support %s type of windows\n", typeToName[type]); |
530 |
__catchExit(0); |
|
531 |
return 0; |
|
151 | 532 |
} |
533 |
||
534 |
scr = DefaultScreen(dpy); |
|
535 |
visual.visualid = CopyFromParent; |
|
536 |
cwa.border_pixel = 0; /* Even if we don't use it, it must be something */ |
|
537 |
win = XCreateWindow(dpy, parent, x, y, w, h, |
|
4718 | 538 |
borderWidth, DisplayPlanes(dpy, scr), |
539 |
InputOutput, &visual, |
|
540 |
CWBorderPixel, &cwa); |
|
151 | 541 |
|
542 |
/* |
|
389
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
543 |
* on some, seg-violations occur in the GL, if too many |
151 | 544 |
* views are created ... just to make certain, we catch those |
545 |
* in GL too. |
|
546 |
*/ |
|
6617
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
547 |
# ifdef SIGSEGV |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
548 |
# ifdef HAS_SIGACTION |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
549 |
sigaction(SIGSEGV, (struct sigaction *)0, &oldSigSegv); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
550 |
newSigSegv = oldSigSegv; |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
551 |
newSigSegv.sa_handler = glAbort; |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
552 |
sigaction(SIGSEGV, &newSigSegv, (struct sigaction *)0); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
553 |
# else |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
554 |
oldSigSegv = signal(SIGSEGV, glAbort); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
555 |
# endif |
1899 | 556 |
# endif |
6617
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
557 |
|
151 | 558 |
i = GLXlink(dpy, win); |
6617
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
559 |
|
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
560 |
# ifdef SIGSEGV |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
561 |
# ifdef HAS_SIGACTION |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
562 |
sigaction(SIGSEGV, &oldSigSegv, (struct sigaction *)0); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
563 |
# else |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
564 |
signal(SIGSEGV, oldSigSegv); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
565 |
# endif |
1899 | 566 |
# endif |
151 | 567 |
|
568 |
if (i < 0) { |
|
4718 | 569 |
console_fprintf(stderr, "GLXlink returned %d\n", i); |
570 |
__catchExit(0); |
|
571 |
return 0; |
|
151 | 572 |
} |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
573 |
|
1899 | 574 |
# else /* not VGL */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
575 |
|
151 | 576 |
/* |
577 |
* This builds an array in "params" that describes for GLXgetconfig(3G) |
|
578 |
* the type of GL drawing that will be done. |
|
579 |
*/ |
|
580 |
next = params; |
|
581 |
switch (type) { |
|
582 |
case GLXcolorIndexSingleBuffer: |
|
4718 | 583 |
set_entry(next++, GLX_NORMAL, GLX_RGB, FALSE); |
584 |
set_entry(next++, GLX_NORMAL, GLX_DOUBLE, FALSE); |
|
585 |
break; |
|
151 | 586 |
case GLXcolorIndexDoubleBuffer: |
4718 | 587 |
set_entry(next++, GLX_NORMAL, GLX_RGB, FALSE); |
588 |
set_entry(next++, GLX_NORMAL, GLX_DOUBLE, TRUE); |
|
589 |
break; |
|
151 | 590 |
case GLXrgbSingleBuffer: |
4718 | 591 |
set_entry(next++, GLX_NORMAL, GLX_RGB, TRUE); |
592 |
set_entry(next++, GLX_NORMAL, GLX_DOUBLE, FALSE); |
|
593 |
break; |
|
151 | 594 |
case GLXrgbDoubleBuffer: |
4718 | 595 |
set_entry(next++, GLX_NORMAL, GLX_RGB, TRUE); |
596 |
set_entry(next++, GLX_NORMAL, GLX_DOUBLE, TRUE); |
|
597 |
break; |
|
151 | 598 |
} |
599 |
set_entry(next, 0, 0, 0); /* The input to GLXgetconfig is null terminated */ |
|
600 |
||
601 |
/* |
|
602 |
* Get configuration data for a window based on above parameters |
|
603 |
* First we have to find out which screen the parent window is on, |
|
604 |
* then we can call GXLgetconfig() |
|
605 |
*/ |
|
606 |
XGetWindowAttributes(dpy, parent, &pwa); |
|
607 |
retconfig = GLXgetconfig(dpy, XScreenNumberOfScreen(pwa.screen), params); |
|
608 |
if (retconfig == 0) { |
|
4718 | 609 |
console_fprintf(stderr, "Sorry, can't support %s type of windows\n", typeToName[type]); |
610 |
__catchExit(0); |
|
611 |
return 0; |
|
151 | 612 |
} |
613 |
||
614 |
/* |
|
615 |
* Scan through config info, pulling info needed to create a window |
|
616 |
* that supports the rendering mode. |
|
617 |
*/ |
|
618 |
for (next = retconfig; next->buffer; next++) { |
|
4718 | 619 |
unsigned long buffer = next->buffer; |
620 |
unsigned long mode = next->mode; |
|
621 |
unsigned long value = next->arg; |
|
622 |
switch (mode) { |
|
623 |
case GLX_COLORMAP: |
|
624 |
if (buffer == GLX_NORMAL) { |
|
625 |
cmap = value; |
|
626 |
} |
|
627 |
break; |
|
628 |
case GLX_VISUAL: |
|
629 |
if (buffer == GLX_NORMAL) { |
|
630 |
template.visualid = value; |
|
631 |
template.screen = DefaultScreen(dpy); |
|
632 |
vis = XGetVisualInfo(dpy, VisualScreenMask|VisualIDMask, |
|
633 |
&template, &nret); |
|
634 |
} |
|
635 |
break; |
|
636 |
} |
|
151 | 637 |
} |
638 |
||
639 |
/* |
|
640 |
* Create the window |
|
641 |
*/ |
|
642 |
cwa.colormap = cmap; |
|
643 |
cwa.border_pixel = 0; /* Even if we don't use it, it must be something */ |
|
644 |
win = XCreateWindow(dpy, parent, x, y, w, h, |
|
4718 | 645 |
borderWidth, vis->depth, InputOutput, vis->visual, |
646 |
CWColormap|CWBorderPixel, &cwa); |
|
151 | 647 |
|
648 |
/* |
|
649 |
* Rescan configuration info and find window slot that getconfig |
|
650 |
* provided. Fill it in with the window we just created. |
|
651 |
*/ |
|
652 |
for (next = retconfig; next->buffer; next++) { |
|
4718 | 653 |
if ((next->buffer == GLX_NORMAL) && (next->mode == GLX_WINDOW)) { |
654 |
next->arg = win; |
|
655 |
break; |
|
656 |
} |
|
151 | 657 |
} |
658 |
||
659 |
/* |
|
660 |
* Now "retconfig" contains all the information the GL needs to |
|
661 |
* configure the window and its own internal state. |
|
662 |
*/ |
|
663 |
/* |
|
389
4e08ad24670a
oops - use sigaction if available when catching gl errors
Claus Gittinger <cg@exept.de>
parents:
350
diff
changeset
|
664 |
* on iris, seg-violations occur in the GL, if too many |
151 | 665 |
* views are created ... |
666 |
*/ |
|
6617
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
667 |
# ifdef SIGSEGV |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
668 |
# ifdef HAS_SIGACTION |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
669 |
sigaction(SIGSEGV, (struct sigaction *)0, &oldSigSegv); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
670 |
newSigSegv = oldSigSegv; |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
671 |
newSigSegv.sa_handler = glAbort; |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
672 |
sigaction(SIGSEGV, &newSigSegv, (struct sigaction *)0); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
673 |
# else |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
674 |
oldSigSegv = signal(SIGSEGV, glAbort); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
675 |
# endif |
1899 | 676 |
# endif |
6617
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
677 |
|
151 | 678 |
i = GLXlink(dpy, retconfig); |
6617
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
679 |
|
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
680 |
# ifdef SIGSEGV |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
681 |
# ifdef HAS_SIGACTION |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
682 |
sigaction(SIGSEGV, &oldSigSegv, (struct sigaction *)0); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
683 |
# else |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
684 |
signal(SIGSEGV, oldSigSegv); |
2af71b6a7e46
compilable on systems without SIGSEGV
Claus Gittinger <cg@exept.de>
parents:
6254
diff
changeset
|
685 |
# endif |
1899 | 686 |
# endif |
151 | 687 |
|
688 |
if (i < 0) { |
|
4718 | 689 |
console_fprintf(stderr, "GLXlink returned %d\n", i); |
690 |
__catchExit(0); |
|
691 |
return 0; |
|
151 | 692 |
} |
693 |
||
694 |
/* |
|
695 |
* The GL sets its own X error handlers, which exits - this is not what we want |
|
696 |
*/ |
|
697 |
XSetErrorHandler(__XErrorHandler__); |
|
1899 | 698 |
# endif /* not VGL */ |
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
699 |
__catchExit(0); |
1932 | 700 |
|
701 |
#else /* OPENGL | MESA */ |
|
702 |
||
703 |
scr = DefaultScreen(dpy); |
|
704 |
visual.visualid = CopyFromParent; |
|
705 |
cwa.border_pixel = 0; /* Even if we don't use it, it must be something */ |
|
706 |
win = XCreateWindow(dpy, parent, x, y, w, h, |
|
4718 | 707 |
borderWidth, DisplayPlanes(dpy, scr), |
708 |
InputOutput, &visual, |
|
709 |
CWBorderPixel, &cwa); |
|
1932 | 710 |
|
711 |
vis = XGetVisualInfo(dpy, VisualScreenMask|VisualIDMask, &visual, &nret); |
|
4718 | 712 |
console_fprintf(stderr, "vis is %x\n", vis); |
1932 | 713 |
#endif /* GLX || VGL */ |
714 |
||
151 | 715 |
return win; |
716 |
} |
|
717 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
718 |
__GLXUnlinkWindow(dpy, win) |
151 | 719 |
Display* dpy; |
720 |
Window win; |
|
721 |
{ |
|
722 |
/* |
|
723 |
* only needed for VGL - GLX does it automatically |
|
724 |
*/ |
|
1932 | 725 |
#ifdef VGL |
151 | 726 |
GLXunlink(dpy, win); |
1932 | 727 |
#endif |
151 | 728 |
} |
729 |
||
29 | 730 |
/* |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
731 |
* helper for rotation - calls rot() |
29 | 732 |
*/ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
733 |
OBJ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
734 |
__glx_doRotate(angle, axis) |
29 | 735 |
OBJ angle; |
736 |
char axis; |
|
737 |
{ |
|
738 |
float f_angle; |
|
739 |
||
35 | 740 |
if (__isFloat(angle)) { |
4718 | 741 |
f_angle = (float)(_floatVal(angle)); |
742 |
if (f_angle != 0.0) { |
|
743 |
#ifdef OPENGL |
|
744 |
#else |
|
745 |
rot(f_angle, axis); |
|
746 |
#endif |
|
747 |
} |
|
748 |
return (true); |
|
29 | 749 |
} |
35 | 750 |
if (__isFraction(angle) |
97 | 751 |
&& __isSmallInteger(_FractionInstPtr(angle)->f_numerator) |
752 |
&& __isSmallInteger(_FractionInstPtr(angle)->f_denominator)) { |
|
4718 | 753 |
float n, d; |
754 |
||
755 |
n = (float)(__intVal(_FractionInstPtr(angle)->f_numerator)); |
|
756 |
d = (float)(__intVal(_FractionInstPtr(angle)->f_denominator)); |
|
757 |
f_angle = n / d; |
|
758 |
if (f_angle != 0.0) { |
|
759 |
#ifdef OPENGL |
|
760 |
#else |
|
761 |
rot(f_angle, axis); |
|
762 |
#endif |
|
763 |
} |
|
764 |
return (true); |
|
29 | 765 |
} |
97 | 766 |
if (__isSmallInteger(angle)) { |
4718 | 767 |
f_angle = (float)(__intVal(angle)); |
768 |
if (f_angle != 0.0) { |
|
769 |
#ifdef OPENGL |
|
770 |
#else |
|
771 |
rot(f_angle, axis); |
|
772 |
#endif |
|
773 |
} |
|
774 |
return (true); |
|
29 | 775 |
} |
776 |
return false; |
|
777 |
} |
|
0 | 778 |
|
24 | 779 |
/* |
29 | 780 |
* fetch integers from an st-array (elements must be smallIntegers) |
781 |
*/ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
782 |
long * |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
783 |
__glx_getLongsFromInto(obj, vec, count) |
29 | 784 |
OBJ obj; |
785 |
long *vec; |
|
786 |
{ |
|
787 |
OBJ cls, o; |
|
788 |
int nByte, i, ninstVars, nInstBytes; |
|
789 |
char *pElem; |
|
790 |
||
791 |
if (! _isNonNilObject(obj)) return (long *)NULL; |
|
134 | 792 |
cls = __qClass(obj); |
185 | 793 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
29 | 794 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 795 |
nByte = __qSize(obj) - nInstBytes; |
29 | 796 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
797 |
if (nByte < (count * sizeof(OBJ))) return (long *)NULL; |
|
798 |
for (i=0; i<count; i++) { |
|
4718 | 799 |
o = *(OBJ *)pElem; |
800 |
if (! __isSmallInteger(o)) return (long *)NULL; |
|
801 |
vec[i] = (long)__intVal(o); |
|
802 |
pElem += sizeof(OBJ); |
|
29 | 803 |
} |
804 |
return vec; |
|
805 |
} |
|
806 |
||
807 |
/* |
|
808 |
* fetch shorts from an st-array (elements must be smallIntegers) |
|
809 |
*/ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
810 |
short * |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
811 |
__glx_getShortsFromInto(obj, vec, count) |
29 | 812 |
OBJ obj; |
813 |
short *vec; |
|
814 |
{ |
|
815 |
OBJ cls, o; |
|
816 |
int nByte, i, ninstVars, nInstBytes; |
|
817 |
char *pElem; |
|
818 |
||
819 |
if (! _isNonNilObject(obj)) return (short *)NULL; |
|
134 | 820 |
cls = __qClass(obj); |
185 | 821 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
29 | 822 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 823 |
nByte = __qSize(obj) - nInstBytes; |
29 | 824 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
825 |
if (nByte < (count * sizeof(OBJ))) return (short *)NULL; |
|
826 |
for (i=0; i<count; i++) { |
|
4718 | 827 |
o = *(OBJ *)pElem; |
828 |
if (! __isSmallInteger(o)) return (short *)NULL; |
|
829 |
vec[i] = (short)__intVal(o); |
|
830 |
pElem += sizeof(OBJ); |
|
29 | 831 |
} |
832 |
return vec; |
|
833 |
} |
|
834 |
||
835 |
/* |
|
4718 | 836 |
* fetch floats from an st-object into a c-float array |
29 | 837 |
* which may be a floatArray, doubleArray or array-of-something, |
838 |
* where something may be a float, fraction or smallInteger, |
|
24 | 839 |
*/ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
840 |
float * |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
841 |
__glx_getFloatsFromInto(obj, vec, count) |
12 | 842 |
OBJ obj; |
843 |
float *vec; |
|
844 |
{ |
|
845 |
OBJ cls; |
|
846 |
int nByte; |
|
847 |
OBJ o; |
|
848 |
int i, ninstVars, nInstBytes; |
|
849 |
char *pElem; |
|
850 |
||
851 |
if (! _isNonNilObject(obj)) return (float *)0; |
|
852 |
||
134 | 853 |
cls = __qClass(obj); |
185 | 854 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
12 | 855 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 856 |
nByte = __qSize(obj) - nInstBytes; |
12 | 857 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
858 |
||
185 | 859 |
switch (__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) { |
12 | 860 |
case FLOATARRAY: |
4718 | 861 |
/* |
862 |
* best speed for float array |
|
863 |
* - the data is already as we want it |
|
864 |
*/ |
|
865 |
if (nByte < (count * sizeof(float))) return (float *)0; |
|
866 |
return (float *)pElem; |
|
12 | 867 |
|
868 |
case DOUBLEARRAY: |
|
4718 | 869 |
/* |
870 |
* for double array, have to copy-and-cast |
|
871 |
*/ |
|
872 |
if (nByte < (count * sizeof(double))) return (float *)0; |
|
873 |
for (i=0; i<count; i++) { |
|
874 |
vec[i] = *((double *)pElem); |
|
875 |
pElem += sizeof(double); |
|
876 |
} |
|
877 |
return vec; |
|
12 | 878 |
|
879 |
case POINTERARRAY: |
|
4718 | 880 |
/* |
881 |
* for other array, have to fetch, check and store |
|
882 |
* the elements can be floats, smallintegers or fractions |
|
883 |
*/ |
|
884 |
if (nByte < (count * sizeof(OBJ))) return (float *)0; |
|
885 |
/* get elements one-by-one */ |
|
886 |
for (i=0; i<count; i++) { |
|
887 |
o = *(OBJ *)pElem; |
|
888 |
if (__isFloat(o)) { |
|
889 |
vec[i] = _floatVal(o); |
|
890 |
} else if (__isSmallInteger(o)) { |
|
891 |
vec[i] = (float)(__intVal(o)); |
|
892 |
} else if (__isFraction(o) |
|
893 |
&& __isSmallInteger(_FractionInstPtr(o)->f_numerator) |
|
894 |
&& __isSmallInteger(_FractionInstPtr(o)->f_denominator)) { |
|
895 |
float n, d; |
|
896 |
||
897 |
n = (float)(__intVal(_FractionInstPtr(o)->f_numerator)); |
|
898 |
d = (float)(__intVal(_FractionInstPtr(o)->f_denominator)); |
|
899 |
vec[i] = n / d; |
|
900 |
} else |
|
901 |
return 0; |
|
902 |
pElem += sizeof(OBJ); |
|
903 |
} |
|
904 |
return vec; |
|
12 | 905 |
} |
906 |
return (float *)0; |
|
907 |
} |
|
908 |
||
29 | 909 |
/* |
4718 | 910 |
* fetch doubles from an st-object into a c-double array |
29 | 911 |
* which may be a floatArray, doubleArray or array-of-something, |
912 |
* where something may be a float, fraction or smallInteger, |
|
913 |
*/ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
914 |
double * |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
915 |
__glx_getDoublesFromInto(obj, vec, count) |
29 | 916 |
OBJ obj; |
917 |
double *vec; |
|
918 |
{ |
|
919 |
OBJ cls, o; |
|
920 |
int nByte, i, ninstVars, nInstBytes; |
|
921 |
char *pElem; |
|
922 |
||
923 |
if (! _isNonNilObject(obj)) return (double *)0; |
|
134 | 924 |
cls = __qClass(obj); |
185 | 925 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
29 | 926 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 927 |
nByte = __qSize(obj) - nInstBytes; |
29 | 928 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
929 |
||
185 | 930 |
switch (__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) { |
29 | 931 |
case DOUBLEARRAY: |
4718 | 932 |
/* best speed for double array - the data is already as we want it */ |
933 |
if (nByte < (count * sizeof(double))) return (double *)0; |
|
934 |
return (double *)pElem; |
|
29 | 935 |
|
936 |
case FLOATARRAY: |
|
4718 | 937 |
if (nByte < (count * sizeof(float))) return (double *)0; |
938 |
for (i=0; i<count; i++) { |
|
939 |
vec[i] = *((float *)pElem); |
|
940 |
pElem += sizeof(float); |
|
941 |
} |
|
942 |
return vec; |
|
29 | 943 |
|
944 |
case POINTERARRAY: |
|
4718 | 945 |
if (nByte < (count * sizeof(OBJ))) return (double *)0; |
946 |
/* get elements one-by-one */ |
|
947 |
for (i=0; i<count; i++) { |
|
948 |
o = *(OBJ *)pElem; |
|
949 |
if (__isFloat(o)) |
|
950 |
vec[i] = _floatVal(o); |
|
951 |
else if (__isSmallInteger(o)) |
|
952 |
vec[i] = (double)(__intVal(o)); |
|
953 |
else if (__isFraction(o) |
|
954 |
&& __isSmallInteger(_FractionInstPtr(o)->f_numerator) |
|
955 |
&& __isSmallInteger(_FractionInstPtr(o)->f_denominator)) { |
|
956 |
double n, d; |
|
957 |
||
958 |
n = (double)(__intVal(_FractionInstPtr(o)->f_numerator)); |
|
959 |
d = (double)(__intVal(_FractionInstPtr(o)->f_denominator)); |
|
960 |
vec[i] = n / d; |
|
961 |
||
962 |
} else |
|
963 |
return 0; |
|
964 |
pElem += sizeof(OBJ); |
|
965 |
} |
|
966 |
return vec; |
|
29 | 967 |
} |
968 |
return (double *)0; |
|
969 |
} |
|
970 |
||
971 |
/* |
|
972 |
* move from a c-float array into an st-object, |
|
973 |
* the st-object MUST be either a float- or double array |
|
974 |
*/ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
975 |
__glx_putFloatsFromInto(vec, obj, count) |
12 | 976 |
OBJ obj; |
977 |
float *vec; |
|
978 |
{ |
|
979 |
OBJ cls; |
|
980 |
int nByte; |
|
981 |
OBJ o; |
|
982 |
int i, ninstVars, nInstBytes; |
|
983 |
char *pElem; |
|
984 |
||
985 |
if (! _isNonNilObject(obj)) return 0; |
|
986 |
||
134 | 987 |
cls = __qClass(obj); |
185 | 988 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
12 | 989 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 990 |
nByte = __qSize(obj) - nInstBytes; |
12 | 991 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
992 |
||
185 | 993 |
switch (__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) { |
12 | 994 |
case FLOATARRAY: |
4718 | 995 |
if (nByte < (count * sizeof(float))) return 0; |
996 |
for (i=0; i<count; i++) { |
|
997 |
*(float *)pElem = vec[i]; |
|
998 |
pElem += sizeof(float); |
|
999 |
} |
|
1000 |
return 1; |
|
12 | 1001 |
|
1002 |
case DOUBLEARRAY: |
|
4718 | 1003 |
if (nByte < (count * sizeof(float))) return 0; |
1004 |
for (i=0; i<count; i++) { |
|
1005 |
*(double *)pElem = vec[i]; |
|
1006 |
pElem += sizeof(double); |
|
1007 |
} |
|
1008 |
return 1; |
|
12 | 1009 |
} |
1010 |
/* not implemented for others */ |
|
1011 |
||
1012 |
return 0; |
|
1013 |
} |
|
1014 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1015 |
#ifndef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1016 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1017 |
Matrix * |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1018 |
__glx_getFloatsFromMatrixInto(obj, mp) |
12 | 1019 |
OBJ obj; |
1020 |
Matrix *mp; |
|
1021 |
{ |
|
1022 |
OBJ cls; |
|
1023 |
int nByte; |
|
1024 |
OBJ o; |
|
29 | 1025 |
int ninstVars, nInstBytes; |
1026 |
char *pElem; |
|
1027 |
int x = 0; |
|
1028 |
int i,j; |
|
12 | 1029 |
|
1030 |
if (! _isNonNilObject(obj)) return (Matrix *)0; |
|
1031 |
||
134 | 1032 |
cls = __qClass(obj); |
185 | 1033 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
29 | 1034 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
134 | 1035 |
nByte = __qSize(obj) - nInstBytes; |
29 | 1036 |
pElem = (char *)(_InstPtr(obj)) + nInstBytes; |
1037 |
||
185 | 1038 |
switch (__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) { |
4718 | 1039 |
case FLOATARRAY: |
1040 |
/* |
|
1041 |
* very easy for FLOATARRAY objects - no copying needed |
|
1042 |
*/ |
|
1043 |
if (nByte < (16 * sizeof(float))) return (Matrix *)0; |
|
1044 |
return (Matrix *) _FloatArrayInstPtr(obj)->f_element; |
|
1045 |
||
1046 |
case DOUBLEARRAY: |
|
1047 |
/* |
|
1048 |
* for DOUBLEARRAY objects copy and cast |
|
1049 |
*/ |
|
1050 |
if (nByte < (16 * sizeof(double))) return (Matrix *)0; |
|
1051 |
for (i=0; i<4; i++) { |
|
1052 |
for (j=0; j<4; j++) { |
|
1053 |
(*mp)[i][j] = _DoubleArrayInstPtr(obj)->d_element[x]; |
|
1054 |
x++; |
|
1055 |
} |
|
1056 |
} |
|
1057 |
return mp; |
|
1058 |
||
1059 |
case POINTERARRAY: |
|
1060 |
if (nByte < (16 * sizeof(OBJ))) return (Matrix *)0; |
|
1061 |
/* |
|
1062 |
* get elements one-by-one |
|
1063 |
*/ |
|
1064 |
for (i=0; i<4; i++) { |
|
1065 |
for (j=0; j<4; j++) { |
|
1066 |
o = _ArrayInstPtr(obj)->a_element[x]; |
|
1067 |
if (__isFloat(o)) { |
|
1068 |
(*mp)[i][j] = _floatVal(o); |
|
1069 |
} else if (__isSmallInteger(o)) { |
|
1070 |
(*mp)[i][j] = (double)__intVal(o); |
|
1071 |
} else if (__isFraction(o) |
|
1072 |
&& __isSmallInteger(_FractionInstPtr(o)->f_numerator) |
|
1073 |
&& __isSmallInteger(_FractionInstPtr(o)->f_denominator)) { |
|
1074 |
double n, d; |
|
1075 |
||
1076 |
n = (double)(__intVal(_FractionInstPtr(o)->f_numerator)); |
|
1077 |
d = (double)(__intVal(_FractionInstPtr(o)->f_denominator)); |
|
1078 |
(*mp)[i][j] = n / d; |
|
1079 |
} else |
|
1080 |
return (Matrix *)0; |
|
1081 |
x++; |
|
1082 |
} |
|
1083 |
} |
|
1084 |
return mp; |
|
12 | 1085 |
} |
1086 |
return (Matrix *)0; |
|
1087 |
} |
|
1088 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1089 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1090 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1091 |
float* |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1092 |
__glx_getFloatsFromFloatArrayInto(obj, fp) |
46 | 1093 |
OBJ obj; |
1094 |
float *fp; |
|
1095 |
{ |
|
1096 |
OBJ cls; |
|
1097 |
int ninstVars; |
|
1098 |
||
1099 |
if (! _isNonNilObject(obj)) return (float *)0; |
|
134 | 1100 |
cls = __qClass(obj); |
350 | 1101 |
if (cls == @global(FloatArray)) |
4718 | 1102 |
return _FloatArrayInstPtr(obj)->f_element; |
46 | 1103 |
|
185 | 1104 |
if ((__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) == FLOATARRAY) { |
4718 | 1105 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
1106 |
return (float *) &(_InstPtr(obj)->i_instvars[ninstVars]); |
|
46 | 1107 |
} |
1108 |
||
1109 |
/* |
|
1110 |
* need more here (i.e. convert from array-of-floats) |
|
1111 |
*/ |
|
1112 |
return (float *)0; |
|
1113 |
} |
|
1114 |
||
1115 |
%} |
|
1116 |
! ! |
|
0 | 1117 |
|
294 | 1118 |
!GLXWorkstation class methodsFor:'documentation'! |
1119 |
||
1120 |
copyright |
|
1121 |
" |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1122 |
COPYRIGHT (c) 1993 by Claus Gittinger |
8420 | 1123 |
COPYRIGHT (c) 2017 Jan Vrany |
294 | 1124 |
All Rights Reserved |
1125 |
||
1126 |
This software is furnished under a license and may be used |
|
1127 |
only in accordance with the terms of that license and with the |
|
1128 |
inclusion of the above copyright notice. This software may not |
|
1129 |
be provided or otherwise made available to, or used by, any |
|
1130 |
other person. No title to or ownership of the software is |
|
1131 |
hereby transferred. |
|
1132 |
" |
|
1133 |
! |
|
1134 |
||
1135 |
documentation |
|
1136 |
" |
|
1137 |
this class was originally written as a demo on how an interface to |
|
1138 |
a c graphics library could be implemented. In the mean time, it has become |
|
1139 |
quite complete ... |
|
1140 |
||
1141 |
It provides an interface to either a real GL (on SGI workstations) |
|
1142 |
or a simulated VGL (i.e. GL-light; low nicotine). |
|
1143 |
The GL simulation is derived from the PD vogl library, with slight |
|
1144 |
modifictions to support multiple GL views. |
|
1145 |
||
1146 |
Most of the hard work was done by Jeff (thanks indeed) ... |
|
1147 |
||
1148 |
||
1149 |
Some notes: |
|
1150 |
||
1151 |
I do not really know what most of these functions do - for more |
|
1152 |
detail, see the GL man pages (on SGI) or the doc provided with VGL. |
|
1153 |
||
1154 |
The interface offered here provides a very very low level (i.e one-to-one) |
|
1155 |
interface to GL functions. More high-level stuff is required, to make |
|
4718 | 1156 |
3D drawing be more object-oriented. |
294 | 1157 |
(see a bit of this in 'clients/IRIS-specials') |
1158 |
||
1159 |
Some functions are duplicated, Jeff and I developed those in parallel - |
|
1160 |
for now, both will remain - finally they will be merged and duplicates removed ... |
|
1161 |
(examples are makeobj and makeObject). |
|
1162 |
||
1163 |
Also, in a hurry to implement all those methods, many do no or only |
|
1164 |
limited argument checking - make certain, that you pass the correct |
|
1165 |
arguments. |
|
1166 |
||
1167 |
There might be some confusion in the v3[sifd] functions: basically they |
|
1168 |
all do the same, and could be mapped onto one st-method (such as vertex3). |
|
7657 | 1169 |
However, the C-functions expect different argument types - I don't know if |
294 | 1170 |
one or another of these functions suffers from any performance penalties. |
1171 |
Therefore, I leave the direct 1-to-1 mapping; GL experts might know more |
|
1172 |
about this (I use v3f in all of my code). |
|
1173 |
||
1174 |
written june 93 by claus |
|
1175 |
VGL stuff dec 93 |
|
1176 |
many many additions jan 94 by Jeff McAffer <jeff@is.s.u-tokyo.ac.jp> |
|
1177 |
||
4718 | 1178 |
Since this is a demo (consider it a free add-on goody) there is |
294 | 1179 |
*** NO WARRANTY ** for this. |
1180 |
||
1181 |
Notice: this should be rewritten to use the openGL library functions |
|
1182 |
(actually, to not loose the VGL interface, another OpenGLWorkstation |
|
1183 |
class should be written) |
|
614 | 1184 |
|
1185 |
[author:] |
|
7657 | 1186 |
Claus Gittinger |
1187 |
Jeff McAffer |
|
294 | 1188 |
" |
1189 |
! ! |
|
1190 |
||
168 | 1191 |
!GLXWorkstation class methodsFor:'error handling'! |
1192 |
||
294 | 1193 |
errorStringOfLastError |
1194 |
%{ |
|
4251 | 1195 |
#ifdef DYNAMICALLY_LOADABLE |
1065
fdc5b9059d82
removed all COMMA_CON / CON_COMMA uses
Claus Gittinger <cg@exept.de>
parents:
969
diff
changeset
|
1196 |
RETURN ( __MKSTRING(lastErrorMsg) ); |
4251 | 1197 |
#endif |
1198 |
%}. |
|
1199 |
||
1200 |
^ super errorStringOfLastError. |
|
1201 |
! |
|
1202 |
||
1203 |
minorCodeOfLastError |
|
1204 |
%{ /* NOCONTEXT */ |
|
1205 |
#ifdef DYNAMICALLY_LOADABLE |
|
1206 |
RETURN ( __MKSMALLINT(lastMinorCode) ); |
|
1207 |
#endif |
|
1208 |
%}. |
|
1209 |
||
1210 |
^ super minorCodeOfLastError. |
|
1211 |
! |
|
1212 |
||
1213 |
requestCodeOfLastError |
|
1214 |
%{ /* NOCONTEXT */ |
|
1215 |
#ifdef DYNAMICALLY_LOADABLE |
|
1216 |
RETURN ( __MKSMALLINT(lastRequestCode) ); |
|
1217 |
#endif |
|
1218 |
%}. |
|
1219 |
||
1220 |
^ super requestCodeOfLastError. |
|
1221 |
! |
|
1222 |
||
1223 |
resourceIdOfLastError |
|
1224 |
%{ /* NOCONTEXT */ |
|
1225 |
#ifdef DYNAMICALLY_LOADABLE |
|
1226 |
if (lastResource != 0) { |
|
1227 |
RETURN ( __MKEXTERNALADDRESS(lastResource) ); |
|
1228 |
} |
|
1229 |
RETURN ( nil ); |
|
1230 |
#endif |
|
1231 |
%}. |
|
1232 |
||
1233 |
^ super resourceIdOfLastError. |
|
1234 |
! ! |
|
1235 |
||
1236 |
!GLXWorkstation class methodsFor:'misc'! |
|
168 | 1237 |
|
528 | 1238 |
forceGL:aBoolean |
1239 |
ForceGL := aBoolean. |
|
1240 |
AllScreens notNil ifTrue:[ |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1241 |
AllScreens do:[:screen | screen initializeScreenProperties] |
528 | 1242 |
]. |
294 | 1243 |
! ! |
1244 |
||
1245 |
!GLXWorkstation methodsFor:'arcs and circles'! |
|
1246 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1247 |
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
|
1248 |
"draw an arc at a given location. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1249 |
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
|
1250 |
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
|
1251 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1252 |
%{ /* NOCONTEXT */ |
294 | 1253 |
Coord c_x, c_y, c_radius; |
1254 |
Angle a_startang, a_endang; |
|
1255 |
||
1256 |
_COORD_(x, c_x) |
|
1257 |
_COORD_(y, c_y) |
|
1258 |
_COORD_(radius, c_radius) |
|
1259 |
_ANGLE_(startang, a_startang) |
|
1260 |
_ANGLE_(endang, a_endang) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1261 |
|
294 | 1262 |
SETWIN(aGLXWindowId) |
1932 | 1263 |
#ifdef OPENGL |
1264 |
#else |
|
294 | 1265 |
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
|
1266 |
#endif |
294 | 1267 |
%} |
528 | 1268 |
|
1269 |
"Modified: 19.3.1996 / 18:43:52 / cg" |
|
294 | 1270 |
! |
1271 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1272 |
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
|
1273 |
"draw a filled arc. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1274 |
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
|
1275 |
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
|
1276 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1277 |
%{ /* NOCONTEXT */ |
294 | 1278 |
Coord c_x, c_y, c_radius; |
1279 |
Angle a_startang, a_endang; |
|
1280 |
||
1281 |
_COORD_(x, c_x) |
|
1282 |
_COORD_(y, c_y) |
|
1283 |
_COORD_(radius, c_radius) |
|
1284 |
_ANGLE_(startang, a_startang) |
|
1285 |
_ANGLE_(endang, a_endang) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1286 |
|
294 | 1287 |
SETWIN(aGLXWindowId) |
1932 | 1288 |
#ifdef OPENGL |
1289 |
#else |
|
294 | 1290 |
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
|
1291 |
#endif |
294 | 1292 |
%} |
1293 |
! |
|
1294 |
||
1295 |
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
|
1296 |
"draw a filled arc. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1297 |
All arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1298 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1299 |
%{ /* NOCONTEXT */ |
294 | 1300 |
Icoord c_x, c_y, c_radius; |
1301 |
Angle a_startang, a_endang; |
|
1302 |
||
1303 |
_ICOORD_(x, c_x) |
|
1304 |
_ICOORD_(y, c_y) |
|
1305 |
_ICOORD_(radius, c_radius) |
|
1306 |
_ANGLE_(startang, a_startang); |
|
1307 |
_ANGLE_(endang, a_endang) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1308 |
|
294 | 1309 |
SETWIN(aGLXWindowId) |
1932 | 1310 |
#ifdef OPENGL |
1311 |
#else |
|
294 | 1312 |
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
|
1313 |
#endif |
294 | 1314 |
%} |
1315 |
! |
|
1316 |
||
1317 |
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
|
1318 |
"draw a filled arc. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1319 |
All arguments must be (16bit) smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1320 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1321 |
%{ /* NOCONTEXT */ |
294 | 1322 |
Scoord c_x, c_y, c_radius; |
1323 |
Angle a_startang, a_endang; |
|
1324 |
||
1325 |
_SCOORD_(x, c_x) |
|
1326 |
_SCOORD_(y, c_y) |
|
1327 |
_SCOORD_(radius, c_radius) |
|
1328 |
_ANGLE_(startang, a_startang) |
|
1329 |
_ANGLE_(endang, a_endang) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1330 |
|
294 | 1331 |
SETWIN(aGLXWindowId) |
1932 | 1332 |
#ifdef OPENGL |
1333 |
#else |
|
294 | 1334 |
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
|
1335 |
#endif |
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 |
! |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1338 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1339 |
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
|
1340 |
"draw an (unfilled) arc. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1341 |
All arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1342 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1343 |
%{ /* NOCONTEXT */ |
294 | 1344 |
Icoord c_x, c_y, c_radius; |
1345 |
Angle a_startang, a_endang; |
|
1346 |
||
1347 |
_ICOORD_(x, c_x) |
|
1348 |
_ICOORD_(y, c_y) |
|
1349 |
_ICOORD_(radius, c_radius) |
|
1350 |
_ANGLE_(startang, a_startang) |
|
1351 |
_ANGLE_(endang, a_endang) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1352 |
|
294 | 1353 |
SETWIN(aGLXWindowId) |
1932 | 1354 |
#ifdef OPENGL |
1355 |
#else |
|
294 | 1356 |
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
|
1357 |
#endif |
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 |
! |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1360 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1361 |
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
|
1362 |
"draw an (unfilled) arc. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1363 |
All arguments must be (16bit) smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1364 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1365 |
%{ /* NOCONTEXT */ |
1932 | 1366 |
Scoord c_x, c_y, c_radius; |
1367 |
Angle a_startang, a_endang; |
|
1368 |
||
1369 |
_SCOORD_(x, c_x) |
|
1370 |
_SCOORD_(y, c_y) |
|
1371 |
_SCOORD_(radius, c_radius) |
|
1372 |
_ANGLE_(startang, a_startang) |
|
1373 |
_ANGLE_(endang, a_endang) |
|
1374 |
||
1375 |
SETWIN(aGLXWindowId) |
|
1376 |
#ifdef OPENGL |
|
1377 |
#else |
|
1378 |
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
|
1379 |
#endif |
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 |
! |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1382 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1383 |
glxCircX:x y:y radius: radius in: aGLXWindowId |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1384 |
"draw a circle. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1385 |
x/y/radius may be floats, fractions or smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1386 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1387 |
%{ /* NOCONTEXT */ |
1932 | 1388 |
Coord c_x, c_y, c_radius; |
1389 |
||
1390 |
_COORD_ (x, c_x) |
|
1391 |
_COORD_ (y, c_y) |
|
1392 |
_COORD_ (radius, c_radius) |
|
1393 |
||
1394 |
SETWIN(aGLXWindowId) |
|
1395 |
#ifdef OPENGL |
|
1396 |
#else |
|
1397 |
circ(c_x, c_y, c_radius); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1398 |
#endif |
294 | 1399 |
%} |
1400 |
! |
|
1401 |
||
1402 |
glxCircfX: x y: y radius: radius in: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1403 |
"draw a filled circle. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1404 |
x/y/radius may be floats, fractions or smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1405 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1406 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1407 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1408 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1409 |
Coord c_x, c_y, c_radius; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1410 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1411 |
_COORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1412 |
_COORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1413 |
_COORD_ (radius, c_radius) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1414 |
|
1932 | 1415 |
#ifdef OPENGL |
1416 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1417 |
circf(c_x, c_y, c_radius); |
1932 | 1418 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1419 |
} |
294 | 1420 |
%} |
1421 |
! |
|
1422 |
||
1423 |
glxCircfiX: x y: y radius: radius in: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1424 |
"draw a filled circle. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1425 |
x/y/radius must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1426 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1427 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1428 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1429 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1430 |
Icoord c_x, c_y, c_radius; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1431 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1432 |
_ICOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1433 |
_ICOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1434 |
_ICOORD_ (radius, c_radius) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1435 |
|
1932 | 1436 |
#ifdef OPENGL |
1437 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1438 |
circfi(c_x, c_y, c_radius); |
1932 | 1439 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1440 |
} |
294 | 1441 |
%} |
1442 |
! |
|
1443 |
||
1444 |
glxCircfsX: x y: y radius: radius in: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1445 |
"draw a filled circle. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1446 |
x/y/radius must be (16bit) smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1447 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1448 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1449 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1450 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1451 |
Scoord c_x, c_y, c_radius; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1452 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1453 |
_SCOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1454 |
_SCOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1455 |
_SCOORD_ (radius, c_radius) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1456 |
|
1932 | 1457 |
#ifdef OPENGL |
1458 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1459 |
circfs(c_x, c_y, c_radius); |
1932 | 1460 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1461 |
} |
294 | 1462 |
%} |
1463 |
! |
|
1464 |
||
1465 |
glxCirciX: x y: y radius: radius in: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1466 |
"draw a circle (unfilled). |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1467 |
x/y/radius must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1468 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1469 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1470 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1471 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1472 |
Icoord c_x, c_y, c_radius; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1473 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1474 |
_ICOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1475 |
_ICOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1476 |
_ICOORD_ (radius, c_radius) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1477 |
|
1932 | 1478 |
#ifdef OPENGL |
1479 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1480 |
circi(c_x, c_y, c_radius); |
1932 | 1481 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1482 |
} |
294 | 1483 |
%} |
1484 |
! |
|
1485 |
||
1486 |
glxCircsX: x y: y radius: radius in: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1487 |
"draw a circle (unfilled) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1488 |
x/y/radius must be (16bit) smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1489 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1490 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1491 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1492 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1493 |
Scoord c_x, c_y, c_radius; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1494 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1495 |
_SCOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1496 |
_SCOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1497 |
_SCOORD_ (radius, c_radius) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1498 |
|
1932 | 1499 |
#ifdef OPENGL |
1500 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1501 |
circs(c_x, c_y, c_radius); |
1932 | 1502 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1503 |
} |
294 | 1504 |
%} |
1505 |
! ! |
|
1506 |
||
528 | 1507 |
!GLXWorkstation methodsFor:'attribute stack'! |
1508 |
||
1509 |
glxPopattributesIn: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1510 |
"pop (and forget) the top entry on the attribute stack" |
528 | 1511 |
|
1512 |
%{ /* NOCONTEXT */ |
|
1513 |
SETWIN(aGLXWindowId) |
|
1932 | 1514 |
#ifndef OPENGL |
528 | 1515 |
popattributes(); |
1932 | 1516 |
#endif |
528 | 1517 |
%} |
1518 |
||
1519 |
"Modified: 19.3.1996 / 18:42:53 / cg" |
|
1520 |
! |
|
1521 |
||
1522 |
glxPushattributesIn: aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1523 |
"save the current attributes on the attribute stack" |
528 | 1524 |
|
1525 |
%{ /* NOCONTEXT */ |
|
1526 |
SETWIN(aGLXWindowId) |
|
1932 | 1527 |
#ifndef OPENGL |
528 | 1528 |
pushattributes(); |
1932 | 1529 |
#endif |
528 | 1530 |
%} |
1531 |
||
1532 |
"Modified: 19.3.1996 / 18:43:04 / cg" |
|
1533 |
! ! |
|
1534 |
||
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1535 |
!GLXWorkstation methodsFor:'character position'! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1536 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1537 |
glxCmov2X: x y: y in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1538 |
"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
|
1539 |
The arguments may be floats, fractions or smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1540 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1541 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1542 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1543 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1544 |
Coord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1545 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1546 |
_COORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1547 |
_COORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1548 |
|
1932 | 1549 |
#ifdef OPENGL |
1550 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1551 |
cmov2(c_x, c_y); |
1932 | 1552 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1553 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1554 |
%} |
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 |
"Modified: 22.3.1996 / 18:17:38 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1557 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1558 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1559 |
glxCmov2iX: x y: y in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1560 |
"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
|
1561 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1562 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1563 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1564 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1565 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1566 |
Icoord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1567 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1568 |
_ICOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1569 |
_ICOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1570 |
|
1932 | 1571 |
#ifdef OPENGL |
1572 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1573 |
cmov2i(c_x, c_y); |
1932 | 1574 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1575 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1576 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1577 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1578 |
"Modified: 22.3.1996 / 18:17:43 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1579 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1580 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1581 |
glxCmov2sX: x y: y in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1582 |
"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
|
1583 |
The arguments must be (16bit) smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1584 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1585 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1586 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1587 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1588 |
Scoord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1589 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1590 |
_SCOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1591 |
_SCOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1592 |
|
1932 | 1593 |
#ifdef OPENGL |
1594 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1595 |
cmov2s(c_x, c_y); |
1932 | 1596 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1597 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1598 |
%} |
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 |
"Modified: 22.3.1996 / 18:17:47 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1601 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1602 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1603 |
glxCmovX: x y: y z: z in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1604 |
"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
|
1605 |
The arguments may be floats, fractions or smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1606 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1607 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1608 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1609 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1610 |
Coord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1611 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1612 |
_COORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1613 |
_COORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1614 |
_COORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1615 |
|
1932 | 1616 |
#ifdef OPENGL |
1617 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1618 |
cmov(c_x, c_y, c_z); |
1932 | 1619 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1620 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1621 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1622 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1623 |
"Modified: 22.3.1996 / 18:17:22 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1624 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1625 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1626 |
glxCmoviX: x y: y z: z in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1627 |
"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
|
1628 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1629 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1630 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1631 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1632 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1633 |
Icoord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1634 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1635 |
_ICOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1636 |
_ICOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1637 |
_ICOORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1638 |
|
1932 | 1639 |
#ifdef OPENGL |
1640 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1641 |
cmovi(c_x, c_y, c_z); |
1932 | 1642 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1643 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1644 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1645 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1646 |
"Modified: 22.3.1996 / 18:17:55 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1647 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1648 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1649 |
glxCmovsX: x y: y z: z in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1650 |
"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
|
1651 |
The arguments must be (16bit) smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1652 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1653 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1654 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1655 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1656 |
Scoord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1657 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1658 |
_SCOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1659 |
_SCOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1660 |
_SCOORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1661 |
|
1932 | 1662 |
#ifdef OPENGL |
1663 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
1664 |
cmovs(c_x, c_y, c_z); |
1932 | 1665 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1666 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1667 |
%} |
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 |
"Modified: 22.3.1996 / 18:17:59 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1670 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1671 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1672 |
glxGetcposIn: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1673 |
"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
|
1674 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1675 |
| x y | |
4718 | 1676 |
%{ |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1677 |
short s_x, s_y; |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1678 |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1679 |
SETWIN(aGLXWindowId) |
1932 | 1680 |
#ifdef OPENGL |
1681 |
#else |
|
1682 |
# ifdef GLX |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1683 |
getcpos(&s_x, &s_y); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1684 |
x = __MKSMALLINT(s_x); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1685 |
y = __MKSMALLINT(s_y); |
1932 | 1686 |
# endif |
1687 |
#endif |
|
1688 |
%}. |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1689 |
^x @ y |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1690 |
! ! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
1691 |
|
294 | 1692 |
!GLXWorkstation methodsFor:'clearing'! |
1693 |
||
1694 |
glxClearIn:aGLXWindowId |
|
1695 |
"clear to current color" |
|
1696 |
||
1697 |
%{ /* NOCONTEXT */ |
|
1698 |
SETWIN(aGLXWindowId) |
|
1932 | 1699 |
#ifdef OPENGL |
1700 |
#else |
|
294 | 1701 |
clear(); |
1932 | 1702 |
#endif |
294 | 1703 |
%} |
1704 |
! |
|
1705 |
||
1706 |
glxCzclearCval:cval zval:zval in:aGLXWindowId |
|
1707 |
"clear to a color (cval) and clear z buffer to zval simultaniously" |
|
1708 |
||
1709 |
%{ /* NOCONTEXT */ |
|
1932 | 1710 |
SETWIN(aGLXWindowId) |
1711 |
#ifdef OPENGL |
|
1712 |
#else |
|
1713 |
# ifdef GLX |
|
294 | 1714 |
czclear((ulong)__intVal(cval), __intVal(zval)); |
1932 | 1715 |
# endif |
1716 |
#endif |
|
1717 |
%} |
|
294 | 1718 |
! |
1719 |
||
1720 |
glxZClearIn:aGLXWindowId |
|
1721 |
"clear z buffer" |
|
1722 |
||
1723 |
%{ /* NOCONTEXT */ |
|
1932 | 1724 |
SETWIN(aGLXWindowId) |
1725 |
#ifdef OPENGL |
|
1726 |
#else |
|
1727 |
# ifdef GLX |
|
294 | 1728 |
zclear(); |
1932 | 1729 |
# endif |
1730 |
#endif |
|
1731 |
%} |
|
294 | 1732 |
! ! |
1733 |
||
1734 |
!GLXWorkstation methodsFor:'color'! |
|
1735 |
||
1736 |
glxColor:index in:aGLXWindowId |
|
4718 | 1737 |
"set the drawing color; |
7656 | 1738 |
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
|
1739 |
otherwise, better results are expected with float values." |
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 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1742 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1743 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1744 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1745 |
#else |
294 | 1746 |
if (__isSmallInteger(index)) { |
7656 | 1747 |
color((Colorindex)(__intVal(index))); |
1748 |
RETURN (self); |
|
294 | 1749 |
} |
1750 |
if (__isFloat(index)) { |
|
7656 | 1751 |
colorf((float)(_floatVal(index))); |
1752 |
RETURN (self); |
|
294 | 1753 |
} |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1754 |
#endif |
1932 | 1755 |
%} |
294 | 1756 |
! |
1757 |
||
1758 |
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
|
1759 |
"set the drawing color, including alpha value. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1760 |
The args must be integer values within 0..255" |
294 | 1761 |
|
1762 |
%{ /* NOCONTEXT */ |
|
1763 |
short s_r, s_g, s_b, s_a; |
|
1764 |
||
1765 |
_INT_(r, s_r); |
|
1766 |
_INT_(g, s_g); |
|
1767 |
_INT_(b, s_b); |
|
1768 |
_INT_(a, s_a); |
|
1769 |
SETWIN(aGLXWindowId) |
|
1932 | 1770 |
#ifdef GLX |
294 | 1771 |
cpack((((((s_a<<8) | s_b) << 8) | s_g) << 8) | s_r); |
1932 | 1772 |
#endif |
1773 |
%} |
|
294 | 1774 |
! |
1775 |
||
1776 |
glxColorRed:r green:g blue:b in:aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1777 |
"set the drawing color. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1778 |
The args must be integer values in 0..255" |
294 | 1779 |
|
1780 |
%{ /* NOCONTEXT */ |
|
1781 |
short s_r, s_g, s_b; |
|
1782 |
||
1783 |
_INT_(r, s_r); |
|
1784 |
_INT_(g, s_g); |
|
1785 |
_INT_(b, s_b); |
|
1786 |
SETWIN(aGLXWindowId) |
|
1932 | 1787 |
#ifdef GLX |
294 | 1788 |
RGBcolor(s_r, s_g, s_b); |
1932 | 1789 |
#endif |
1790 |
%} |
|
294 | 1791 |
! |
1792 |
||
528 | 1793 |
glxLrgbrangeRmin: rmin gmin: gmin bmin: bmin rmax: rmax gmax: gmax bmax: bmax |
1794 |
znear: znear zfar: zfar in: aGLXWindowId |
|
1795 |
||
1796 |
%{ /* NOCONTEXT */ |
|
1932 | 1797 |
SETWIN(aGLXWindowId) |
1798 |
#ifdef GLX |
|
4718 | 1799 |
lRGBrange(_shortVal(rmin), _shortVal(gmin), _shortVal(bmin), |
1800 |
_shortVal(rmax), _shortVal(gmax), _shortVal(bmax), |
|
528 | 1801 |
_longVal(znear), _longVal(zfar)); |
1932 | 1802 |
#endif |
1803 |
%} |
|
528 | 1804 |
! |
1805 |
||
1806 |
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
|
1807 |
"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
|
1808 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1809 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1810 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1811 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1812 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1813 |
#else |
528 | 1814 |
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
|
1815 |
#endif |
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 |
! |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1818 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1819 |
glxTextcolor:tcolor in: aGLXWindowId |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1820 |
"change the color used for text drawing" |
294 | 1821 |
|
1822 |
%{ /* NOCONTEXT */ |
|
1932 | 1823 |
SETWIN(aGLXWindowId) |
1824 |
#ifdef GLX |
|
294 | 1825 |
textcolor(_colorindexVal(tcolor)); |
1932 | 1826 |
#endif |
1827 |
%} |
|
294 | 1828 |
! ! |
1829 |
||
528 | 1830 |
!GLXWorkstation methodsFor:'curves'! |
1831 |
||
1832 |
glxCurvebasis: basid in: aGLXWindowId |
|
1833 |
"sets the basis type of curves" |
|
1834 |
||
1835 |
%{ /* NOCONTEXT */ |
|
1836 |
SETWIN(aGLXWindowId) |
|
1932 | 1837 |
#ifdef GLX |
528 | 1838 |
curvebasis(_shortVal(basid)); |
1932 | 1839 |
#endif |
528 | 1840 |
%} |
1841 |
||
1842 |
"Modified: 19.3.1996 / 18:47:09 / cg" |
|
1843 |
! |
|
1844 |
||
1845 |
glxCurveit: iterationcount in: aGLXWindowId |
|
1846 |
"Iterates the top matrix on the stack as a forward difference |
|
1847 |
matrix, drawing as it goes along." |
|
1848 |
||
1849 |
%{ /* NOCONTEXT */ |
|
1850 |
SETWIN(aGLXWindowId) |
|
1932 | 1851 |
#ifdef GLX |
528 | 1852 |
curveit(_shortVal(iterationcount)); |
1932 | 1853 |
#endif |
528 | 1854 |
%} |
1855 |
||
1856 |
"Modified: 19.3.1996 / 18:48:57 / cg" |
|
1857 |
! |
|
1858 |
||
1859 |
glxCurveprecision: nsegments in: aGLXWindowId |
|
1860 |
"sets the number of line segments that make up a curve segment" |
|
1861 |
||
1862 |
%{ /* NOCONTEXT */ |
|
1863 |
SETWIN(aGLXWindowId) |
|
1932 | 1864 |
#ifdef GLX |
528 | 1865 |
curveprecision(_shortVal(nsegments)); |
1932 | 1866 |
#endif |
528 | 1867 |
%} |
1868 |
||
1869 |
"Modified: 19.3.1996 / 18:47:43 / cg" |
|
1870 |
! ! |
|
1871 |
||
294 | 1872 |
!GLXWorkstation methodsFor:'double buffering'! |
1873 |
||
1874 |
glxBackBufferIn:aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1875 |
"switch to back buffer drawing - turning frontbuffer drawing off" |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1876 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1877 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1878 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1879 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1880 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1881 |
# ifdef GLX |
294 | 1882 |
frontbuffer(FALSE); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1883 |
# endif |
294 | 1884 |
backbuffer(TRUE); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1885 |
#endif |
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 |
! |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1888 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1889 |
glxBackbuffer:b in: aGLXWindowId |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1890 |
"turn backBuffer drawing on/off. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1891 |
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
|
1892 |
... enabling the backbuffer automatically disables frontbuffer drawing |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1893 |
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
|
1894 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1895 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1896 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1897 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1898 |
#else |
294 | 1899 |
backbuffer(_booleanVal(b)); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1900 |
#endif |
294 | 1901 |
%} |
528 | 1902 |
|
1903 |
"Modified: 19.3.1996 / 18:45:05 / cg" |
|
294 | 1904 |
! |
1905 |
||
1906 |
glxDoubleBufferIn:aGLXWindowId |
|
1907 |
"set double buffer mode" |
|
1908 |
||
1909 |
%{ /* NOCONTEXT */ |
|
1910 |
SETWIN(aGLXWindowId) |
|
1932 | 1911 |
#ifdef OPENGL |
1912 |
#else |
|
294 | 1913 |
doublebuffer(); |
1932 | 1914 |
#endif |
294 | 1915 |
%} |
1916 |
! |
|
1917 |
||
1918 |
glxFrontBufferIn:aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1919 |
"switch to front buffer drawing - turning backbuffer drawing off" |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1920 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1921 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1922 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1923 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1924 |
#else |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1925 |
# ifdef GLX |
294 | 1926 |
backbuffer(FALSE); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1927 |
# endif |
294 | 1928 |
frontbuffer(TRUE); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1929 |
#endif |
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 |
! |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1932 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1933 |
glxFrontbuffer:b in: aGLXWindowId |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1934 |
"turn on/off frontbuffer drawing. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1935 |
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
|
1936 |
... enabling the backbuffer automatically disables frontbuffer drawing |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1937 |
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
|
1938 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1939 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1940 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1941 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1942 |
#else |
294 | 1943 |
frontbuffer(_booleanVal(b)); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1944 |
#endif |
294 | 1945 |
%} |
528 | 1946 |
|
1947 |
"Modified: 19.3.1996 / 18:45:31 / cg" |
|
294 | 1948 |
! |
1949 |
||
1950 |
glxSingleBufferIn: aGLXWindowId |
|
1951 |
"set single buffer mode" |
|
1952 |
||
1953 |
%{ /* NOCONTEXT */ |
|
1954 |
SETWIN(aGLXWindowId) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1955 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1956 |
#else |
294 | 1957 |
singlebuffer(); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1958 |
#endif |
294 | 1959 |
%} |
1960 |
! |
|
1961 |
||
1962 |
glxSwapBuffersIn:aGLXWindowId |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1963 |
"swap the back and front buffers. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1964 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1965 |
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
|
1966 |
displayed and swap them for every frame." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1967 |
|
1903 | 1968 |
%{ /* UNLIMITEDSTACK */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1969 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1970 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1971 |
#else |
294 | 1972 |
swapbuffers(); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
1973 |
#endif |
294 | 1974 |
%} |
528 | 1975 |
|
1976 |
"Modified: 19.3.1996 / 18:45:47 / cg" |
|
294 | 1977 |
! ! |
1978 |
||
1979 |
!GLXWorkstation methodsFor:'flat drawing'! |
|
1980 |
||
1981 |
glxBeginClosedLineIn:aGLXWindowId |
|
1982 |
"start a closed line" |
|
1983 |
||
1984 |
%{ /* NOCONTEXT */ |
|
1932 | 1985 |
#ifdef OPENGL |
1986 |
#else |
|
294 | 1987 |
SETWIN(aGLXWindowId) |
1988 |
bgnclosedline(); |
|
1932 | 1989 |
#endif |
294 | 1990 |
%} |
1991 |
! |
|
1992 |
||
1993 |
glxBeginLineIn:aGLXWindowId |
|
1994 |
"start a line group" |
|
1995 |
||
2075 | 1996 |
%{ /* NOCONTEXT STACK:32000 */ |
1932 | 1997 |
#ifdef OPENGL |
1998 |
#else |
|
294 | 1999 |
SETWIN(aGLXWindowId) |
2000 |
bgnline(); |
|
1932 | 2001 |
#endif |
294 | 2002 |
%} |
2003 |
! |
|
2004 |
||
2005 |
glxBeginPointIn:aGLXWindowId |
|
2006 |
"start a point-group" |
|
2007 |
||
2008 |
%{ /* NOCONTEXT */ |
|
1932 | 2009 |
#ifdef OPENGL |
2010 |
#else |
|
294 | 2011 |
SETWIN(aGLXWindowId) |
2012 |
bgnpoint(); |
|
1932 | 2013 |
#endif |
294 | 2014 |
%} |
2015 |
! |
|
2016 |
||
2017 |
glxBeginPolygonIn:aGLXWindowId |
|
2018 |
"start a polygon" |
|
2019 |
||
2020 |
%{ /* NOCONTEXT */ |
|
1932 | 2021 |
#ifdef OPENGL |
2022 |
#else |
|
294 | 2023 |
SETWIN(aGLXWindowId) |
2024 |
bgnpolygon(); |
|
1932 | 2025 |
#endif |
294 | 2026 |
%} |
2027 |
! |
|
2028 |
||
2029 |
glxBeginQuadrilateralStripIn:aGLXWindowId |
|
2030 |
"start a quadrilateral strip" |
|
2031 |
||
2032 |
%{ /* NOCONTEXT */ |
|
1932 | 2033 |
#ifdef OPENGL |
2034 |
#else |
|
294 | 2035 |
SETWIN(aGLXWindowId) |
2036 |
bgnqstrip(); |
|
1932 | 2037 |
#endif |
294 | 2038 |
%} |
2039 |
! |
|
2040 |
||
2041 |
glxBeginTriangleMeshIn:aGLXWindowId |
|
2042 |
"start a triangle mesh" |
|
2043 |
||
2044 |
%{ /* NOCONTEXT */ |
|
1932 | 2045 |
#ifdef OPENGL |
2046 |
#else |
|
294 | 2047 |
SETWIN(aGLXWindowId) |
2048 |
bgntmesh(); |
|
1932 | 2049 |
#endif |
294 | 2050 |
%} |
2051 |
! |
|
2052 |
||
2053 |
glxEndClosedLineIn:aGLXWindowId |
|
2054 |
"end a closed line" |
|
2055 |
||
2056 |
%{ /* NOCONTEXT */ |
|
1932 | 2057 |
#ifdef OPENGL |
2058 |
#else |
|
294 | 2059 |
SETWIN(aGLXWindowId) |
2060 |
endclosedline(); |
|
1932 | 2061 |
#endif |
294 | 2062 |
%} |
2063 |
! |
|
2064 |
||
2065 |
glxEndLineIn:aGLXWindowId |
|
2066 |
"end a line group" |
|
2067 |
||
2075 | 2068 |
%{ /* NOCONTEXT STACK:32000 */ |
1932 | 2069 |
#ifdef OPENGL |
2070 |
#else |
|
294 | 2071 |
SETWIN(aGLXWindowId) |
2072 |
endline(); |
|
1932 | 2073 |
#endif |
294 | 2074 |
%} |
2075 |
! |
|
2076 |
||
2077 |
glxEndPointIn:aGLXWindowId |
|
2078 |
"end a point group" |
|
2079 |
||
2080 |
%{ /* NOCONTEXT */ |
|
1932 | 2081 |
#ifdef OPENGL |
2082 |
#else |
|
294 | 2083 |
SETWIN(aGLXWindowId) |
2084 |
endpoint(); |
|
1932 | 2085 |
#endif |
294 | 2086 |
%} |
2087 |
! |
|
2088 |
||
2089 |
glxEndPolygonIn:aGLXWindowId |
|
2090 |
"end a polygon" |
|
2091 |
||
2092 |
%{ /* NOCONTEXT */ |
|
1932 | 2093 |
#ifdef OPENGL |
2094 |
#else |
|
294 | 2095 |
SETWIN(aGLXWindowId) |
2096 |
endpolygon(); |
|
1932 | 2097 |
#endif |
294 | 2098 |
%} |
2099 |
! |
|
2100 |
||
2101 |
glxEndQuadrilateralStripIn:aGLXWindowId |
|
2102 |
"end a quadrilateral strip" |
|
2103 |
||
2104 |
%{ /* NOCONTEXT */ |
|
1932 | 2105 |
#ifdef OPENGL |
2106 |
#else |
|
294 | 2107 |
SETWIN(aGLXWindowId) |
2108 |
endqstrip(); |
|
1932 | 2109 |
#endif |
294 | 2110 |
%} |
2111 |
! |
|
2112 |
||
2113 |
glxEndTriangleMeshIn:aGLXWindowId |
|
2114 |
"end a triangle mesh" |
|
2115 |
||
2116 |
%{ /* NOCONTEXT */ |
|
1932 | 2117 |
#ifdef OPENGL |
2118 |
#else |
|
294 | 2119 |
SETWIN(aGLXWindowId) |
2120 |
endtmesh(); |
|
1932 | 2121 |
#endif |
168 | 2122 |
%} |
2123 |
! ! |
|
2124 |
||
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2125 |
!GLXWorkstation methodsFor:'graphics position'! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2126 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2127 |
glxMove2:v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2128 |
"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
|
2129 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2130 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2131 |
float vec[2], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2132 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2133 |
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
|
2134 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2135 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2136 |
#else |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2137 |
move2((Coord)(c_v[0]), (Coord)(c_v[1])); |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2138 |
RETURN (true); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2139 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2140 |
%} |
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 |
"Modified: 22.3.1996 / 18:15:23 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2143 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2144 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2145 |
glxMove2X: x y: y in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2146 |
"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
|
2147 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2148 |
%{ /* NOCONTEXT */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2149 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2150 |
Coord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2151 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2152 |
_COORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2153 |
_COORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2154 |
SETWIN(aGLXWindowId) |
1932 | 2155 |
#ifdef OPENGL |
2156 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2157 |
move2(c_x, c_y); |
1932 | 2158 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2159 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2160 |
%} |
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 |
"Modified: 22.3.1996 / 18:15:02 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2163 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2164 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2165 |
glxMove2iX: x y: y in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2166 |
"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
|
2167 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2168 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2169 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2170 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2171 |
Icoord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2172 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2173 |
_ICOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2174 |
_ICOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2175 |
SETWIN(aGLXWindowId) |
1932 | 2176 |
#ifdef OPENGL |
2177 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2178 |
move2i(c_x, c_y); |
1932 | 2179 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2180 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2181 |
%} |
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 |
"Modified: 22.3.1996 / 18:15:08 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2184 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2185 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2186 |
glxMove2sX: x y: y in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2187 |
"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
|
2188 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2189 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2190 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2191 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2192 |
Scoord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2193 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2194 |
_SCOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2195 |
_SCOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2196 |
SETWIN(aGLXWindowId) |
1932 | 2197 |
#ifdef OPENGL |
2198 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2199 |
move2s(c_x, c_y); |
1932 | 2200 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2201 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2202 |
%} |
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 |
"Modified: 22.3.1996 / 18:15:13 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2205 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2206 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2207 |
glxMove:v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2208 |
"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
|
2209 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2210 |
%{ /* NOCONTEXT */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2211 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2212 |
float vec[3], *c_v; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2213 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2214 |
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
|
2215 |
SETWIN(aGLXWindowId) |
1932 | 2216 |
#ifdef OPENGL |
2217 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2218 |
move((Coord)(c_v[0]), (Coord)(c_v[1]), (Coord)(c_v[2])); |
1932 | 2219 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2220 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2221 |
%} |
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 |
"Modified: 22.3.1996 / 18:14:29 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2224 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2225 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2226 |
glxMoveX: x y: y z: z in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2227 |
"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
|
2228 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2229 |
%{ /* NOCONTEXT */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2230 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2231 |
Coord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2232 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2233 |
_COORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2234 |
_COORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2235 |
_COORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2236 |
SETWIN(aGLXWindowId) |
1932 | 2237 |
#ifdef OPENGL |
2238 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2239 |
move(c_x, c_y, c_z); |
1932 | 2240 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2241 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2242 |
%} |
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 |
"Modified: 22.3.1996 / 18:14:38 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2245 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2246 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2247 |
glxMoveiX: x y: y z: z in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2248 |
"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
|
2249 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2250 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2251 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2252 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2253 |
Icoord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2254 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2255 |
_ICOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2256 |
_ICOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2257 |
_ICOORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2258 |
SETWIN(aGLXWindowId) |
1932 | 2259 |
#ifdef OPENGL |
2260 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2261 |
movei(c_x, c_y, c_z); |
1932 | 2262 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2263 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2264 |
%} |
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 |
"Modified: 22.3.1996 / 18:14:44 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2267 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2268 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2269 |
glxMovesX: x y: y z: z in: aGLXWindowId |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2270 |
"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
|
2271 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2272 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2273 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2274 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2275 |
Scoord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2276 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2277 |
_SCOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2278 |
_SCOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2279 |
_SCOORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2280 |
SETWIN(aGLXWindowId) |
1932 | 2281 |
#ifdef OPENGL |
2282 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2283 |
moves(c_x, c_y, c_z); |
1932 | 2284 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2285 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2286 |
%} |
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 |
"Modified: 22.3.1996 / 18:14:48 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2289 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2290 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2291 |
glxRmv2:v in: aGLXWindowId |
4718 | 2292 |
"change the graphics position to a 2D point, |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2293 |
the relative distance is passed in vector v" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2294 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2295 |
%{ /* NOCONTEXT */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2296 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2297 |
float vec[2], *c_v; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2298 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2299 |
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
|
2300 |
SETWIN(aGLXWindowId) |
1932 | 2301 |
#ifdef OPENGL |
2302 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2303 |
rmv2((Coord)(c_v[0]), (Coord)(c_v[1])); |
1932 | 2304 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2305 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2306 |
%} |
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 |
"Modified: 22.3.1996 / 18:15:57 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2309 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2310 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2311 |
glxRmv2X: x y: y in: aGLXWindowId |
4718 | 2312 |
"change the graphics position to a 2D point, |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2313 |
the relative distance is passed in x/y" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2314 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2315 |
%{ /* NOCONTEXT */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2316 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2317 |
Coord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2318 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2319 |
_COORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2320 |
_COORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2321 |
SETWIN(aGLXWindowId) |
1932 | 2322 |
#ifdef OPENGL |
2323 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2324 |
rmv2(c_x, c_y); |
1932 | 2325 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2326 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2327 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2328 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2329 |
"Modified: 22.3.1996 / 18:16:42 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2330 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2331 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2332 |
glxRmv2iX: x y: y in: aGLXWindowId |
4718 | 2333 |
"change the graphics position to a 2D point, |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2334 |
the relative distance is passed in x/y. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2335 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2336 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2337 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2338 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2339 |
Icoord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2340 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2341 |
_ICOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2342 |
_ICOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2343 |
SETWIN(aGLXWindowId) |
1932 | 2344 |
#ifdef OPENGL |
2345 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2346 |
rmv2i(c_x, c_y); |
1932 | 2347 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2348 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2349 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2350 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2351 |
"Modified: 22.3.1996 / 18:16:39 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2352 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2353 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2354 |
glxRmv2sX: x y: y in: aGLXWindowId |
4718 | 2355 |
"change the graphics position to a 2D point, |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2356 |
the relative distance is passed in x/y. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2357 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2358 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2359 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2360 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2361 |
Scoord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2362 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2363 |
_SCOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2364 |
_SCOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2365 |
SETWIN(aGLXWindowId) |
1932 | 2366 |
#ifdef OPENGL |
2367 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2368 |
rmv2s(c_x, c_y); |
1932 | 2369 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2370 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2371 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2372 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2373 |
"Modified: 22.3.1996 / 18:16:33 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2374 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2375 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2376 |
glxRmv:v in: aGLXWindowId |
4718 | 2377 |
"change the graphics position to a 3D point, |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2378 |
the relative distance is passed in vector v" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2379 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2380 |
%{ /* NOCONTEXT */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2381 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2382 |
float vec[3], *c_v; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2383 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2384 |
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
|
2385 |
SETWIN(aGLXWindowId) |
1932 | 2386 |
#ifdef OPENGL |
2387 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2388 |
rmv((Coord)(c_v[0]), (Coord)(c_v[1]), (Coord)(c_v[2])); |
1932 | 2389 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2390 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2391 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2392 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2393 |
"Modified: 22.3.1996 / 18:16:08 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2394 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2395 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2396 |
glxRmvX: x y: y z: z in: aGLXWindowId |
4718 | 2397 |
"change the graphics position to a 3D point, |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2398 |
the relative distance is passed in x/y/z" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2399 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2400 |
%{ /* NOCONTEXT */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2401 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2402 |
Coord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2403 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2404 |
_COORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2405 |
_COORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2406 |
_COORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2407 |
SETWIN(aGLXWindowId) |
1932 | 2408 |
#ifdef OPENGL |
2409 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2410 |
rmv(c_x, c_y, c_z); |
1932 | 2411 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2412 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2413 |
%} |
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 |
"Modified: 22.3.1996 / 18:16:16 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2416 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2417 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2418 |
glxRmviX: x y: y z: z in: aGLXWindowId |
4718 | 2419 |
"change the graphics position to a 3D point, |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2420 |
the relative distance is passed in x/y/z. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2421 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2422 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2423 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2424 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2425 |
Icoord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2426 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2427 |
_ICOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2428 |
_ICOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2429 |
_ICOORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2430 |
SETWIN(aGLXWindowId) |
1932 | 2431 |
#ifdef OPENGL |
2432 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2433 |
rmvi(c_x, c_y, c_z); |
1932 | 2434 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2435 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2436 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2437 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2438 |
"Modified: 22.3.1996 / 18:16:21 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2439 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2440 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2441 |
glxRmvsX: x y: y z: z in: aGLXWindowId |
4718 | 2442 |
"change the graphics position to a 3D point, |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2443 |
the relative distance is passed in x/y/z. |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2444 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2445 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2446 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2447 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2448 |
Scoord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2449 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2450 |
_SCOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2451 |
_SCOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2452 |
_SCOORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2453 |
SETWIN(aGLXWindowId) |
1932 | 2454 |
#ifdef OPENGL |
2455 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2456 |
rmvs(c_x, c_y, c_z); |
1932 | 2457 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2458 |
} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2459 |
%} |
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 |
"Modified: 22.3.1996 / 18:16:25 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2462 |
! ! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2463 |
|
168 | 2464 |
!GLXWorkstation methodsFor:'initialization'! |
2465 |
||
2466 |
initializeFor:aDisplayName |
|
169 | 2467 |
(super initializeFor:aDisplayName) isNil ifTrue:[^ nil]. |
168 | 2468 |
%{ |
2469 |
if (_INST(displayId) != nil) { |
|
185 | 2470 |
XSetErrorHandler(__XErrorHandler__); |
2471 |
} |
|
2472 |
%} |
|
2473 |
! |
|
2474 |
||
2475 |
initializeScreenProperties |
|
2476 |
super initializeScreenProperties. |
|
2477 |
||
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
2478 |
"/ 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
|
2479 |
"/ 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
|
2480 |
"/ 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
|
2481 |
"/ 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
|
2482 |
"/ 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
|
2483 |
"/ 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
|
2484 |
"/ 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
|
2485 |
"/ have no documentation). |
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
2486 |
"/ Late note: setting the ForceGL classVar overrides above behavior. |
4718 | 2487 |
"/ it may be set from a startupScript with: 'GLXWorkstation forceGL:true' |
2488 |
"/ 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
|
2489 |
|
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
2490 |
(self isTrueGL and:[ForceGL ~~ true]) ifTrue:[ |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
2491 |
glOK := (displayName = ':0') or:[displayName = ':0.0']. |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
2492 |
] ifFalse:[ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2493 |
glOK := true. |
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
2494 |
]. |
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
2495 |
|
185 | 2496 |
%{ |
2497 |
Display *dpy = myDpy; |
|
2498 |
int dummy; |
|
2499 |
||
2500 |
if (ISCONNECTED) { |
|
290
f9397ade6677
fix for sgi - need displayName to be set for initScreenProps
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
2501 |
_INST(hasStereoExtension) = false; |
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
2502 |
|
1932 | 2503 |
#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
|
2504 |
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
|
2505 |
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
|
2506 |
_INST(hasStereoExtension) = true; |
290
f9397ade6677
fix for sgi - need displayName to be set for initScreenProps
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
2507 |
} |
f9397ade6677
fix for sgi - need displayName to be set for initScreenProps
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
2508 |
#endif |
168 | 2509 |
} |
2510 |
%} |
|
2511 |
! ! |
|
2512 |
||
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2513 |
!GLXWorkstation methodsFor:'lines'! |
528 | 2514 |
|
2515 |
glxDeflinestyleN: n ls: ls in: aGLXWindowId |
|
2516 |
"define a line style" |
|
2517 |
||
2518 |
%{ /* NOCONTEXT */ |
|
1932 | 2519 |
SETWIN(aGLXWindowId) |
2520 |
#ifdef OPENGL |
|
2521 |
#else |
|
528 | 2522 |
deflinestyle(_shortVal(n), _linestyleVal(ls)); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2523 |
#endif |
528 | 2524 |
%} |
2525 |
! |
|
2526 |
||
2527 |
glxDraw2:v in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2528 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2529 |
to a new 2D position, passed in vector v." |
528 | 2530 |
|
2531 |
%{ /* NOCONTEXT */ |
|
2532 |
float vec[2], *c_v; |
|
2533 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2534 |
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
|
2535 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2536 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2537 |
#else |
528 | 2538 |
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
|
2539 |
#endif |
528 | 2540 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2541 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2542 |
"Modified: 22.3.1996 / 18:03:29 / cg" |
528 | 2543 |
! |
2544 |
||
2545 |
glxDraw2X: x y: y in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2546 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2547 |
to a new 2D position, passed in x/y." |
528 | 2548 |
|
2549 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2550 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2551 |
Coord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2552 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2553 |
_COORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2554 |
_COORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2555 |
SETWIN(aGLXWindowId) |
1932 | 2556 |
#ifdef OPENGL |
2557 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2558 |
draw2(c_x, c_y); |
1932 | 2559 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2560 |
} |
528 | 2561 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2562 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2563 |
"Modified: 22.3.1996 / 18:03:50 / cg" |
528 | 2564 |
! |
2565 |
||
2566 |
glxDraw2iX: x y: y in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2567 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2568 |
to a new 2D position, passed in x/y." |
528 | 2569 |
|
2570 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2571 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2572 |
Icoord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2573 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2574 |
_ICOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2575 |
_ICOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2576 |
SETWIN(aGLXWindowId) |
1932 | 2577 |
#ifdef OPENGL |
2578 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2579 |
draw2i(c_x, c_y); |
1932 | 2580 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2581 |
} |
528 | 2582 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2583 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2584 |
"Modified: 22.3.1996 / 18:04:07 / cg" |
528 | 2585 |
! |
2586 |
||
2587 |
glxDraw2sX: x y: y in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2588 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2589 |
to a new 2D position, passed in x/y." |
528 | 2590 |
|
2591 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2592 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2593 |
Scoord c_x, c_y; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2594 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2595 |
_SCOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2596 |
_SCOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2597 |
SETWIN(aGLXWindowId) |
1932 | 2598 |
#ifdef OPENGL |
2599 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2600 |
draw2s(c_x, c_y); |
1932 | 2601 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2602 |
} |
528 | 2603 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2604 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2605 |
"Modified: 22.3.1996 / 18:04:19 / cg" |
528 | 2606 |
! |
2607 |
||
2608 |
glxDraw:v in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2609 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2610 |
to a new 3D position, passed in vector v." |
528 | 2611 |
|
2612 |
%{ /* NOCONTEXT */ |
|
2613 |
float vec[3], *c_v; |
|
2614 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2615 |
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
|
2616 |
SETWIN(aGLXWindowId) |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2617 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2618 |
#else |
528 | 2619 |
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
|
2620 |
#endif |
528 | 2621 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2622 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2623 |
"Modified: 22.3.1996 / 18:04:34 / cg" |
528 | 2624 |
! |
2625 |
||
2626 |
glxDrawX: x y: y z: z in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2627 |
"draw a line from the current graphics position |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2628 |
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
|
2629 |
The arguments may be floats, fractions or smallIntegers" |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2630 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2631 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2632 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2633 |
Coord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2634 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2635 |
_COORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2636 |
_COORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2637 |
_COORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2638 |
SETWIN(aGLXWindowId) |
1932 | 2639 |
#ifdef OPENGL |
2640 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2641 |
draw(c_x, c_y, c_z); |
1932 | 2642 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2643 |
} |
528 | 2644 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2645 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2646 |
"Modified: 22.3.1996 / 18:04:46 / cg" |
528 | 2647 |
! |
2648 |
||
2649 |
glxDrawiX: x y: y z: z in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2650 |
"draw a line from the current graphics position |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2651 |
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
|
2652 |
The arguments must be smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2653 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2654 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2655 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2656 |
Icoord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2657 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2658 |
_ICOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2659 |
_ICOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2660 |
_ICOORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2661 |
SETWIN(aGLXWindowId) |
1932 | 2662 |
#ifdef OPENGL |
2663 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2664 |
drawi(c_x, c_y, c_z); |
1932 | 2665 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2666 |
} |
528 | 2667 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2668 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2669 |
"Modified: 22.3.1996 / 18:04:54 / cg" |
528 | 2670 |
! |
2671 |
||
2672 |
glxDrawsX: x y: y z: z in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2673 |
"draw a line from the current graphics position |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2674 |
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
|
2675 |
The arguments must be (16bit) smallIntegers." |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2676 |
|
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2677 |
%{ /* NOCONTEXT */ |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2678 |
{ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2679 |
Scoord c_x, c_y, c_z; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2680 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2681 |
_SCOORD_ (x, c_x) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2682 |
_SCOORD_ (y, c_y) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2683 |
_SCOORD_ (z, c_z) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2684 |
SETWIN(aGLXWindowId) |
1932 | 2685 |
#ifdef OPENGL |
2686 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
2687 |
draws(c_x, c_y, c_z); |
1932 | 2688 |
#endif |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2689 |
} |
528 | 2690 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2691 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2692 |
"Modified: 22.3.1996 / 18:05:01 / cg" |
528 | 2693 |
! |
2694 |
||
2695 |
glxLinewidth: n in: aGLXWindowId |
|
2696 |
"set the linewidth" |
|
2697 |
||
2698 |
%{ /* NOCONTEXT */ |
|
2699 |
SETWIN(aGLXWindowId) |
|
1932 | 2700 |
#ifdef OPENGL |
2701 |
#else |
|
528 | 2702 |
linewidth(_shortVal(n)); |
1932 | 2703 |
#endif |
528 | 2704 |
%} |
2705 |
! |
|
2706 |
||
2707 |
glxLinewidthf: n in: aGLXWindowId |
|
2708 |
"set the linewidth" |
|
2709 |
||
2710 |
%{ /* NOCONTEXT */ |
|
2711 |
SETWIN(aGLXWindowId) |
|
1932 | 2712 |
#ifdef OPENGL |
2713 |
#else |
|
528 | 2714 |
linewidthf(_floatVal(n)); |
1932 | 2715 |
#endif |
528 | 2716 |
RETURN (true); |
2717 |
%} |
|
2718 |
! |
|
2719 |
||
2720 |
glxRdr2:v in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2721 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2722 |
to a new 2D position, passing the relative distance in the vector v." |
528 | 2723 |
|
2724 |
%{ /* NOCONTEXT */ |
|
2725 |
float vec[2], *c_v; |
|
2726 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2727 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 2))) RETURN(false); |
528 | 2728 |
SETWIN(aGLXWindowId) |
1932 | 2729 |
#ifdef OPENGL |
2730 |
#else |
|
528 | 2731 |
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
|
2732 |
#endif |
528 | 2733 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2734 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2735 |
"Modified: 22.3.1996 / 18:05:54 / cg" |
528 | 2736 |
! |
2737 |
||
2738 |
glxRdr2X: x y: y in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2739 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2740 |
to a new 2D position, passing the relative distance in x/y." |
528 | 2741 |
|
2742 |
%{ /* NOCONTEXT */ |
|
2743 |
Coord c_x, c_y; |
|
2744 |
||
2745 |
_COORD_ (x, c_x) |
|
2746 |
_COORD_ (y, c_y) |
|
2747 |
SETWIN(aGLXWindowId) |
|
1932 | 2748 |
#ifdef OPENGL |
2749 |
#else |
|
528 | 2750 |
rdr2(c_x, c_y); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2751 |
#endif |
528 | 2752 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2753 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2754 |
"Modified: 22.3.1996 / 18:06:20 / cg" |
528 | 2755 |
! |
2756 |
||
2757 |
glxRdr2iX: x y: y in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2758 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2759 |
to a new 2D position, passing the relative distance in x/y." |
528 | 2760 |
|
2761 |
%{ /* NOCONTEXT */ |
|
2762 |
Icoord c_x, c_y; |
|
2763 |
||
2764 |
_ICOORD_ (x, c_x) |
|
2765 |
_ICOORD_ (y, c_y) |
|
2766 |
SETWIN(aGLXWindowId) |
|
1932 | 2767 |
#ifdef OPENGL |
2768 |
#else |
|
528 | 2769 |
rdr2i(c_x, c_y); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2770 |
#endif |
528 | 2771 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2772 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2773 |
"Modified: 22.3.1996 / 18:06:28 / cg" |
528 | 2774 |
! |
2775 |
||
2776 |
glxRdr2sX: x y: y in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2777 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2778 |
to a new 2D position, passing the relative distance in x/y." |
528 | 2779 |
|
2780 |
%{ /* NOCONTEXT */ |
|
2781 |
Scoord c_x, c_y; |
|
2782 |
||
2783 |
_SCOORD_ (x, c_x) |
|
2784 |
_SCOORD_ (y, c_y) |
|
2785 |
SETWIN(aGLXWindowId) |
|
1932 | 2786 |
#ifdef OPENGL |
2787 |
#else |
|
528 | 2788 |
rdr2s(c_x, c_y); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2789 |
#endif |
528 | 2790 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2791 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2792 |
"Modified: 22.3.1996 / 18:06:34 / cg" |
528 | 2793 |
! |
2794 |
||
2795 |
glxRdr:v in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2796 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2797 |
to a new 3D position, passing the relative distance in the vector v." |
528 | 2798 |
|
2799 |
%{ /* NOCONTEXT */ |
|
2800 |
float vec[3], *c_v; |
|
2801 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2802 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 3))) RETURN(false); |
528 | 2803 |
SETWIN(aGLXWindowId) |
1932 | 2804 |
#ifdef OPENGL |
2805 |
#else |
|
528 | 2806 |
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
|
2807 |
#endif |
528 | 2808 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2809 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2810 |
"Modified: 22.3.1996 / 18:06:07 / cg" |
528 | 2811 |
! |
2812 |
||
2813 |
glxRdrX: x y: y z: z in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2814 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2815 |
to a new 3D position, passing the relative distance in x/y/z." |
528 | 2816 |
|
2817 |
%{ /* NOCONTEXT */ |
|
2818 |
Coord c_x, c_y, c_z; |
|
2819 |
||
2820 |
_COORD_ (x, c_x) |
|
2821 |
_COORD_ (y, c_y) |
|
2822 |
_COORD_ (z, c_z) |
|
2823 |
SETWIN(aGLXWindowId) |
|
1932 | 2824 |
#ifdef OPENGL |
2825 |
#else |
|
528 | 2826 |
rdr(c_x, c_y, c_z); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2827 |
#endif |
528 | 2828 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2829 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2830 |
"Modified: 22.3.1996 / 18:06:44 / cg" |
528 | 2831 |
! |
2832 |
||
2833 |
glxRdriX: x y: y z: z in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2834 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2835 |
to a new 3D position, passing the relative distance in x/y/z." |
528 | 2836 |
|
2837 |
%{ /* NOCONTEXT */ |
|
2838 |
Icoord c_x, c_y, c_z; |
|
2839 |
||
2840 |
_ICOORD_ (x, c_x) |
|
2841 |
_ICOORD_ (y, c_y) |
|
2842 |
_ICOORD_ (z, c_z) |
|
2843 |
SETWIN(aGLXWindowId) |
|
1932 | 2844 |
#ifdef OPENGL |
2845 |
#else |
|
528 | 2846 |
rdri(c_x, c_y, c_z); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2847 |
#endif |
528 | 2848 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2849 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2850 |
"Modified: 22.3.1996 / 18:06:51 / cg" |
528 | 2851 |
! |
2852 |
||
2853 |
glxRdrsX: x y: y z: z in: aGLXWindowId |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2854 |
"draw a line from the current graphics position |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2855 |
to a new 3D position, passing the relative distance in x/y/z." |
528 | 2856 |
|
2857 |
%{ /* NOCONTEXT */ |
|
2858 |
Scoord c_x, c_y, c_z; |
|
2859 |
||
2860 |
_SCOORD_ (x, c_x) |
|
2861 |
_SCOORD_ (y, c_y) |
|
2862 |
_SCOORD_ (z, c_z) |
|
2863 |
SETWIN(aGLXWindowId) |
|
1932 | 2864 |
#ifdef OPENGL |
2865 |
#else |
|
528 | 2866 |
rdrs(c_x, c_y, c_z); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
2867 |
#endif |
528 | 2868 |
%} |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2869 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
2870 |
"Modified: 22.3.1996 / 18:06:55 / cg" |
528 | 2871 |
! |
2872 |
||
2873 |
glxSetlinestyle: index in: aGLXWindowId |
|
2874 |
"set the linestyle" |
|
2875 |
||
2876 |
%{ /* NOCONTEXT */ |
|
2877 |
SETWIN(aGLXWindowId) |
|
1932 | 2878 |
#ifdef OPENGL |
2879 |
#else |
|
528 | 2880 |
setlinestyle(_shortVal(index)); |
1932 | 2881 |
#endif |
2882 |
%} |
|
528 | 2883 |
! ! |
2884 |
||
294 | 2885 |
!GLXWorkstation methodsFor:'materials & lights'! |
2886 |
||
2887 |
glxLmbind:target index:index in:aGLXWindowId |
|
2888 |
"select a material, light or lighting model. |
|
2889 |
target must be a symbol from: #material, #backMaterial, |
|
2890 |
#light0-light7 or #lightModel." |
|
2891 |
||
2892 |
%{ /* NOCONTEXT */ |
|
2893 |
#ifdef GLX |
|
2894 |
short defType; |
|
2895 |
short i_index; |
|
2896 |
||
2897 |
if (target == @symbol(material)) |
|
2898 |
defType = MATERIAL; |
|
2899 |
else if (target == @symbol(backMaterial)) |
|
2900 |
defType = BACKMATERIAL; |
|
2901 |
else if (target == @symbol(light0)) |
|
2902 |
defType = LIGHT0; |
|
2903 |
else if (target == @symbol(light1)) |
|
2904 |
defType = LIGHT1; |
|
2905 |
else if (target == @symbol(light2)) |
|
2906 |
defType = LIGHT2; |
|
2907 |
else if (target == @symbol(light3)) |
|
2908 |
defType = LIGHT3; |
|
2909 |
else if (target == @symbol(light4)) |
|
2910 |
defType = LIGHT4; |
|
2911 |
else if (target == @symbol(light5)) |
|
2912 |
defType = LIGHT5; |
|
2913 |
else if (target == @symbol(light6)) |
|
2914 |
defType = LIGHT6; |
|
2915 |
else if (target == @symbol(light7)) |
|
2916 |
defType = LIGHT7; |
|
2917 |
else if (target == @symbol(lightModel)) |
|
2918 |
defType = LMODEL; |
|
4718 | 2919 |
else { |
2920 |
RETURN (nil); |
|
294 | 2921 |
} |
2922 |
||
2923 |
_INT_ (index, i_index); |
|
2924 |
SETWIN(aGLXWindowId) |
|
2925 |
lmbind(defType, i_index); |
|
1932 | 2926 |
#endif |
2927 |
%} |
|
294 | 2928 |
! |
2929 |
||
2930 |
glxLmdef:what index:index np:np props:props in:aGLXWindowId |
|
2931 |
"define a material, light source or lighting model; |
|
2932 |
what must be one of #material, #light or #lightModel. |
|
2933 |
props must be a FloatArray or a subclass of FloatArray" |
|
2934 |
||
2935 |
%{ /* NOCONTEXT */ |
|
2936 |
#ifdef GLX |
|
2937 |
short defType; |
|
2938 |
short i_index, i_np; |
|
2939 |
float *fp; |
|
2940 |
OBJ cls; |
|
2941 |
int ninstVars, nInstBytes; |
|
2942 |
||
2943 |
if (what == @symbol(material)) |
|
2944 |
defType = DEFMATERIAL; |
|
2945 |
else if (what == @symbol(light)) |
|
2946 |
defType = DEFLIGHT; |
|
2947 |
else if (what == @symbol(lightModel)) |
|
2948 |
defType = DEFLMODEL; |
|
2949 |
else { |
|
1932 | 2950 |
RETURN (nil); |
294 | 2951 |
} |
2952 |
||
2953 |
_INT_ (index, i_index); |
|
2954 |
_INT_ (np, i_np); |
|
2955 |
||
2956 |
if (! _isNonNilObject(props)) fp = NULL; |
|
2957 |
else { |
|
2958 |
cls = __qClass(props); |
|
350 | 2959 |
if (cls == @global(FloatArray)) |
294 | 2960 |
fp = _FloatArrayInstPtr(props)->f_element; |
2961 |
else { |
|
2962 |
if ((__intVal(_ClassInstPtr(cls)->c_flags) & ARRAYMASK) == FLOATARRAY) { |
|
2963 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
|
2964 |
fp = (float *) &(_InstPtr(props)->i_instvars[ninstVars]); |
|
2965 |
} else { |
|
1932 | 2966 |
RETURN (nil); |
294 | 2967 |
} |
4718 | 2968 |
} |
294 | 2969 |
} |
2970 |
SETWIN(aGLXWindowId) |
|
2971 |
lmdef(defType, i_index, i_np, fp); |
|
1932 | 2972 |
#endif |
2973 |
%} |
|
294 | 2974 |
! |
2975 |
||
2976 |
glxTevbind:target index:index in:aGLXWindowId |
|
2977 |
"bind a texture environment; target must be 0 |
|
2978 |
or the symbol #env0." |
|
2979 |
||
2980 |
%{ /* NOCONTEXT */ |
|
2981 |
#ifdef GLX |
|
2982 |
long t; |
|
2983 |
||
2984 |
if (__isSmallInteger(target)) { |
|
2985 |
t = __intVal(target); |
|
2986 |
} else { |
|
2987 |
if (target == @symbol(env0)) { |
|
2988 |
t = TV_ENV0; |
|
2989 |
} else { |
|
1932 | 2990 |
RETURN (nil); |
294 | 2991 |
} |
2992 |
} |
|
2993 |
SETWIN(aGLXWindowId) |
|
2994 |
tevbind(t, __intVal(index)); |
|
1932 | 2995 |
#endif |
2996 |
%} |
|
294 | 2997 |
! |
2998 |
||
2999 |
glxTevdef:index np:np props:props in:aGLXWindowId |
|
3000 |
||
3001 |
%{ /* NOCONTEXT */ |
|
3002 |
#ifdef GLX |
|
3003 |
const float *fp; |
|
3004 |
float fbuff[30]; |
|
3005 |
||
3006 |
SETWIN(aGLXWindowId) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3007 |
fp = __glx_getFloatsFromFloatArrayInto(props, fbuff); |
294 | 3008 |
tevdef(__intVal(index), __intVal(np), fp); |
1932 | 3009 |
#endif |
3010 |
%} |
|
294 | 3011 |
! |
3012 |
||
3013 |
glxTexDef2d:index nc:nc width:w height:h bits:image np:np props:props in:aGLXWindowId |
|
3014 |
"define a 2D texture. index is the 'name' of the texture; |
|
3015 |
nc is the number of components (1-4) per pixel; |
|
3016 |
w/h define the size of the texture; bits is a byteArray containing the |
|
3017 |
long-word aligned pixel data; np is the number of props found in |
|
3018 |
the floatArray props. Props must be delimited by a 0.0 entry." |
|
3019 |
||
3020 |
%{ /* NOCONTEXT */ |
|
6254 | 3021 |
#ifdef GLX |
294 | 3022 |
unsigned char *cp; |
3023 |
const float *fp; |
|
3024 |
OBJ cls; |
|
3025 |
float fbuff[30]; |
|
3026 |
||
5479
ae6b3ac21920
__isByteArray() to __isByteArrayLike() in primitive code
Stefan Vogel <sv@exept.de>
parents:
4718
diff
changeset
|
3027 |
if (__isByteArrayLike(image)) { |
6254 | 3028 |
cp = _ByteArrayInstPtr(image)->ba_element; |
3029 |
fp = __glx_getFloatsFromFloatArrayInto(props, fbuff); |
|
3030 |
||
3031 |
SETWIN(aGLXWindowId) |
|
3032 |
texdef2d(__intVal(index), __intVal(nc), __intVal(w), __intVal(h), |
|
3033 |
(const unsigned long *)cp, __intVal(np), fp); |
|
294 | 3034 |
} |
3035 |
#endif |
|
3036 |
%} |
|
3037 |
! |
|
3038 |
||
3039 |
glxTexDef3d:index nc:nc width:w height:h depth:d bits:image np:np props:props in:aGLXWindowId |
|
3040 |
"define a 3D texture. index is the 'name' of the texture; |
|
3041 |
nc is the number of components (1-4) per pixel; |
|
3042 |
w/h/d define the size of the texture; bits is a byteArray containing the |
|
3043 |
long-word aligned pixel data; np is the number of props found in |
|
3044 |
the floatArray props. Props must be delimited by a 0.0 entry." |
|
3045 |
||
3046 |
%{ /* NOCONTEXT */ |
|
3047 |
#ifdef GLX |
|
3048 |
unsigned char *cp; |
|
3049 |
const float *fp; |
|
3050 |
OBJ cls; |
|
3051 |
float fbuff[30]; |
|
3052 |
||
5479
ae6b3ac21920
__isByteArray() to __isByteArrayLike() in primitive code
Stefan Vogel <sv@exept.de>
parents:
4718
diff
changeset
|
3053 |
if (__isByteArrayLike(image)) { |
6254 | 3054 |
cp = _ByteArrayInstPtr(image)->ba_element; |
3055 |
fp = __glx_getFloatsFromFloatArrayInto(props, fbuff); |
|
3056 |
||
3057 |
SETWIN(aGLXWindowId) |
|
3058 |
texdef3d(__intVal(index), __intVal(nc), __intVal(w), __intVal(h), |
|
3059 |
__intVal(d), |
|
3060 |
(const unsigned long *)cp, __intVal(np), fp); |
|
294 | 3061 |
} |
3062 |
#endif |
|
3063 |
%} |
|
3064 |
! |
|
3065 |
||
3066 |
glxTexbind:target index:index in:aGLXWindowId |
|
3067 |
"bind a texture; target must be an integer or one |
|
3068 |
of the symbols #texture0, #textureDetail or #textureIdle." |
|
3069 |
||
3070 |
%{ /* NOCONTEXT */ |
|
3071 |
#ifdef GLX |
|
3072 |
long t; |
|
3073 |
||
3074 |
if (__isSmallInteger(target)) { |
|
3075 |
t = __intVal(target); |
|
3076 |
} else { |
|
3077 |
if (target == @symbol(texture0)) { |
|
3078 |
t = TX_TEXTURE_0; |
|
3079 |
} else if (target == @symbol(textureDetail)) { |
|
3080 |
t = TX_TEXTURE_DETAIL; |
|
3081 |
} else if (target == @symbol(textureIdle)) { |
|
3082 |
t = TX_TEXTURE_IDLE; |
|
3083 |
} else { |
|
1932 | 3084 |
RETURN (nil); |
294 | 3085 |
} |
3086 |
} |
|
3087 |
SETWIN(aGLXWindowId) |
|
3088 |
texbind(t, __intVal(index)); |
|
1932 | 3089 |
#endif |
3090 |
%} |
|
294 | 3091 |
! ! |
3092 |
||
3093 |
!GLXWorkstation methodsFor:'matrix stack'! |
|
3094 |
||
3095 |
glxGetMatrix:arrayOf16Floats in:aGLXWindowId |
|
3096 |
"argument must be an array (a matrix) of 16 floats. The current matrix |
|
3097 |
will be stored into that." |
|
3098 |
||
3099 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3100 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3101 |
#else |
294 | 3102 |
Matrix matrix; |
3103 |
||
3104 |
SETWIN(aGLXWindowId) |
|
3105 |
getmatrix(matrix); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3106 |
if (! __glx_putFloatsFromInto(matrix, arrayOf16Floats, 16)) RETURN(false); |
1932 | 3107 |
#endif |
3108 |
%} |
|
294 | 3109 |
! |
3110 |
||
3111 |
glxLoadMatrix:arrayOf16Floats in:aGLXWindowId |
|
3112 |
"argument must be an array(a matrix) of 16 floats. The current matrix |
|
3113 |
will be loaded from that." |
|
3114 |
||
3115 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3116 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3117 |
#else |
294 | 3118 |
Matrix matrix; |
3119 |
Matrix *m; |
|
3120 |
||
2814 | 3121 |
if (! (m = __glx_getFloatsFromMatrixInto(arrayOf16Floats, matrix))) RETURN (false); |
294 | 3122 |
SETWIN(aGLXWindowId) |
3123 |
loadmatrix(*m); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3124 |
#endif |
294 | 3125 |
%} |
3126 |
! |
|
3127 |
||
3128 |
glxMultMatrix:arrayOf16Floats in:aGLXWindowId |
|
3129 |
"argument must be an array(a matrix) of 16 floats containing a |
|
3130 |
matrix to multiply into the current matrix." |
|
3131 |
||
3132 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3133 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3134 |
#else |
294 | 3135 |
Matrix matrix; |
3136 |
Matrix *m; |
|
3137 |
||
2814 | 3138 |
if (! (m = __glx_getFloatsFromMatrixInto(arrayOf16Floats, matrix))) RETURN (false); |
294 | 3139 |
SETWIN(aGLXWindowId) |
3140 |
multmatrix(*m); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3141 |
#endif |
294 | 3142 |
%} |
3143 |
! |
|
3144 |
||
3145 |
glxPopmatrixIn:aGLXWindowId |
|
3146 |
"pop transformation stack" |
|
3147 |
||
3148 |
%{ /* NOCONTEXT */ |
|
3149 |
SETWIN(aGLXWindowId) |
|
1932 | 3150 |
#ifdef OPENGL |
3151 |
#else |
|
294 | 3152 |
popmatrix(); |
1932 | 3153 |
#endif |
294 | 3154 |
%} |
3155 |
! |
|
3156 |
||
3157 |
glxPushmatrixIn:aGLXWindowId |
|
3158 |
"push down transformation stack" |
|
3159 |
||
3160 |
%{ /* NOCONTEXT */ |
|
3161 |
SETWIN(aGLXWindowId) |
|
1932 | 3162 |
#ifdef OPENGL |
3163 |
#else |
|
294 | 3164 |
pushmatrix(); |
1932 | 3165 |
#endif |
294 | 3166 |
%} |
3167 |
! ! |
|
3168 |
||
3169 |
!GLXWorkstation methodsFor:'misc'! |
|
3170 |
||
3171 |
glxGconfigIn:aGLXWindowId |
|
3172 |
"must be sent after RGBmode, doubleBuffer etc. to have these |
|
3173 |
changes really take effect. See GLX manual. |
|
7656 | 3174 |
(Actually, it seems to be not allowed - I don't really know)" |
294 | 3175 |
|
3176 |
%{ /* NOCONTEXT */ |
|
3177 |
SETWIN(aGLXWindowId) |
|
1932 | 3178 |
#ifdef OPENGL |
3179 |
#else |
|
294 | 3180 |
gconfig(); |
1932 | 3181 |
#endif |
294 | 3182 |
%} |
3183 |
! |
|
3184 |
||
3185 |
glxMmode:aSymbol in:aGLXWindowId |
|
3186 |
"set matrix mode: #single, #viewing, #projection or #texture" |
|
3187 |
||
3188 |
%{ /* NOCONTEXT */ |
|
3189 |
#ifdef GLX |
|
3190 |
if (aSymbol == @symbol(single)) { |
|
3191 |
mmode(MSINGLE); |
|
3192 |
RETURN (true); |
|
3193 |
} |
|
3194 |
if (aSymbol == @symbol(viewing)) { |
|
3195 |
mmode(MVIEWING); |
|
3196 |
RETURN (true); |
|
3197 |
} |
|
3198 |
if (aSymbol == @symbol(projection)) { |
|
3199 |
mmode(MPROJECTION); |
|
3200 |
RETURN (true); |
|
3201 |
} |
|
3202 |
if (aSymbol == @symbol(texture)) { |
|
3203 |
mmode(MTEXTURE); |
|
3204 |
RETURN (true); |
|
3205 |
} |
|
3206 |
#endif |
|
3207 |
%} |
|
3208 |
. |
|
3209 |
^ false |
|
3210 |
! |
|
3211 |
||
3212 |
glxNmode:aSymbol in:aGLXWindowId |
|
3213 |
"set normalize mode: #auto, #normalize" |
|
3214 |
||
3215 |
%{ /* NOCONTEXT */ |
|
3216 |
#ifdef GLX |
|
3217 |
if (aSymbol == @symbol(auto)) { |
|
3218 |
nmode(NAUTO); |
|
3219 |
RETURN (true); |
|
3220 |
} |
|
3221 |
if (aSymbol == @symbol(normalize)) { |
|
3222 |
nmode(NNORMALIZE); |
|
3223 |
RETURN (true); |
|
3224 |
} |
|
3225 |
#endif |
|
3226 |
%} |
|
3227 |
. |
|
3228 |
^ false |
|
3229 |
! |
|
3230 |
||
3231 |
glxRGBmodeIn:aGLXWindowId |
|
3232 |
"set true color mode (no colormap)" |
|
3233 |
||
3234 |
%{ /* NOCONTEXT */ |
|
3235 |
#ifdef GLX |
|
3236 |
SETWIN(aGLXWindowId) |
|
3237 |
RGBmode(); |
|
3238 |
RETURN (true); |
|
3239 |
#endif |
|
3240 |
%} |
|
3241 |
. |
|
3242 |
^ false |
|
3243 |
! ! |
|
3244 |
||
3245 |
!GLXWorkstation methodsFor:'objects'! |
|
3246 |
||
3247 |
glxCallObject:obj in:aGLXWindowId |
|
3248 |
"perform the commands of an object (macro)." |
|
3249 |
||
2075 | 3250 |
%{ /* NOCONTEXT STACK:32000 */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3251 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3252 |
#else |
294 | 3253 |
if (__isSmallInteger(obj)) { |
3254 |
SETWIN(aGLXWindowId) |
|
3255 |
callobj(_objectVal(obj)); |
|
3256 |
RETURN (true); |
|
3257 |
} |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3258 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3259 |
%}. |
294 | 3260 |
^ false |
3261 |
! |
|
3262 |
||
3263 |
glxCloseObjectIn:aGLXWindowId |
|
3264 |
"end object defnition" |
|
3265 |
||
2075 | 3266 |
%{ /* NOCONTEXT STACK:32000 */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3267 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3268 |
#else |
294 | 3269 |
SETWIN(aGLXWindowId) |
3270 |
closeobj(); |
|
3271 |
RETURN (true); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3272 |
#endif |
294 | 3273 |
%} |
3274 |
! |
|
3275 |
||
3276 |
glxDeleteObject:obj in:aGLXWindowId |
|
3277 |
||
2075 | 3278 |
%{ /* NOCONTEXT STACK:32000 */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3279 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3280 |
#else |
1882 | 3281 |
if (__isSmallInteger(obj)) { |
4718 | 3282 |
SETWIN(aGLXWindowId) |
3283 |
delobj(_objectVal(obj)); |
|
3284 |
RETURN (true); |
|
1882 | 3285 |
} |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3286 |
#endif |
294 | 3287 |
%} |
3288 |
! |
|
3289 |
||
3290 |
glxGenObjectIn:aGLXWindowId |
|
3291 |
"return a new (free & unused) object id for use |
|
3292 |
with makeObj" |
|
3293 |
||
3294 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3295 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3296 |
#else |
294 | 3297 |
SETWIN(aGLXWindowId) |
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
3298 |
RETURN (__MKSMALLINT(genobj())); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3299 |
#endif |
294 | 3300 |
%} |
3301 |
! |
|
3302 |
||
3303 |
glxGetopenobjIn:aGLXWindowId |
|
3304 |
"return the currently open objects id; -1 if none is open" |
|
3305 |
||
3306 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3307 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3308 |
#else |
294 | 3309 |
SETWIN(aGLXWindowId) |
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
3310 |
RETURN (__MKSMALLINT(getopenobj())); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3311 |
#endif |
294 | 3312 |
%} |
3313 |
! |
|
3314 |
||
3315 |
glxIsobj:obj in:aGLXWindowId |
|
3316 |
"return true, if obj is a valid object id" |
|
3317 |
||
3318 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3319 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3320 |
#else |
294 | 3321 |
SETWIN(aGLXWindowId) |
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
3322 |
RETURN (__MKBOOLEAN(isobj(_objectVal(obj)))); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3323 |
#endif |
294 | 3324 |
%} |
3325 |
! |
|
3326 |
||
3327 |
glxMakeObject:id in:aGLXWindowId |
|
3328 |
"start object definition - |
|
3329 |
another name conflict" |
|
3330 |
||
2075 | 3331 |
%{ /* NOCONTEXT STACK:32000 */ |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3332 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3333 |
#else |
294 | 3334 |
if (__isSmallInteger(id)) { |
3335 |
SETWIN(aGLXWindowId) |
|
3336 |
makeobj(_objectVal(id)); |
|
3337 |
RETURN (true); |
|
3338 |
} |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3339 |
#endif |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3340 |
%}. |
294 | 3341 |
^ false |
3342 |
! ! |
|
3343 |
||
3344 |
!GLXWorkstation methodsFor:'patches & surfaces'! |
|
3345 |
||
3346 |
glxBeginCurveIn:aGLXWindowId |
|
3347 |
"start a NURBS curve def - in real GL only" |
|
3348 |
||
3349 |
%{ /* NOCONTEXT */ |
|
1932 | 3350 |
SETWIN(aGLXWindowId) |
3351 |
#ifdef GLX |
|
294 | 3352 |
bgncurve(); |
1932 | 3353 |
#endif |
3354 |
%} |
|
294 | 3355 |
! |
3356 |
||
3357 |
glxBeginSurfaceIn:aGLXWindowId |
|
3358 |
"start a NURBS surface def - in real GL only" |
|
3359 |
||
3360 |
%{ /* NOCONTEXT */ |
|
1932 | 3361 |
SETWIN(aGLXWindowId) |
3362 |
#ifdef GLX |
|
294 | 3363 |
bgnsurface(); |
1932 | 3364 |
#endif |
3365 |
%} |
|
294 | 3366 |
! |
3367 |
||
3368 |
glxDefBasis:id mat:aMatrix in:aGLXWindowId |
|
528 | 3369 |
"define the basis matrix for a patch or curve" |
294 | 3370 |
|
3371 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3372 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3373 |
#else |
294 | 3374 |
Matrix matrix; |
3375 |
Matrix *m; |
|
3376 |
||
2814 | 3377 |
if (! (m = __glx_getFloatsFromMatrixInto(aMatrix, matrix))) RETURN (false); |
294 | 3378 |
if (__isSmallInteger(id)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3379 |
SETWIN(aGLXWindowId) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3380 |
defbasis((short)(__intVal(id)), *m); |
294 | 3381 |
} |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3382 |
#endif |
1932 | 3383 |
%} |
528 | 3384 |
|
3385 |
"Modified: 19.3.1996 / 18:52:56 / cg" |
|
294 | 3386 |
! |
3387 |
||
3388 |
glxEndCurveIn:aGLXWindowId |
|
3389 |
"end a NURBS curve def - in real GL only" |
|
3390 |
||
3391 |
%{ /* NOCONTEXT */ |
|
1932 | 3392 |
SETWIN(aGLXWindowId) |
3393 |
#ifdef GLX |
|
294 | 3394 |
endcurve(); |
1932 | 3395 |
#endif |
3396 |
%} |
|
294 | 3397 |
! |
3398 |
||
3399 |
glxEndSurfaceIn:aGLXWindowId |
|
3400 |
"end a NURBS surface def - in real GL only" |
|
3401 |
||
3402 |
%{ /* NOCONTEXT */ |
|
1932 | 3403 |
SETWIN(aGLXWindowId) |
3404 |
#ifdef GLX |
|
294 | 3405 |
endsurface(); |
1932 | 3406 |
#endif |
3407 |
%} |
|
294 | 3408 |
! |
3409 |
||
4718 | 3410 |
glxNurbsSurfaceUKnotCount: uKnotCount uKnot: uKnot |
294 | 3411 |
vKnotCount: vKnotCount vKnot: vKnot |
4718 | 3412 |
uOffset: uOffset vOffset: vOffset |
3413 |
ctlArray: ctlArray |
|
3414 |
uOrder: uOrder vOrder: vOrder |
|
294 | 3415 |
type: type in: aGLXWindowId |
3416 |
||
3417 |
| ctlPoints i | |
|
3418 |
ctlPoints := DoubleArray new: ctlArray size * (ctlArray first size). |
|
3419 |
i := 1. |
|
3420 |
ctlArray do: [:point | |
|
4718 | 3421 |
point do: [:coord | |
294 | 3422 |
ctlPoints at: i put: coord. |
3423 |
i := i + 1]]. |
|
3424 |
||
3425 |
%{ /* NOCONTEXT */ |
|
3426 |
#ifdef GLX |
|
3427 |
char *uKnotElements, *vKnotElements, *ctlElements; |
|
3428 |
OBJ cls; |
|
3429 |
int ninstVars, nInstBytes; |
|
3430 |
||
3431 |
SETWIN(aGLXWindowId) |
|
3432 |
cls = __qClass(ctlPoints); |
|
3433 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
|
3434 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
|
3435 |
||
3436 |
ctlElements = (char *)(_InstPtr(ctlPoints)) + nInstBytes; |
|
3437 |
uKnotElements = (char *)(_InstPtr(uKnot)) + nInstBytes; |
|
3438 |
vKnotElements = (char *)(_InstPtr(vKnot)) + nInstBytes; |
|
3439 |
||
3440 |
nurbssurface ( |
|
3441 |
__intVal(uKnotCount), (double *)uKnotElements, |
|
3442 |
__intVal(vKnotCount), (double *)vKnotElements, |
|
3443 |
__intVal(uOffset), __intVal(vOffset), |
|
4718 | 3444 |
(double *)ctlElements, |
294 | 3445 |
__intVal(uOrder), __intVal(vOrder), __intVal(type)); |
3446 |
RETURN(true); |
|
3447 |
#endif |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3448 |
%}. |
294 | 3449 |
^ false |
3450 |
! |
|
3451 |
||
3452 |
glxPatchBasisU:u v:v in:aGLXWindowId |
|
528 | 3453 |
"set the two basis matrices for a patch" |
294 | 3454 |
|
3455 |
%{ /* NOCONTEXT */ |
|
3456 |
if (__bothSmallInteger(u, v)) { |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3457 |
SETWIN(aGLXWindowId) |
1932 | 3458 |
#ifdef OPENGL |
3459 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3460 |
patchbasis((long)__intVal(u), (long)__intVal(v)); |
1932 | 3461 |
#endif |
294 | 3462 |
} |
1932 | 3463 |
%} |
528 | 3464 |
|
3465 |
"Modified: 19.3.1996 / 18:53:18 / cg" |
|
294 | 3466 |
! |
3467 |
||
3468 |
glxPatchCurvesU:u v:v in:aGLXWindowId |
|
528 | 3469 |
"set the number of curves to be drawn in each direction on a patch" |
294 | 3470 |
|
3471 |
%{ /* NOCONTEXT */ |
|
3472 |
if (__bothSmallInteger(u, v)) { |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3473 |
SETWIN(aGLXWindowId) |
1932 | 3474 |
#ifdef OPENGL |
3475 |
#else |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3476 |
patchcurves((long)__intVal(u), (long)__intVal(v)); |
1932 | 3477 |
#endif |
294 | 3478 |
} |
1932 | 3479 |
%} |
528 | 3480 |
|
3481 |
"Modified: 19.3.1996 / 18:53:34 / cg" |
|
294 | 3482 |
! |
3483 |
||
3484 |
glxPatchPrecisionU:u v:v in:aGLXWindowId |
|
3485 |
"set the patch precision" |
|
3486 |
||
3487 |
%{ /* NOCONTEXT */ |
|
3488 |
if (__bothSmallInteger(u, v)) { |
|
3489 |
SETWIN(aGLXWindowId) |
|
1932 | 3490 |
#ifdef OPENGL |
3491 |
#else |
|
294 | 3492 |
patchprecision((long)__intVal(u), (long)__intVal(v)); |
1932 | 3493 |
#endif |
294 | 3494 |
} |
1932 | 3495 |
%} |
294 | 3496 |
! |
3497 |
||
3498 |
glxPatchX:arrayOf16XFloats y:arrayOf16YFloats z:arrayOf16ZFloats in:aGLXWindowId |
|
528 | 3499 |
"Draws a bicubic patch. |
3500 |
arguments must be arrays of 16 floats containing the patch" |
|
294 | 3501 |
|
3502 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3503 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3504 |
#else |
294 | 3505 |
Matrix matrixX, matrixY, matrixZ; |
3506 |
Matrix *mX, *mY, *mZ; |
|
3507 |
||
4718 | 3508 |
if (! (mX = __glx_getFloatsFromMatrixInto(arrayOf16XFloats, matrixX))) |
1932 | 3509 |
RETURN (nil); |
4718 | 3510 |
if (! (mY = __glx_getFloatsFromMatrixInto(arrayOf16YFloats, matrixY))) |
1932 | 3511 |
RETURN (nil); |
4718 | 3512 |
if (! (mZ = __glx_getFloatsFromMatrixInto(arrayOf16ZFloats, matrixZ))) |
1932 | 3513 |
RETURN (nil); |
294 | 3514 |
SETWIN(aGLXWindowId) |
3515 |
patch(*mX, *mY, *mZ); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3516 |
#endif |
294 | 3517 |
%} |
528 | 3518 |
|
3519 |
"Modified: 19.3.1996 / 18:54:02 / cg" |
|
3520 |
! |
|
3521 |
||
3522 |
glxRpatchX:arrayOf16XFloats y:arrayOf16YFloats z:arrayOf16ZFloats w:arrayOf16WFloats in:aGLXWindowId |
|
3523 |
"Draws a rational bicubic patch. |
|
3524 |
arguments must be arrays of 16 floats containing the patch" |
|
3525 |
||
3526 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3527 |
#ifdef OPENGL |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3528 |
#else |
529 | 3529 |
Matrix matrixX, matrixY, matrixZ, matrixW; |
3530 |
Matrix *mX, *mY, *mZ, *mW; |
|
528 | 3531 |
|
4718 | 3532 |
if (! (mX = __glx_getFloatsFromMatrixInto(arrayOf16XFloats, matrixX))) |
1932 | 3533 |
RETURN (nil); |
4718 | 3534 |
if (! (mY = __glx_getFloatsFromMatrixInto(arrayOf16YFloats, matrixY))) |
1932 | 3535 |
RETURN (nil); |
4718 | 3536 |
if (! (mZ = __glx_getFloatsFromMatrixInto(arrayOf16ZFloats, matrixZ))) |
1932 | 3537 |
RETURN (nil); |
4718 | 3538 |
if (! (mW = __glx_getFloatsFromMatrixInto(arrayOf16WFloats, matrixW))) |
1932 | 3539 |
RETURN (nil); |
529 | 3540 |
SETWIN(aGLXWindowId) |
3541 |
rpatch(*mX, *mY, *mZ, *mW); |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3542 |
#endif |
528 | 3543 |
%} |
3544 |
||
3545 |
"Modified: 19.3.1996 / 18:54:02 / cg" |
|
3546 |
"Created: 19.3.1996 / 18:56:34 / cg" |
|
3547 |
! ! |
|
3548 |
||
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3549 |
!GLXWorkstation methodsFor:'pixel copy'! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3550 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3551 |
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
|
3552 |
"copy a rectangular area in the view. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3553 |
For now, this is only supported with a true GL. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3554 |
readsource specifies which plane/buffer is affected by this operation." |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3555 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3556 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3557 |
#ifdef GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3558 |
SETWIN(aGLXWindowId) |
4718 | 3559 |
rectcopy(_screencoordVal(x1), _screencoordVal(y1), |
3560 |
_screencoordVal(x2), _screencoordVal(y2), |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3561 |
_screencoordVal(newx), _screencoordVal(newy)); |
1932 | 3562 |
#endif |
3563 |
%} |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3564 |
! ! |
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 |
!GLXWorkstation methodsFor:'pixel reading'! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3567 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3568 |
glxReadpixelsTo:dest in:aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3569 |
"read pixels from the view. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3570 |
Dest must be an array and gets pixel values assigned, |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3571 |
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
|
3572 |
For now, pixel-reading is only supported with a true GL. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3573 |
Caveat: the number of pixels is limited to 256. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3574 |
In double buffer mode, the backBuffer is read." |
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| |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3577 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3578 |
n := dest size. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3579 |
n > 256 ifTrue:[^ 0]. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3580 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3581 |
%{ /* STACK:1024 */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3582 |
#ifdef GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3583 |
Colorindex buffer[256]; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3584 |
int i, nRead; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3585 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3586 |
if (__isArray(dest)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3587 |
SETWIN(aGLXWindowId) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3588 |
nRead = readpixels(__intVal(n), buffer); |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3589 |
for (i=0; i<nRead;i++) { |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3590 |
__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
|
3591 |
} |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3592 |
RETURN (__MKSMALLINT(nRead)); |
537
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 |
#endif |
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 |
^ 0 |
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 |
"Modified: 22.3.1996 / 18:08:00 / cg" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3599 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3600 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3601 |
glxReadsource: src in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3602 |
"specify what is read with folowing readPixels requests. |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3603 |
For now, pixel-reading is only supported with a true GL" |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3604 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3605 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3606 |
#ifdef GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3607 |
OBJ s = src; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3608 |
int what; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3609 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3610 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3611 |
if (s == @symbol(auto)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3612 |
what = SRC_AUTO; |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3613 |
} else if (s == @symbol(front)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3614 |
what = SRC_FRONT; |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3615 |
} else if (s == @symbol(back)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3616 |
what = SRC_BACK; |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3617 |
} else if (s == @symbol(zBuffer)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3618 |
what = SRC_ZBUFFER; |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3619 |
} else if (s == @symbol(frameGrabber)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3620 |
what = SRC_FRAMEGRABBER; |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3621 |
} else if (s == @symbol(over)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3622 |
what = SRC_OVER; |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3623 |
} else if (s == @symbol(under)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3624 |
what = SRC_UNDER; |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3625 |
} else if (s == @symbol(popUp)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3626 |
what = SRC_PUP; |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3627 |
} else { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3628 |
what = _longVal(src); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3629 |
} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3630 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3631 |
readsource(what); |
1932 | 3632 |
#endif |
3633 |
%} |
|
538 | 3634 |
! |
3635 |
||
541 | 3636 |
glxRectreadX1:x1 y1:y1 x2:x2 y2:y2 h:viewHeight to:dest in:aGLXWindowId |
538 | 3637 |
"read pixels from a rectanglular area. |
3638 |
Dest must be an array and gets pixel values assigned, |
|
3639 |
reading n*m pixels. |
|
3640 |
For now, pixel-reading is only supported with a true GL. |
|
3641 |
Caveat: the number of pixels is limited to 256. |
|
3642 |
In double buffer mode, the backBuffer is read." |
|
3643 |
||
541 | 3644 |
|n idx sy1 sy2| |
3645 |
||
3646 |
"/ GLX's y coordinates go bottom to top ... |
|
3647 |
||
3648 |
sy1 := viewHeight - y1. |
|
3649 |
sy2 := viewHeight - y2. |
|
538 | 3650 |
|
3651 |
n := (x2 - x1 + 1) * (y2 - y1 + 1). |
|
3652 |
n > 256 ifTrue:[^ 0]. |
|
3653 |
dest size < n ifTrue:[^ 0]. |
|
3654 |
||
3655 |
%{ /* STACK:1024 */ |
|
3656 |
#ifdef GLX |
|
3657 |
Colorindex buffer[256]; |
|
3658 |
int i, nRead; |
|
3659 |
||
3660 |
if (__isArray(dest) |
|
3661 |
&& __isSmallInteger(x1) && __isSmallInteger(x2) |
|
541 | 3662 |
&& __isSmallInteger(sy1) && __isSmallInteger(sy2) |
538 | 3663 |
) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3664 |
SETWIN(aGLXWindowId) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3665 |
nRead = rectread(__intVal(x1), __intVal(sy1), |
4718 | 3666 |
__intVal(x2), __intVal(sy2), |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3667 |
buffer); |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3668 |
for (i=0; i<nRead;i++) { |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3669 |
__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
|
3670 |
} |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3671 |
RETURN (__MKSMALLINT(nRead)); |
538 | 3672 |
} |
3673 |
#endif |
|
3674 |
%}. |
|
3675 |
"/ |
|
3676 |
"/ ok, this is not a GL - use XWorkstations pixel read method |
|
3677 |
"/ and convert |
|
3678 |
"/ |
|
3679 |
idx := 1. |
|
3680 |
y1 to:y2 do:[:y | |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3681 |
x1 to:x2 do:[:x | |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3682 |
|pix| |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3683 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3684 |
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
|
3685 |
dest at:idx put:pix |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3686 |
] |
538 | 3687 |
]. |
3688 |
^ n |
|
3689 |
||
3690 |
"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
|
3691 |
|
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3692 |
! |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3693 |
|
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3694 |
glxXColorToGLColor:pixel |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3695 |
"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
|
3696 |
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
|
3697 |
|
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3698 |
%{ /* NOCONTEXT */ |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3699 |
#ifdef VGL |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3700 |
if (__isSmallInteger(pixel)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3701 |
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
|
3702 |
} |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3703 |
#endif |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3704 |
%}. |
5e3b0dc0b01a
fixed screen read for VGL (return GL color, not X color)
Claus Gittinger <cg@exept.de>
parents:
541
diff
changeset
|
3705 |
^ pixel |
543
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3706 |
! |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3707 |
|
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3708 |
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
|
3709 |
"special for VGL" |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3710 |
|
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3711 |
%{ |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3712 |
#ifdef VGL |
1932 | 3713 |
if (__bothSmallInteger(x, y)) { |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3714 |
SETWIN(aGLXWindowId) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3715 |
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
|
3716 |
} |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3717 |
#endif |
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 |
^ 0 |
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3720 |
|
abe110532199
another change for pixelRead - needed to read from backbuffer with VGL
Claus Gittinger <cg@exept.de>
parents:
542
diff
changeset
|
3721 |
"Modified: 22.3.1996 / 18:08:00 / cg" |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3722 |
! ! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
3723 |
|
528 | 3724 |
!GLXWorkstation methodsFor:'points'! |
3725 |
||
3726 |
glxPnt2X: x y: y in: aGLXWindowId |
|
3727 |
"plot a point in x, y, 0." |
|
3728 |
||
3729 |
%{ /* NOCONTEXT */ |
|
3730 |
Coord c_x, c_y; |
|
3731 |
||
3732 |
_COORD_ (x, c_x) |
|
3733 |
_COORD_ (y, c_y) |
|
3734 |
SETWIN(aGLXWindowId) |
|
1932 | 3735 |
#ifdef OPENGL |
3736 |
#else |
|
528 | 3737 |
pnt2(c_x, c_y); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3738 |
#endif |
528 | 3739 |
%} |
3740 |
||
3741 |
"Modified: 19.3.1996 / 18:35:55 / cg" |
|
3742 |
! |
|
3743 |
||
3744 |
glxPnt2iX: x y: y in: aGLXWindowId |
|
3745 |
"plot a point in x, y, 0." |
|
3746 |
||
3747 |
%{ /* NOCONTEXT */ |
|
3748 |
Icoord c_x, c_y; |
|
3749 |
||
3750 |
_ICOORD_ (x, c_x) |
|
3751 |
_ICOORD_ (y, c_y) |
|
3752 |
SETWIN(aGLXWindowId) |
|
1932 | 3753 |
#ifdef OPENGL |
3754 |
#else |
|
528 | 3755 |
pnt2i(c_x, c_y); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3756 |
#endif |
528 | 3757 |
%} |
3758 |
||
3759 |
"Modified: 19.3.1996 / 18:35:59 / cg" |
|
3760 |
! |
|
3761 |
||
3762 |
glxPnt2sX: x y: y in: aGLXWindowId |
|
3763 |
"plot a point in x, y, 0." |
|
3764 |
||
3765 |
%{ /* NOCONTEXT */ |
|
3766 |
Scoord c_x, c_y; |
|
3767 |
||
3768 |
_SCOORD_ (x, c_x) |
|
3769 |
_SCOORD_ (y, c_y) |
|
3770 |
SETWIN(aGLXWindowId) |
|
1932 | 3771 |
#ifdef OPENGL |
3772 |
#else |
|
528 | 3773 |
pnt2s(c_x, c_y); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3774 |
#endif |
528 | 3775 |
%} |
3776 |
||
3777 |
"Modified: 19.3.1996 / 18:36:03 / cg" |
|
3778 |
! |
|
3779 |
||
3780 |
glxPntX: x y: y z: z in: aGLXWindowId |
|
3781 |
"plot a point in x, y, z." |
|
3782 |
||
3783 |
%{ /* NOCONTEXT */ |
|
3784 |
Coord c_x, c_y, c_z; |
|
3785 |
||
3786 |
_COORD_ (x, c_x) |
|
3787 |
_COORD_ (y, c_y) |
|
3788 |
_COORD_ (z, c_z) |
|
3789 |
SETWIN(aGLXWindowId) |
|
1932 | 3790 |
#ifdef OPENGL |
3791 |
#else |
|
528 | 3792 |
pnt(c_x, c_y, c_z); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3793 |
#endif |
528 | 3794 |
%} |
3795 |
||
3796 |
"Modified: 19.3.1996 / 18:36:08 / cg" |
|
3797 |
! |
|
3798 |
||
3799 |
glxPntiX: x y: y z: z in: aGLXWindowId |
|
3800 |
"plot a point in x, y, z." |
|
3801 |
||
3802 |
%{ /* NOCONTEXT */ |
|
3803 |
Icoord c_x, c_y, c_z; |
|
3804 |
||
3805 |
_ICOORD_ (x, c_x) |
|
3806 |
_ICOORD_ (y, c_y) |
|
3807 |
_ICOORD_ (z, c_z) |
|
3808 |
SETWIN(aGLXWindowId) |
|
1932 | 3809 |
#ifdef OPENGL |
3810 |
#else |
|
528 | 3811 |
pnti(c_x, c_y, c_z); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3812 |
#endif |
528 | 3813 |
%} |
3814 |
||
3815 |
"Modified: 19.3.1996 / 18:36:14 / cg" |
|
3816 |
! |
|
3817 |
||
3818 |
glxPntsX: x y: y z: z in: aGLXWindowId |
|
3819 |
"plot a point in x, y, z." |
|
3820 |
||
3821 |
%{ /* NOCONTEXT */ |
|
3822 |
Scoord c_x, c_y, c_z; |
|
3823 |
||
3824 |
_SCOORD_ (x, c_x) |
|
3825 |
_SCOORD_ (y, c_y) |
|
3826 |
_SCOORD_ (z, c_z) |
|
3827 |
SETWIN(aGLXWindowId) |
|
1932 | 3828 |
#ifdef OPENGL |
3829 |
#else |
|
528 | 3830 |
pnts(c_x, c_y, c_z); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
3831 |
#endif |
528 | 3832 |
%} |
3833 |
||
3834 |
"Modified: 19.3.1996 / 18:36:17 / cg" |
|
3835 |
! |
|
3836 |
||
3837 |
glxPntsize: n in: aGLXWindowId |
|
3838 |
||
3839 |
%{ /* NOCONTEXT */ |
|
1932 | 3840 |
SETWIN(aGLXWindowId) |
3841 |
#ifdef GLX |
|
528 | 3842 |
pntsize(_shortVal(n)); |
1932 | 3843 |
#endif |
3844 |
%} |
|
528 | 3845 |
! |
3846 |
||
3847 |
glxPntsizef: n in: aGLXWindowId |
|
3848 |
||
3849 |
%{ /* NOCONTEXT */ |
|
1932 | 3850 |
SETWIN(aGLXWindowId) |
3851 |
#ifdef GLX |
|
528 | 3852 |
pntsizef(_floatVal(n)); |
1932 | 3853 |
#endif |
3854 |
%} |
|
528 | 3855 |
! ! |
3856 |
||
3857 |
!GLXWorkstation methodsFor:'polygons'! |
|
3858 |
||
3859 |
glxBackface: b in: aGLXWindowId |
|
4718 | 3860 |
"enable/disable culling of backfacing polygons (suppress its drawing). |
528 | 3861 |
A polygon is backfacing if it's orientation in *screen* coords is clockwise" |
3862 |
||
3863 |
%{ /* NOCONTEXT */ |
|
3864 |
SETWIN(aGLXWindowId) |
|
1932 | 3865 |
#ifdef OPENGL |
3866 |
#else |
|
528 | 3867 |
backface(_booleanVal(b)); |
1932 | 3868 |
#endif |
528 | 3869 |
%} |
3870 |
||
3871 |
"Modified: 19.3.1996 / 18:26:50 / cg" |
|
3872 |
! |
|
3873 |
||
3874 |
glxConcave: b in: aGLXWindowId |
|
3875 |
"signal wether or not polygons are concave" |
|
3876 |
||
3877 |
%{ /* NOCONTEXT */ |
|
3878 |
SETWIN(aGLXWindowId) |
|
1932 | 3879 |
#ifdef OPENGL |
3880 |
#else |
|
528 | 3881 |
concave(_booleanVal(b)); |
1932 | 3882 |
#endif |
528 | 3883 |
%} |
3884 |
! |
|
3885 |
||
3886 |
glxFrontface: b in: aGLXWindowId |
|
4718 | 3887 |
"enable/disable culling of frontfacing polygons (suppress its drawing). |
3888 |
A polygon is frontfacing if it's orientation in *screen* coords is |
|
528 | 3889 |
anti-clockwise" |
3890 |
||
3891 |
||
3892 |
%{ /* NOCONTEXT */ |
|
3893 |
SETWIN(aGLXWindowId) |
|
1932 | 3894 |
#ifdef OPENGL |
3895 |
#else |
|
528 | 3896 |
frontface(_booleanVal(b)); |
1932 | 3897 |
#endif |
3898 |
%} |
|
528 | 3899 |
! |
3900 |
||
3901 |
glxPdr2X: x y: y in: aGLXWindowId |
|
3902 |
"add another vertex to the polygon" |
|
3903 |
||
3904 |
%{ /* NOCONTEXT */ |
|
3905 |
Coord c_x, c_y; |
|
3906 |
||
3907 |
_COORD_ (x, c_x) |
|
3908 |
_COORD_ (y, c_y) |
|
3909 |
SETWIN(aGLXWindowId) |
|
1932 | 3910 |
#ifdef OPENGL |
3911 |
#else |
|
528 | 3912 |
pdr2(c_x, c_y); |
1932 | 3913 |
#endif |
3914 |
%} |
|
528 | 3915 |
! |
3916 |
||
3917 |
glxPdr2iX: x y: y in: aGLXWindowId |
|
3918 |
"add another vertex to the polygon" |
|
3919 |
||
3920 |
%{ /* NOCONTEXT */ |
|
3921 |
Icoord c_x, c_y; |
|
3922 |
||
3923 |
_ICOORD_ (x, c_x) |
|
3924 |
_ICOORD_ (y, c_y) |
|
3925 |
SETWIN(aGLXWindowId) |
|
1932 | 3926 |
#ifdef OPENGL |
3927 |
#else |
|
528 | 3928 |
pdr2i(c_x, c_y); |
1932 | 3929 |
#endif |
528 | 3930 |
%} |
3931 |
||
3932 |
"Modified: 19.3.1996 / 18:33:28 / cg" |
|
3933 |
! |
|
3934 |
||
3935 |
glxPdr2sX: x y: y in: aGLXWindowId |
|
3936 |
"add another vertex to the polygon" |
|
3937 |
||
3938 |
%{ /* NOCONTEXT */ |
|
3939 |
Scoord c_x, c_y; |
|
3940 |
||
3941 |
_SCOORD_ (x, c_x) |
|
3942 |
_SCOORD_ (y, c_y) |
|
3943 |
SETWIN(aGLXWindowId) |
|
1932 | 3944 |
#ifdef OPENGL |
3945 |
#else |
|
528 | 3946 |
pdr2s(c_x, c_y); |
1932 | 3947 |
#endif |
528 | 3948 |
%} |
3949 |
||
3950 |
"Modified: 19.3.1996 / 18:34:03 / cg" |
|
3951 |
! |
|
3952 |
||
3953 |
glxPdrX: x y: y z: z in: aGLXWindowId |
|
3954 |
"add another vertex to the polygon" |
|
3955 |
||
3956 |
%{ /* NOCONTEXT */ |
|
3957 |
Coord c_x, c_y, c_z; |
|
3958 |
||
3959 |
_COORD_ (x, c_x) |
|
3960 |
_COORD_ (y, c_y) |
|
3961 |
_COORD_ (z, c_z) |
|
3962 |
SETWIN(aGLXWindowId) |
|
1932 | 3963 |
#ifdef OPENGL |
3964 |
#else |
|
528 | 3965 |
pdr(c_x, c_y, c_z); |
1932 | 3966 |
#endif |
528 | 3967 |
%} |
3968 |
||
3969 |
"Modified: 19.3.1996 / 18:34:06 / cg" |
|
3970 |
! |
|
3971 |
||
3972 |
glxPdriX: x y: y z: z in: aGLXWindowId |
|
3973 |
"add another vertex to the polygon" |
|
3974 |
||
3975 |
%{ /* NOCONTEXT */ |
|
3976 |
Icoord c_x, c_y, c_z; |
|
3977 |
||
3978 |
_ICOORD_ (x, c_x) |
|
3979 |
_ICOORD_ (y, c_y) |
|
3980 |
_ICOORD_ (z, c_z) |
|
3981 |
SETWIN(aGLXWindowId) |
|
1932 | 3982 |
#ifdef OPENGL |
3983 |
#else |
|
528 | 3984 |
pdri(c_x, c_y, c_z); |
1932 | 3985 |
#endif |
528 | 3986 |
%} |
3987 |
||
3988 |
"Modified: 19.3.1996 / 18:34:11 / cg" |
|
3989 |
! |
|
3990 |
||
3991 |
glxPdrsX: x y: y z: z in: aGLXWindowId |
|
3992 |
"add another vertex to the polygon" |
|
3993 |
||
3994 |
%{ /* NOCONTEXT */ |
|
3995 |
Scoord c_x, c_y, c_z; |
|
3996 |
||
3997 |
_SCOORD_ (x, c_x) |
|
3998 |
_SCOORD_ (y, c_y) |
|
3999 |
_SCOORD_ (z, c_z) |
|
4000 |
SETWIN(aGLXWindowId) |
|
1932 | 4001 |
#ifdef OPENGL |
4002 |
#else |
|
528 | 4003 |
pdrs(c_x, c_y, c_z); |
1932 | 4004 |
#endif |
528 | 4005 |
%} |
4006 |
||
4007 |
"Modified: 19.3.1996 / 18:34:14 / cg" |
|
4008 |
! |
|
4009 |
||
4010 |
glxPmv2X: x y: y in: aGLXWindowId |
|
4011 |
"set the start position of a polygon" |
|
4012 |
||
4013 |
%{ /* NOCONTEXT */ |
|
4014 |
Coord c_x, c_y; |
|
4015 |
||
4016 |
_COORD_ (x, c_x) |
|
4017 |
_COORD_ (y, c_y) |
|
4018 |
SETWIN(aGLXWindowId) |
|
1932 | 4019 |
#ifdef OPENGL |
4020 |
#else |
|
528 | 4021 |
pmv2(c_x, c_y); |
1932 | 4022 |
#endif |
528 | 4023 |
%} |
4024 |
||
4025 |
"Modified: 19.3.1996 / 18:32:45 / cg" |
|
4026 |
! |
|
4027 |
||
4028 |
glxPmv2iX: x y: y in: aGLXWindowId |
|
4029 |
"set the start position of a polygon" |
|
4030 |
||
4031 |
%{ /* NOCONTEXT */ |
|
4032 |
Icoord c_x, c_y; |
|
4033 |
||
4034 |
_ICOORD_ (x, c_x) |
|
4035 |
_ICOORD_ (y, c_y) |
|
4036 |
SETWIN(aGLXWindowId) |
|
1932 | 4037 |
#ifdef OPENGL |
4038 |
#else |
|
528 | 4039 |
pmv2i(c_x, c_y); |
1932 | 4040 |
#endif |
528 | 4041 |
%} |
4042 |
||
4043 |
"Modified: 19.3.1996 / 18:32:42 / cg" |
|
4044 |
! |
|
4045 |
||
4046 |
glxPmv2sX: x y: y in: aGLXWindowId |
|
4047 |
"set the start position of a polygon" |
|
4048 |
||
4049 |
%{ /* NOCONTEXT */ |
|
4050 |
Scoord c_x, c_y; |
|
4051 |
||
4052 |
_SCOORD_ (x, c_x) |
|
4053 |
_SCOORD_ (y, c_y) |
|
4054 |
SETWIN(aGLXWindowId) |
|
1932 | 4055 |
#ifdef OPENGL |
4056 |
#else |
|
528 | 4057 |
pmv2s(c_x, c_y); |
1932 | 4058 |
#endif |
528 | 4059 |
%} |
4060 |
||
4061 |
"Modified: 19.3.1996 / 18:32:38 / cg" |
|
4062 |
! |
|
4063 |
||
4064 |
glxPmvX: x y: y z: z in: aGLXWindowId |
|
4065 |
"set the start position of a polygon" |
|
4066 |
||
4067 |
%{ /* NOCONTEXT */ |
|
4068 |
Coord c_x, c_y, c_z; |
|
4069 |
||
4070 |
_COORD_ (x, c_x) |
|
4071 |
_COORD_ (y, c_y) |
|
4072 |
_COORD_ (z, c_z) |
|
4073 |
SETWIN(aGLXWindowId) |
|
1932 | 4074 |
#ifdef OPENGL |
4075 |
#else |
|
528 | 4076 |
pmv(c_x, c_y, c_z); |
1932 | 4077 |
#endif |
528 | 4078 |
%} |
4079 |
||
4080 |
"Modified: 19.3.1996 / 18:31:52 / cg" |
|
4081 |
! |
|
4082 |
||
4083 |
glxPmviX: x y: y z: z in: aGLXWindowId |
|
4084 |
"set the start position of a polygon" |
|
4085 |
||
4086 |
%{ /* NOCONTEXT */ |
|
4087 |
Icoord c_x, c_y, c_z; |
|
4088 |
||
4089 |
_ICOORD_ (x, c_x) |
|
4090 |
_ICOORD_ (y, c_y) |
|
4091 |
_ICOORD_ (z, c_z) |
|
4092 |
SETWIN(aGLXWindowId) |
|
1932 | 4093 |
#ifdef OPENGL |
4094 |
#else |
|
528 | 4095 |
pmvi(c_x, c_y, c_z); |
1932 | 4096 |
#endif |
528 | 4097 |
%} |
4098 |
||
4099 |
"Modified: 19.3.1996 / 18:31:59 / cg" |
|
4100 |
! |
|
4101 |
||
4102 |
glxPmvsX: x y: y z: z in: aGLXWindowId |
|
4103 |
"set the start position of a polygon" |
|
4104 |
||
4105 |
%{ /* NOCONTEXT */ |
|
4106 |
Scoord c_x, c_y, c_z; |
|
4107 |
||
4108 |
_SCOORD_ (x, c_x) |
|
4109 |
_SCOORD_ (y, c_y) |
|
4110 |
_SCOORD_ (z, c_z) |
|
4111 |
SETWIN(aGLXWindowId) |
|
1932 | 4112 |
#ifdef OPENGL |
4113 |
#else |
|
528 | 4114 |
pmvs(c_x, c_y, c_z); |
1932 | 4115 |
#endif |
528 | 4116 |
%} |
4117 |
||
4118 |
"Modified: 19.3.1996 / 18:32:03 / cg" |
|
4119 |
! |
|
4120 |
||
4121 |
glxPolymode: mode in: aGLXWindowId |
|
4122 |
"Sets the polygon filling mode - only filled (1) or outlined (0) |
|
4123 |
are supported" |
|
4124 |
||
4125 |
%{ /* NOCONTEXT */ |
|
4126 |
SETWIN(aGLXWindowId) |
|
1932 | 4127 |
#ifdef OPENGL |
4128 |
#else |
|
528 | 4129 |
polymode(_longVal(mode)); |
1932 | 4130 |
#endif |
528 | 4131 |
%} |
4132 |
||
4133 |
"Modified: 19.3.1996 / 18:29:32 / cg" |
|
4134 |
! |
|
4135 |
||
4136 |
glxRpdr2X: x y: y in: aGLXWindowId |
|
4137 |
"add another relative vertex to the polygon" |
|
4138 |
||
4139 |
%{ /* NOCONTEXT */ |
|
4140 |
Coord c_x, c_y; |
|
4141 |
||
4142 |
_COORD_ (x, c_x) |
|
4143 |
_COORD_ (y, c_y) |
|
4144 |
SETWIN(aGLXWindowId) |
|
1932 | 4145 |
#ifdef OPENGL |
4146 |
#else |
|
528 | 4147 |
rpdr2(c_x, c_y); |
1932 | 4148 |
#endif |
528 | 4149 |
%} |
4150 |
||
4151 |
"Modified: 19.3.1996 / 18:34:31 / cg" |
|
4152 |
! |
|
4153 |
||
4154 |
glxRpdr2iX: x y: y in: aGLXWindowId |
|
4155 |
"add another relative vertex to the polygon" |
|
4156 |
||
4157 |
%{ /* NOCONTEXT */ |
|
4158 |
Icoord c_x, c_y; |
|
4159 |
||
4160 |
_ICOORD_ (x, c_x) |
|
4161 |
_ICOORD_ (y, c_y) |
|
4162 |
SETWIN(aGLXWindowId) |
|
1932 | 4163 |
#ifdef OPENGL |
4164 |
#else |
|
528 | 4165 |
rpdr2i(c_x, c_y); |
1932 | 4166 |
#endif |
528 | 4167 |
%} |
4168 |
||
4169 |
"Modified: 19.3.1996 / 18:34:36 / cg" |
|
4170 |
! |
|
4171 |
||
4172 |
glxRpdr2sX: x y: y in: aGLXWindowId |
|
4173 |
"add another relative vertex to the polygon" |
|
4174 |
||
4175 |
%{ /* NOCONTEXT */ |
|
4176 |
Scoord c_x, c_y; |
|
4177 |
||
4178 |
_SCOORD_ (x, c_x) |
|
4179 |
_SCOORD_ (y, c_y) |
|
4180 |
SETWIN(aGLXWindowId) |
|
1932 | 4181 |
#ifdef OPENGL |
4182 |
#else |
|
528 | 4183 |
rpdr2s(c_x, c_y); |
1932 | 4184 |
#endif |
528 | 4185 |
%} |
4186 |
||
4187 |
"Modified: 19.3.1996 / 18:34:40 / cg" |
|
4188 |
! |
|
4189 |
||
4190 |
glxRpdrX: x y: y z: z in: aGLXWindowId |
|
4191 |
"add another relative vertex to the polygon" |
|
4192 |
||
4193 |
%{ /* NOCONTEXT */ |
|
4194 |
Coord c_x, c_y, c_z; |
|
4195 |
||
4196 |
_COORD_ (x, c_x) |
|
4197 |
_COORD_ (y, c_y) |
|
4198 |
_COORD_ (z, c_z) |
|
4199 |
SETWIN(aGLXWindowId) |
|
1932 | 4200 |
#ifdef OPENGL |
4201 |
#else |
|
528 | 4202 |
rpdr(c_x, c_y, c_z); |
1932 | 4203 |
#endif |
528 | 4204 |
%} |
4205 |
||
4206 |
"Modified: 19.3.1996 / 18:34:48 / cg" |
|
4207 |
! |
|
4208 |
||
4209 |
glxRpdriX: x y: y z: z in: aGLXWindowId |
|
4210 |
"add another relative vertex to the polygon" |
|
4211 |
||
4212 |
%{ /* NOCONTEXT */ |
|
4213 |
Icoord c_x, c_y, c_z; |
|
4214 |
||
4215 |
_ICOORD_ (x, c_x) |
|
4216 |
_ICOORD_ (y, c_y) |
|
4217 |
_ICOORD_ (z, c_z) |
|
4218 |
SETWIN(aGLXWindowId) |
|
1932 | 4219 |
#ifdef OPENGL |
4220 |
#else |
|
528 | 4221 |
rpdri(c_x, c_y, c_z); |
1932 | 4222 |
#endif |
528 | 4223 |
%} |
4224 |
||
4225 |
"Modified: 19.3.1996 / 18:34:51 / cg" |
|
4226 |
! |
|
4227 |
||
4228 |
glxRpdrsX: x y: y z: z in: aGLXWindowId |
|
4229 |
"add another relative vertex to the polygon" |
|
4230 |
||
4231 |
%{ /* NOCONTEXT */ |
|
4232 |
Scoord c_x, c_y, c_z; |
|
4233 |
||
4234 |
_SCOORD_ (x, c_x) |
|
4235 |
_SCOORD_ (y, c_y) |
|
4236 |
_SCOORD_ (z, c_z) |
|
4237 |
SETWIN(aGLXWindowId) |
|
1932 | 4238 |
#ifdef OPENGL |
4239 |
#else |
|
528 | 4240 |
rpdrs(c_x, c_y, c_z); |
1932 | 4241 |
#endif |
528 | 4242 |
%} |
4243 |
||
4244 |
"Modified: 19.3.1996 / 18:34:55 / cg" |
|
4245 |
! |
|
4246 |
||
4247 |
glxRpmv2X: x y: y in: aGLXWindowId |
|
4248 |
"set the start position of a polygon" |
|
4249 |
||
4250 |
%{ /* NOCONTEXT */ |
|
4251 |
Coord c_x, c_y; |
|
4252 |
||
4253 |
_COORD_ (x, c_x) |
|
4254 |
_COORD_ (y, c_y) |
|
4255 |
SETWIN(aGLXWindowId) |
|
1932 | 4256 |
#ifdef OPENGL |
4257 |
#else |
|
528 | 4258 |
rpmv2(c_x, c_y); |
1932 | 4259 |
#endif |
528 | 4260 |
%} |
4261 |
||
4262 |
"Modified: 19.3.1996 / 18:37:15 / cg" |
|
4263 |
! |
|
4264 |
||
4265 |
glxRpmv2iX: x y: y in: aGLXWindowId |
|
4266 |
"set the start position of a polygon" |
|
4267 |
||
4268 |
%{ /* NOCONTEXT */ |
|
4269 |
Icoord c_x, c_y; |
|
4270 |
||
4271 |
_ICOORD_ (x, c_x) |
|
4272 |
_ICOORD_ (y, c_y) |
|
4273 |
SETWIN(aGLXWindowId) |
|
1932 | 4274 |
#ifdef OPENGL |
4275 |
#else |
|
528 | 4276 |
rpmv2i(c_x, c_y); |
1932 | 4277 |
#endif |
528 | 4278 |
%} |
4279 |
||
4280 |
"Modified: 19.3.1996 / 18:37:20 / cg" |
|
4281 |
! |
|
4282 |
||
4283 |
glxRpmv2sX: x y: y in: aGLXWindowId |
|
4284 |
"set the relative start position of a polygon" |
|
4285 |
||
4286 |
%{ /* NOCONTEXT */ |
|
4287 |
Scoord c_x, c_y; |
|
4288 |
||
4289 |
_SCOORD_ (x, c_x) |
|
4290 |
_SCOORD_ (y, c_y) |
|
4291 |
SETWIN(aGLXWindowId) |
|
1932 | 4292 |
#ifdef OPENGL |
4293 |
#else |
|
528 | 4294 |
rpmv2s(c_x, c_y); |
1932 | 4295 |
#endif |
528 | 4296 |
%} |
4297 |
||
4298 |
"Modified: 19.3.1996 / 18:38:06 / cg" |
|
4299 |
! |
|
4300 |
||
4301 |
glxRpmvX: x y: y z: z in: aGLXWindowId |
|
4302 |
"set the relative start position of a polygon" |
|
4303 |
||
4304 |
%{ /* NOCONTEXT */ |
|
4305 |
Coord c_x, c_y, c_z; |
|
4306 |
||
4307 |
_COORD_ (x, c_x) |
|
4308 |
_COORD_ (y, c_y) |
|
4309 |
_COORD_ (z, c_z) |
|
4310 |
SETWIN(aGLXWindowId) |
|
1932 | 4311 |
#ifdef OPENGL |
4312 |
#else |
|
528 | 4313 |
rpmv(c_x, c_y, c_z); |
1932 | 4314 |
#endif |
528 | 4315 |
%} |
4316 |
||
4317 |
"Modified: 19.3.1996 / 18:38:03 / cg" |
|
4318 |
! |
|
4319 |
||
4320 |
glxRpmviX: x y: y z: z in: aGLXWindowId |
|
4321 |
"set the relative start position of a polygon" |
|
4322 |
||
4323 |
%{ /* NOCONTEXT */ |
|
4324 |
Icoord c_x, c_y, c_z; |
|
4325 |
||
4326 |
_ICOORD_ (x, c_x) |
|
4327 |
_ICOORD_ (y, c_y) |
|
4328 |
_ICOORD_ (z, c_z) |
|
4329 |
SETWIN(aGLXWindowId) |
|
1932 | 4330 |
#ifdef OPENGL |
4331 |
#else |
|
528 | 4332 |
rpmvi(c_x, c_y, c_z); |
1932 | 4333 |
#endif |
528 | 4334 |
%} |
4335 |
||
4336 |
"Modified: 19.3.1996 / 18:37:53 / cg" |
|
4337 |
! |
|
4338 |
||
4339 |
glxRpmvsX: x y: y z: z in: aGLXWindowId |
|
4340 |
"set the relative start position of a polygon" |
|
4341 |
||
4342 |
%{ /* NOCONTEXT */ |
|
4343 |
Scoord c_x, c_y, c_z; |
|
4344 |
||
4345 |
_SCOORD_ (x, c_x) |
|
4346 |
_SCOORD_ (y, c_y) |
|
4347 |
_SCOORD_ (z, c_z) |
|
4348 |
SETWIN(aGLXWindowId) |
|
1932 | 4349 |
#ifdef OPENGL |
4350 |
#else |
|
528 | 4351 |
rpmvs(c_x, c_y, c_z); |
1932 | 4352 |
#endif |
528 | 4353 |
%} |
4354 |
||
4355 |
"Modified: 19.3.1996 / 18:37:58 / cg" |
|
294 | 4356 |
! ! |
4357 |
||
24 | 4358 |
!GLXWorkstation methodsFor:'queries'! |
4359 |
||
159 | 4360 |
glVersion |
4361 |
"return a string describing the GL version. |
|
4362 |
For informative use only; portable applications do not depend |
|
4363 |
on the returned string." |
|
4364 |
||
4365 |
%{ /* NOCONTEXT */ |
|
4366 |
#ifdef VGL |
|
1065
fdc5b9059d82
removed all COMMA_CON / CON_COMMA uses
Claus Gittinger <cg@exept.de>
parents:
969
diff
changeset
|
4367 |
RETURN (__MKSTRING("vogl")); |
159 | 4368 |
#else |
1932 | 4369 |
# ifdef GLX |
159 | 4370 |
char buffer[128]; |
4371 |
||
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
4372 |
if (_INST(glOK) == true) { |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
4373 |
gversion(buffer); |
1065
fdc5b9059d82
removed all COMMA_CON / CON_COMMA uses
Claus Gittinger <cg@exept.de>
parents:
969
diff
changeset
|
4374 |
RETURN (__MKSTRING(buffer)); |
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
4375 |
} |
1932 | 4376 |
RETURN (nil); |
4377 |
# else |
|
4378 |
RETURN (nil); |
|
4379 |
# endif |
|
159 | 4380 |
#endif |
4381 |
%} |
|
4382 |
||
4383 |
" |
|
4718 | 4384 |
Display glVersion |
159 | 4385 |
" |
4386 |
! |
|
4387 |
||
528 | 4388 |
glxGetplanesIn: aGLXWindowId |
4389 |
"Returns the number if bit planes available on the device." |
|
4390 |
||
4391 |
%{ /* NOCONTEXT */ |
|
1932 | 4392 |
SETWIN(aGLXWindowId) |
4393 |
#ifdef OPENGL |
|
4394 |
#else |
|
528 | 4395 |
RETURN (__MKSMALLINT(getplanes())); |
4396 |
#endif |
|
1932 | 4397 |
%}. |
4398 |
^ 0 |
|
528 | 4399 |
|
4400 |
"Modified: 19.3.1996 / 18:50:44 / cg" |
|
4401 |
! |
|
4402 |
||
294 | 4403 |
hasStereoExtension |
4404 |
"return true, if this workstation supports stereo GL drawing. |
|
4405 |
Both the server must support it, and the feature must have been |
|
4406 |
enabled in the smalltalk system, for true to be returned." |
|
4407 |
||
4408 |
^ hasStereoExtension |
|
4409 |
||
4410 |
" |
|
4718 | 4411 |
Display hasStereoExtension |
294 | 4412 |
" |
4413 |
! |
|
4414 |
||
3214 | 4415 |
isOpenGL |
4416 |
"return true, if this is an openGL (as opposed to a GL)" |
|
4417 |
||
4418 |
%{ /* NOCONTEXT */ |
|
4419 |
#ifdef OPENGL |
|
4420 |
RETURN ( true ); |
|
4421 |
#else |
|
4422 |
RETURN ( false ); |
|
4423 |
#endif |
|
4424 |
%} |
|
4425 |
! |
|
4426 |
||
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4427 |
isTrueGL |
1932 | 4428 |
"return true, if this is a true GL (as opposed to a simulated VOGL). |
4429 |
Returns false for all openGL systems." |
|
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4430 |
|
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4431 |
%{ /* NOCONTEXT */ |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4432 |
#ifdef VGL |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4433 |
RETURN ( false ); |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4434 |
#else |
1932 | 4435 |
# ifdef GLX |
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4436 |
RETURN ( true ); |
1932 | 4437 |
# endif |
4438 |
#endif |
|
3214 | 4439 |
%}. |
4440 |
^ false |
|
448
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4441 |
! |
abcba4fa3fc0
added forceGL (or knowledgable SGI users)
Claus Gittinger <cg@exept.de>
parents:
389
diff
changeset
|
4442 |
|
294 | 4443 |
maxZValue |
4444 |
"return the max. Z value (only valid if z-buffer is supported)" |
|
4718 | 4445 |
%{ |
1932 | 4446 |
#ifndef OPENGL |
4447 |
# ifdef GD_ZMAX |
|
294 | 4448 |
long zMax; |
4449 |
||
4450 |
if (_INST(glOK) == true) { |
|
4451 |
zMax = getgdesc(GD_ZMAX); |
|
4452 |
||
4453 |
if ((zMax >= _MIN_INT) && (zMax <= _MAX_INT)) { |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
4454 |
RETURN ( __MKSMALLINT(zMax) ); |
294 | 4455 |
} |
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
4456 |
RETURN ( __MKLARGEINT(zMax) ); |
294 | 4457 |
} |
1932 | 4458 |
# endif |
294 | 4459 |
#endif |
4460 |
%}. |
|
4461 |
^ nil |
|
4462 |
! |
|
4463 |
||
4464 |
supportsDoubleBuffer |
|
4465 |
"return true, if this gl workstation supports double buffering. |
|
157 | 4466 |
For portable applications, always combine this with a query |
4467 |
if the display supports GL drawing at all." |
|
24 | 4468 |
|
4469 |
%{ /* NOCONTEXT */ |
|
294 | 4470 |
|
1932 | 4471 |
#ifndef OPENGL |
4472 |
# ifdef VGL |
|
4473 |
RETURN (true); |
|
4474 |
# else |
|
4475 |
# ifdef GD_BITS_NORM_DBL_RED |
|
294 | 4476 |
if (getgdesc(GD_BITS_NORM_DBL_RED) != 0) { |
4477 |
RETURN ( _INST(glOK) ); |
|
4478 |
} |
|
1932 | 4479 |
# endif |
4480 |
# endif |
|
24 | 4481 |
#endif |
89 | 4482 |
%}. |
4483 |
^ false |
|
4484 |
||
4485 |
" |
|
4718 | 4486 |
Display supportsDoubleBuffer |
294 | 4487 |
" |
4488 |
! |
|
4489 |
||
4490 |
supportsGLDrawing |
|
4491 |
"return true, if this device supports 3D GL drawing." |
|
4492 |
||
4493 |
^ glOK |
|
4494 |
||
4495 |
" |
|
4718 | 4496 |
Display supportsGLDrawing |
89 | 4497 |
" |
64 | 4498 |
! |
4499 |
||
4500 |
supportsLight |
|
157 | 4501 |
"return true, if this gl workstation supports light sources |
4502 |
(i.e. if its a real GL). |
|
4503 |
For portable applications, always combine this with a query |
|
4504 |
if the display supports GL drawing at all." |
|
89 | 4505 |
|
4506 |
%{ /* NOCONTEXT */ |
|
64 | 4507 |
#ifdef GLX |
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
4508 |
RETURN ( _INST(glOK) ); |
64 | 4509 |
#endif |
89 | 4510 |
%}. |
4511 |
^ false |
|
4512 |
||
4513 |
" |
|
4718 | 4514 |
Display supportsLight |
89 | 4515 |
" |
4516 |
! |
|
4517 |
||
294 | 4518 |
supportsRGB |
4519 |
"return true, if this gl workstation supports rgb |
|
4520 |
(in addition to indexed) colors. Actually, we return true |
|
4521 |
for a real GL engine, false for the simulator here. |
|
4522 |
For portable applications, always combine this with a query |
|
4523 |
if the display supports GL drawing at all." |
|
4524 |
||
4525 |
%{ /* NOCONTEXT */ |
|
4526 |
#ifdef GLX |
|
4527 |
RETURN ( _INST(glOK) ); |
|
4528 |
#endif |
|
4529 |
%}. |
|
4530 |
^ false |
|
4531 |
||
4532 |
" |
|
4718 | 4533 |
Display supportsRGB |
294 | 4534 |
" |
4535 |
! |
|
4536 |
||
89 | 4537 |
supportsTextures |
4538 |
"return true, if this gl workstation supports texture mapping |
|
157 | 4539 |
(i.e. if its a real GL). |
4540 |
For portable applications, always combine this with a query |
|
4541 |
if the display supports GL drawing at all." |
|
89 | 4542 |
|
4543 |
%{ /* NOCONTEXT */ |
|
1932 | 4544 |
#ifndef OPENGL |
4545 |
# ifdef GD_TEXTURE |
|
89 | 4546 |
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
|
4547 |
RETURN ( _INST(glOK) ); |
89 | 4548 |
} |
1932 | 4549 |
# endif |
89 | 4550 |
#endif |
4551 |
%}. |
|
4552 |
^ false |
|
4553 |
||
4554 |
" |
|
4718 | 4555 |
Display supportsTextures |
89 | 4556 |
" |
4557 |
! |
|
4558 |
||
4559 |
supportsZBuffer |
|
157 | 4560 |
"return true, if this gl workstation has z buffer support. |
4561 |
For portable applications, always combine this with a query |
|
4562 |
if the display supports GL drawing at all." |
|
4563 |
||
89 | 4564 |
%{ /* NOCONTEXT */ |
4565 |
||
1932 | 4566 |
#ifndef OPENGL |
4567 |
# ifdef GD_BITS_NORM_ZBUFFER |
|
89 | 4568 |
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
|
4569 |
RETURN ( _INST(glOK) ); |
89 | 4570 |
} |
1932 | 4571 |
# endif |
89 | 4572 |
#endif |
4573 |
%}. |
|
4574 |
^ false |
|
4575 |
||
4576 |
" |
|
4718 | 4577 |
Display supportsZBuffer |
89 | 4578 |
" |
294 | 4579 |
! ! |
4580 |
||
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4581 |
!GLXWorkstation methodsFor:'rectangles'! |
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 |
glxRectX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4584 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4585 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4586 |
SETWIN(aGLXWindowId) |
1932 | 4587 |
#ifdef OPENGL |
4588 |
#else |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4589 |
rect(_coordVal(x1), _coordVal(y1), _coordVal(x2), _coordVal(y2)); |
1932 | 4590 |
#endif |
537
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 |
! |
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 |
glxRectfX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4595 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4596 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4597 |
SETWIN(aGLXWindowId) |
1932 | 4598 |
#ifdef OPENGL |
4599 |
#else |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4600 |
rectf(_coordVal(x1), _coordVal(y1), _coordVal(x2), _coordVal(y2)); |
1932 | 4601 |
#endif |
537
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 |
! |
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 |
glxRectfiX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4606 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4607 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4608 |
SETWIN(aGLXWindowId) |
1932 | 4609 |
#ifdef OPENGL |
4610 |
#else |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4611 |
rectfi(_icoordVal(x1), _icoordVal(y1), _icoordVal(x2), _icoordVal(y2)); |
1932 | 4612 |
#endif |
537
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 |
! |
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 |
glxRectfsX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4617 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4618 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4619 |
SETWIN(aGLXWindowId) |
1932 | 4620 |
#ifdef OPENGL |
4621 |
#else |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4622 |
rectfs(_scoordVal(x1), _scoordVal(y1), _scoordVal(x2), _scoordVal(y2)); |
1932 | 4623 |
#endif |
537
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 |
! |
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 |
glxRectiX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4628 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4629 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4630 |
SETWIN(aGLXWindowId) |
1932 | 4631 |
#ifdef OPENGL |
4632 |
#else |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4633 |
recti(_icoordVal(x1), _icoordVal(y1), _icoordVal(x2), _icoordVal(y2)); |
1932 | 4634 |
#endif |
537
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 |
! |
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 |
glxRectsX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4639 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4640 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4641 |
SETWIN(aGLXWindowId) |
1932 | 4642 |
#ifdef OPENGL |
4643 |
#else |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4644 |
rects(_scoordVal(x1), _scoordVal(y1), _scoordVal(x2), _scoordVal(y2)); |
1932 | 4645 |
#endif |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4646 |
%} |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4647 |
! ! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4648 |
|
528 | 4649 |
!GLXWorkstation methodsFor:'spheres'! |
294 | 4650 |
|
4651 |
glxSphDraw:arrayOf4Floats in:aGLXWindowId |
|
4652 |
"argument must be an array(a matrix) of 4 floats containing the |
|
4653 |
sphere - in real GL only" |
|
4654 |
||
4655 |
%{ /* NOCONTEXT */ |
|
4656 |
#ifdef GLX |
|
4657 |
float vec[4], *v; |
|
4658 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4659 |
if (! (v = __glx_getFloatsFromInto(arrayOf4Floats, vec, 4))) RETURN(false); |
294 | 4660 |
SETWIN(aGLXWindowId) |
4661 |
sphdraw(v); |
|
1932 | 4662 |
#endif |
4663 |
%} |
|
294 | 4664 |
! |
4665 |
||
4666 |
glxSphDrawX:x y:y z:z radius:r in:aGLXWindowId |
|
4667 |
"arguments must be convertable to floats - in real GL only" |
|
4668 |
||
4669 |
%{ /* NOCONTEXT */ |
|
4670 |
#ifdef GLX |
|
4671 |
float vec[4]; |
|
4672 |
||
4673 |
_FLOAT_(x, vec[0]) |
|
4674 |
_FLOAT_(y, vec[1]) |
|
4675 |
_FLOAT_(z, vec[2]) |
|
4676 |
_FLOAT_(r, vec[3]) |
|
4677 |
SETWIN(aGLXWindowId) |
|
4678 |
sphdraw(vec); |
|
1932 | 4679 |
#endif |
4680 |
%} |
|
294 | 4681 |
! |
4682 |
||
4683 |
glxSphfreeIn: aGLXWindowId |
|
4684 |
||
4685 |
%{ /* NOCONTEXT */ |
|
4686 |
#ifdef GLX |
|
4687 |
SETWIN(aGLXWindowId) |
|
4688 |
sphfree(); |
|
1932 | 4689 |
#endif |
4690 |
%} |
|
294 | 4691 |
! |
4692 |
||
4693 |
glxSphgnpolysIn: aGLXWindowId |
|
4694 |
||
4695 |
%{ /* NOCONTEXT */ |
|
4696 |
#ifdef GLX |
|
4697 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
4698 |
RETURN (__MKSMALLINT(sphgnpolys())); |
294 | 4699 |
#endif |
4700 |
%} |
|
4701 |
! |
|
4702 |
||
4703 |
glxSphmode: attribute value: value in: aGLXWindowId |
|
4704 |
||
4705 |
%{ /* NOCONTEXT */ |
|
4706 |
#ifdef GLX |
|
4707 |
SETWIN(aGLXWindowId) |
|
4708 |
sphmode(__intVal(attribute), __intVal(value)); |
|
1932 | 4709 |
#endif |
4710 |
%} |
|
294 | 4711 |
! |
4712 |
||
4713 |
glxSphobj: objid in: aGLXWindowId |
|
4714 |
||
4715 |
%{ /* NOCONTEXT */ |
|
4716 |
#ifdef GLX |
|
4717 |
SETWIN(aGLXWindowId) |
|
4718 |
sphobj(_objectVal(objid)); |
|
1932 | 4719 |
#endif |
4720 |
%} |
|
294 | 4721 |
! |
4722 |
||
4723 |
glxSphrotmatrix: mat in: aGLXWindowId |
|
4724 |
||
4725 |
%{ /* NOCONTEXT */ |
|
4726 |
#ifdef GLX |
|
4727 |
Matrix matrix, *m; |
|
4728 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4729 |
if (! (m = __glx_getFloatsFromMatrixInto(mat, &matrix))) RETURN (false); |
294 | 4730 |
SETWIN(aGLXWindowId) |
4731 |
sphrotmatrix(*m); |
|
1932 | 4732 |
#endif |
4733 |
%} |
|
294 | 4734 |
! ! |
4735 |
||
4736 |
!GLXWorkstation methodsFor:'stereo extension'! |
|
4737 |
||
528 | 4738 |
glxLeftbuffer: bool in: aGLXWindowId |
4739 |
||
4740 |
%{ /* NOCONTEXT */ |
|
4741 |
#ifdef FULL_GLX |
|
4742 |
SETWIN(aGLXWindowId) |
|
4743 |
leftbuffer(_booleanVal(bool)); |
|
1932 | 4744 |
#endif |
4745 |
%} |
|
528 | 4746 |
! |
4747 |
||
4748 |
glxMonobufferIn: aGLXWindowId |
|
4749 |
||
4750 |
%{ /* NOCONTEXT */ |
|
4751 |
#ifdef FULL_GLX |
|
4752 |
SETWIN(aGLXWindowId) |
|
4753 |
monobuffer(); |
|
1932 | 4754 |
#endif |
4755 |
%} |
|
528 | 4756 |
! |
4757 |
||
4758 |
glxRightbuffer: bool in: aGLXWindowId |
|
4759 |
||
4760 |
%{ /* NOCONTEXT */ |
|
4761 |
#ifdef FULL_GLX |
|
4762 |
SETWIN(aGLXWindowId) |
|
4763 |
rightbuffer(_booleanVal(bool)); |
|
1932 | 4764 |
#endif |
4765 |
%} |
|
528 | 4766 |
! |
4767 |
||
294 | 4768 |
stereoExtensionBuffer:aBufferSymbol for:aWindowId |
4769 |
"set the current stereo buffer; the argument may be one of: |
|
4770 |
#left -> STEREO_BUFFER_LEFT |
|
4771 |
#right -> STEREO_BUFFER_RIGHT |
|
4772 |
" |
|
4773 |
||
4774 |
%{ /* NOCONTEXT */ |
|
4775 |
#if defined(XSGIStereo) && defined(GLX) |
|
4776 |
Status status; |
|
4777 |
int buffer; |
|
4778 |
Window win; |
|
4779 |
||
4718 | 4780 |
if (ISCONNECTED |
294 | 4781 |
&& __isExternalAddress(aWindowId)) { |
4782 |
win = _WindowVal(aWindowId); |
|
4783 |
if (aBufferSymbol == @symbol(left)) { |
|
4784 |
buffer = STEREO_BUFFER_LEFT; |
|
4785 |
} else { |
|
4786 |
if (aBufferSymbol == @symbol(right)) { |
|
4787 |
buffer = STEREO_BUFFER_RIGHT; |
|
4788 |
} else { |
|
4789 |
goto bad; |
|
4790 |
} |
|
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
4791 |
} |
294 | 4792 |
status = XSGISetStereoBuffer(myDpy, win, buffer); |
4793 |
RETURN ( status ? true : false); |
|
4794 |
} |
|
4795 |
bad: ; |
|
4796 |
#endif |
|
4797 |
%}. |
|
4798 |
self primitiveFailed |
|
4799 |
||
4800 |
" |
|
4801 |
|t v| |
|
4802 |
||
4803 |
t := StandardSystemView new. |
|
4804 |
t extent:300@300. |
|
4805 |
v := GLXView origin:0.0@0.0 corner:1.0@1.0 in:t. |
|
4806 |
t openAndWait. |
|
4807 |
||
4718 | 4808 |
v device stereoExtensionBuffer:#left for:(v id). |
294 | 4809 |
(Delay forSeconds:10) wait. |
4718 | 4810 |
v device stereoExtensionBuffer:#right for:(v id). |
294 | 4811 |
" |
4812 |
! |
|
4813 |
||
4814 |
stereoExtensionMode:aModeSymbol height:h offset:o for:aWindowId |
|
4815 |
"set the current stereo mode; the argument may be one of: |
|
4816 |
nil/false #off -> turn it off |
|
4817 |
#bottom -> STEREO_BOTTOM |
|
4818 |
#top -> STEREO_TOP |
|
4819 |
" |
|
4820 |
||
4821 |
%{ /* NOCONTEXT */ |
|
4822 |
#if defined(XSGIStereo) && defined(GLX) |
|
4823 |
Status status; |
|
4824 |
int mode; |
|
4825 |
unsigned short us_h, us_o; |
|
4826 |
Window win; |
|
4827 |
||
4718 | 4828 |
if (ISCONNECTED |
294 | 4829 |
&& __bothSmallInteger(h, o) |
4830 |
&& __isExternalAddress(aWindowId)) { |
|
4831 |
win = _WindowVal(aWindowId); |
|
4832 |
if ((aModeSymbol == nil) |
|
4833 |
|| (aModeSymbol == false) |
|
4834 |
|| (aModeSymbol == @symbol(off))) { |
|
4835 |
mode = STEREO_OFF; |
|
4836 |
} else { |
|
4837 |
if (aModeSymbol == @symbol(bottom)) { |
|
4838 |
mode = STEREO_BOTTOM; |
|
4839 |
} else { |
|
4840 |
if (aModeSymbol == @symbol(top)) { |
|
4841 |
mode = STEREO_TOP; |
|
4842 |
} else { |
|
4843 |
goto bad; |
|
4844 |
} |
|
4845 |
} |
|
4846 |
} |
|
4847 |
us_h = __intVal(h); |
|
4848 |
us_o = __intVal(o); |
|
4849 |
status = XSGISetStereoMode(myDpy, win, us_h, us_o, mode); |
|
4850 |
RETURN ( status ? true : false); |
|
4851 |
} |
|
4852 |
bad: ; |
|
4853 |
#endif |
|
4854 |
%}. |
|
4855 |
self primitiveFailed |
|
4856 |
||
4857 |
" |
|
4718 | 4858 |
Display stereoExtensionMode:#top height:492 offset:532 for:(Display rootWindowId). |
294 | 4859 |
(Delay forSeconds:10) wait. |
4718 | 4860 |
Display stereoExtensionMode:#off height:0 offset:0 for:(Display rootWindowId). |
294 | 4861 |
" |
4862 |
! |
|
4863 |
||
4864 |
stereoExtensionModeIn:aWindowId |
|
4865 |
"return the current stereo mode for some window" |
|
4866 |
||
4867 |
%{ /* NOCONTEXT */ |
|
4868 |
#if defined(XSGIStereo) && defined(GLX) |
|
4869 |
int mode; |
|
4870 |
Window win; |
|
4871 |
||
4872 |
if (ISCONNECTED && __isExternalAddress(aWindowId)) { |
|
4873 |
win = _WindowVal(aWindowId); |
|
4874 |
mode = XSGIQueryStereoMode(myDpy, win); |
|
4875 |
switch (mode) { |
|
4876 |
case STEREO_OFF: |
|
4877 |
RETURN ( @symbol(off) ); |
|
4878 |
case STEREO_BOTTOM: |
|
4879 |
RETURN ( @symbol(bottom) ); |
|
4880 |
case STEREO_TOP: |
|
4881 |
RETURN ( @symbol(top) ); |
|
4882 |
} |
|
4883 |
RETURN ( @symbol(unsupported) ); |
|
4884 |
} |
|
4885 |
#endif |
|
4886 |
%}. |
|
4887 |
self primitiveFailed |
|
4888 |
||
4889 |
" |
|
4890 |
|v| |
|
4891 |
||
4892 |
v := StandardSystemView new. |
|
4893 |
v extent:300@300. |
|
4894 |
v openAndWait. |
|
4895 |
v device stereoExtensionModeIn:(v id) |
|
4896 |
||
4718 | 4897 |
Display stereoExtensionModeIn:Display rootWindowId |
294 | 4898 |
" |
4899 |
! |
|
4900 |
||
4901 |
stereoExtensionVersion |
|
4902 |
"return the stereo extensions version as an array consisting of |
|
4903 |
major and minor numbers." |
|
4904 |
||
4905 |
%{ /* NOCONTEXT */ |
|
4906 |
#if defined(XSGIStereo) && defined(GLX) |
|
4907 |
Status status; |
|
4908 |
Display *dpy = myDpy; |
|
4909 |
int major, minor; |
|
4910 |
||
4911 |
if (ISCONNECTED) { |
|
4912 |
status = XSGIStereoQueryVersion(myDpy, &major, &minor); |
|
4913 |
if (status == True) { |
|
4914 |
RETURN ( __ARRAY_WITH2(__MKSMALLINT(major), __MKSMALLINT(minor))); |
|
4915 |
} |
|
89 | 4916 |
} |
4917 |
#endif |
|
4918 |
%}. |
|
294 | 4919 |
self primitiveFailed |
185 | 4920 |
|
4921 |
" |
|
294 | 4922 |
Display stereoExtensionVersion |
185 | 4923 |
" |
24 | 4924 |
! ! |
4925 |
||
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4926 |
!GLXWorkstation methodsFor:'texture data transfer'! |
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 |
glxT2d: v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4929 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4930 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4931 |
#ifdef GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4932 |
double vec[2], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4933 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4934 |
if (! (c_v = __glx_getDoublesFromInto(v, vec, 2))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4935 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4936 |
t2d(c_v); |
1932 | 4937 |
#endif |
4938 |
%} |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4939 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4940 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4941 |
glxT2f: v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4942 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4943 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4944 |
#ifdef GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4945 |
float vec[2], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4946 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4947 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 2))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4948 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4949 |
t2f(c_v); |
1932 | 4950 |
#endif |
4951 |
%} |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4952 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4953 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4954 |
glxT2i: v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4955 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4956 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4957 |
#ifdef GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4958 |
long vec[2], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4959 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4960 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 2))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4961 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4962 |
t2i(c_v); |
1932 | 4963 |
#endif |
4964 |
%} |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4965 |
! |
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 |
glxT2s: v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4968 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4969 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4970 |
#ifdef GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4971 |
short vec[2], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4972 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4973 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 2))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4974 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4975 |
t2s(c_v); |
1932 | 4976 |
#endif |
4977 |
%} |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4978 |
! |
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 |
glxT3d:v in:aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4981 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4982 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4983 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4984 |
double vec[3], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4985 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4986 |
if (! (c_v = __glx_getDoublesFromInto(v, vec, 3))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4987 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4988 |
t3d(c_v); |
1932 | 4989 |
#endif |
4990 |
%} |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4991 |
! |
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 |
glxT3f:v in:aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4994 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4995 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4996 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4997 |
float vec[3], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
4998 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
4999 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 3))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5000 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5001 |
t3f(c_v); |
1932 | 5002 |
#endif |
5003 |
%} |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5004 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5005 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5006 |
glxT3i:v in:aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5007 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5008 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5009 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5010 |
long vec[3], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5011 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5012 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 3))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5013 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5014 |
t3i(c_v); |
1932 | 5015 |
#endif |
5016 |
%} |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5017 |
! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5018 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5019 |
glxT3s:v in:aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5020 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5021 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5022 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5023 |
short vec[3], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5024 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5025 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 3))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5026 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5027 |
t3s(c_v); |
1932 | 5028 |
#endif |
5029 |
%} |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5030 |
! |
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 |
glxT4d: v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5033 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5034 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5035 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5036 |
double vec[4], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5037 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5038 |
if (! (c_v = __glx_getDoublesFromInto(v, vec, 4))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5039 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5040 |
t4d(c_v); |
1932 | 5041 |
#endif |
5042 |
%} |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5043 |
! |
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 |
glxT4f: v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5046 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5047 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5048 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5049 |
float vec[4], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5050 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5051 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 4))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5052 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5053 |
t4f(c_v); |
1932 | 5054 |
#endif |
5055 |
%} |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5056 |
! |
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 |
glxT4i: v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5059 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5060 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5061 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5062 |
long vec[4], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5063 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5064 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 4))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5065 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5066 |
t4i(c_v); |
1932 | 5067 |
#endif |
5068 |
%} |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5069 |
! |
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 |
glxT4s: v in: aGLXWindowId |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5072 |
|
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5073 |
%{ /* NOCONTEXT */ |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5074 |
#ifdef FULL_GLX |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5075 |
short vec[4], *c_v; |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5076 |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5077 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 4))) RETURN(false); |
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5078 |
SETWIN(aGLXWindowId) |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5079 |
t4s(c_v); |
1932 | 5080 |
#endif |
5081 |
%} |
|
537
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5082 |
! ! |
56ccc83b3ac7
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
529
diff
changeset
|
5083 |
|
294 | 5084 |
!GLXWorkstation methodsFor:'transformations'! |
5085 |
||
5086 |
glxRotate:angle axis:axis in:aGLXWindowId |
|
5087 |
"rotate the current matrix around the axis given by the axis arg, |
|
5088 |
which must be one of the symbols: #x, #y or #z. |
|
5089 |
The angle is in degrees." |
|
5090 |
||
5091 |
%{ /* NOCONTEXT */ |
|
5092 |
||
5093 |
char c_axis; |
|
5094 |
||
5095 |
if (axis == @symbol(x)) |
|
5096 |
c_axis = 'x'; |
|
5097 |
else if (axis == @symbol(y)) |
|
5098 |
c_axis = 'y'; |
|
5099 |
else if (axis == @symbol(z)) |
|
5100 |
c_axis = 'z'; |
|
5101 |
else { |
|
5102 |
RETURN (false); |
|
5103 |
} |
|
5104 |
||
5105 |
SETWIN(aGLXWindowId) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5106 |
RETURN ( __glx_doRotate(angle, c_axis) ); |
294 | 5107 |
%} |
5108 |
! |
|
5109 |
||
5110 |
glxRotate:arrayOf3Floats in:aGLXWindowId |
|
5111 |
"rotate current matrix, given a 3-element vector (or more). |
|
5112 |
The elements of the array are degrees." |
|
5113 |
||
5114 |
%{ /* NOCONTEXT */ |
|
5115 |
||
5116 |
float vec[3], *v; |
|
5117 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5118 |
if (! (v = __glx_getFloatsFromInto(arrayOf3Floats, vec, 3))) RETURN(false); |
294 | 5119 |
|
5120 |
SETWIN(aGLXWindowId) |
|
1932 | 5121 |
#ifdef OPENGL |
5122 |
#else |
|
294 | 5123 |
rot(v[0], 'x'); |
5124 |
rot(v[1], 'y'); |
|
5125 |
rot(v[2], 'z'); |
|
1932 | 5126 |
#endif |
294 | 5127 |
%} |
5128 |
! |
|
5129 |
||
5130 |
glxRotateI:angle axis:axis in:aGLXWindowId |
|
5131 |
"rotate the current matrix around the axis given by the axis arg, |
|
5132 |
which must be one of the symbols: #x, #y or #z. |
|
5133 |
The angle is an integer specifying tenths of a degree." |
|
5134 |
||
5135 |
%{ /* NOCONTEXT */ |
|
5136 |
||
5137 |
char c_axis; |
|
5138 |
||
5139 |
if (axis == @symbol(x)) |
|
5140 |
c_axis = 'x'; |
|
5141 |
else if (axis == @symbol(y)) |
|
5142 |
c_axis = 'y'; |
|
5143 |
else if (axis == @symbol(z)) |
|
5144 |
c_axis = 'z'; |
|
5145 |
else { |
|
5146 |
RETURN (false); |
|
5147 |
} |
|
5148 |
||
5149 |
if (__isSmallInteger(angle)) { |
|
5150 |
SETWIN(aGLXWindowId) |
|
1932 | 5151 |
#ifdef OPENGL |
5152 |
#else |
|
294 | 5153 |
rotate(__intVal(angle), c_axis); |
1932 | 5154 |
#endif |
294 | 5155 |
} |
5156 |
%} |
|
5157 |
! |
|
5158 |
||
5159 |
glxRotateIX:angle in:aGLXWindowId |
|
5160 |
"rotate the current matrix on x axis. |
|
5161 |
The angle is an integer specifying tenths of a degree." |
|
5162 |
||
5163 |
%{ /* NOCONTEXT */ |
|
5164 |
||
5165 |
if (__isSmallInteger(angle)) { |
|
5166 |
SETWIN(aGLXWindowId) |
|
1932 | 5167 |
#ifdef OPENGL |
5168 |
#else |
|
294 | 5169 |
rotate(__intVal(angle), 'x'); |
1932 | 5170 |
#endif |
294 | 5171 |
} |
5172 |
%} |
|
5173 |
! |
|
5174 |
||
5175 |
glxRotateIX:xAngle y:yAngle z:zAngle in:aGLXWindowId |
|
5176 |
"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
|
5177 |
The values are smallIntegers specifying tenths of a degree." |
294 | 5178 |
|
5179 |
%{ /* NOCONTEXT */ |
|
5180 |
||
5181 |
if (__bothSmallInteger(xAngle, yAngle) |
|
5182 |
&& __isSmallInteger(zAngle)) { |
|
5183 |
SETWIN(aGLXWindowId) |
|
1932 | 5184 |
#ifdef OPENGL |
5185 |
#else |
|
294 | 5186 |
rotate(__intVal(xAngle), 'x'); |
5187 |
rotate(__intVal(yAngle), 'y'); |
|
5188 |
rotate(__intVal(zAngle), 'z'); |
|
1932 | 5189 |
#endif |
294 | 5190 |
} |
5191 |
%} |
|
5192 |
! |
|
5193 |
||
5194 |
glxRotateIY:angle in:aGLXWindowId |
|
5195 |
"rotate the current matrix on x axis. |
|
5196 |
The angle is an integer specifying tenths of a degree." |
|
5197 |
||
5198 |
%{ /* NOCONTEXT */ |
|
5199 |
||
5200 |
if (__isSmallInteger(angle)) { |
|
5201 |
SETWIN(aGLXWindowId) |
|
1932 | 5202 |
#ifdef OPENGL |
5203 |
#else |
|
294 | 5204 |
rotate(__intVal(angle), 'y'); |
1932 | 5205 |
#endif |
294 | 5206 |
} |
5207 |
%} |
|
5208 |
! |
|
5209 |
||
5210 |
glxRotateIZ:angle in:aGLXWindowId |
|
5211 |
"rotate the current matrix on x axis. |
|
5212 |
The angle is an integer specifying tenths of a degree." |
|
5213 |
||
5214 |
%{ /* NOCONTEXT */ |
|
5215 |
||
5216 |
if (__isSmallInteger(angle)) { |
|
5217 |
SETWIN(aGLXWindowId) |
|
1932 | 5218 |
#ifdef OPENGL |
5219 |
#else |
|
294 | 5220 |
rotate(__intVal(angle), 'z'); |
1932 | 5221 |
#endif |
294 | 5222 |
} |
5223 |
%} |
|
5224 |
! |
|
5225 |
||
5226 |
glxRotateX:angle in:aGLXWindowId |
|
5227 |
"rotate the current matrix on x axis. |
|
5228 |
The angle is in degrees." |
|
5229 |
||
5230 |
%{ /* NOCONTEXT */ |
|
5231 |
||
5232 |
SETWIN(aGLXWindowId) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5233 |
RETURN (__glx_doRotate(angle, 'x')); |
294 | 5234 |
%} |
5235 |
! |
|
5236 |
||
5237 |
glxRotateX:xAngle y:yAngle z:zAngle in:aGLXWindowId |
|
5238 |
"rotate the current matrix on all axes, given individual x, y and z values. |
|
5239 |
The values are in degrees" |
|
5240 |
||
5241 |
%{ /* NOCONTEXT */ |
|
5242 |
||
5243 |
SETWIN(aGLXWindowId) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5244 |
if ( __glx_doRotate(xAngle, 'x') == true) { |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5245 |
if ( __glx_doRotate(yAngle, 'y') == true) { |
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5246 |
RETURN (__glx_doRotate(zAngle, 'z')); |
294 | 5247 |
} |
5248 |
} |
|
5249 |
%} |
|
5250 |
! |
|
5251 |
||
5252 |
glxRotateY:angle in:aGLXWindowId |
|
5253 |
"rotate the current matrix on y axis. |
|
5254 |
The angle is in degrees." |
|
5255 |
||
5256 |
%{ /* NOCONTEXT */ |
|
5257 |
||
5258 |
SETWIN(aGLXWindowId) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5259 |
RETURN (__glx_doRotate(angle, 'y')); |
294 | 5260 |
%} |
5261 |
! |
|
5262 |
||
5263 |
glxRotateZ:angle in:aGLXWindowId |
|
5264 |
"rotate the current matrix on z axis. |
|
5265 |
The angle is in degrees." |
|
5266 |
||
5267 |
%{ /* NOCONTEXT */ |
|
5268 |
||
5269 |
SETWIN(aGLXWindowId) |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5270 |
RETURN (__glx_doRotate(angle, 'z')); |
294 | 5271 |
%} |
5272 |
! |
|
5273 |
||
5274 |
glxScale:arrayOf3Floats in:aGLXWindowId |
|
5275 |
"scale current matrix, given a 3-element vector" |
|
5276 |
||
5277 |
%{ /* NOCONTEXT */ |
|
5278 |
||
5279 |
float vec[3], *v; |
|
5280 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5281 |
if (! (v = __glx_getFloatsFromInto(arrayOf3Floats, vec, 3))) RETURN(false); |
294 | 5282 |
|
5283 |
SETWIN(aGLXWindowId) |
|
1932 | 5284 |
#ifdef OPENGL |
5285 |
#else |
|
294 | 5286 |
scale(v[0], v[1], v[2]); |
1932 | 5287 |
#endif |
294 | 5288 |
%} |
5289 |
! |
|
5290 |
||
5291 |
glxScaleX:x in:aGLXWindowId |
|
5292 |
"scale in x direction" |
|
5293 |
||
5294 |
%{ /* NOCONTEXT */ |
|
5295 |
||
5296 |
float f_x; |
|
5297 |
||
5298 |
_FLOAT_ (x, f_x) |
|
5299 |
SETWIN(aGLXWindowId) |
|
1932 | 5300 |
#ifdef OPENGL |
5301 |
#else |
|
294 | 5302 |
scale(f_x, (float)0, (float)0); |
1932 | 5303 |
#endif |
294 | 5304 |
%} |
5305 |
! |
|
5306 |
||
5307 |
glxScaleX:x y:y z:z in:aGLXWindowId |
|
5308 |
"scale & mirror current matrix, given individual x, y and z values" |
|
5309 |
||
5310 |
%{ /* NOCONTEXT */ |
|
5311 |
||
5312 |
float f_x, f_y, f_z; |
|
5313 |
||
5314 |
_FLOAT_ (x, f_x) |
|
5315 |
_FLOAT_ (y, f_y) |
|
5316 |
_FLOAT_ (z, f_z) |
|
5317 |
SETWIN(aGLXWindowId) |
|
1932 | 5318 |
#ifdef OPENGL |
5319 |
#else |
|
294 | 5320 |
scale(f_x, f_y, f_z); |
1932 | 5321 |
#endif |
294 | 5322 |
%} |
5323 |
! |
|
5324 |
||
5325 |
glxScaleY:y in:aGLXWindowId |
|
5326 |
"scale in y direction" |
|
5327 |
||
5328 |
%{ /* NOCONTEXT */ |
|
5329 |
||
5330 |
float f_y; |
|
5331 |
||
5332 |
_FLOAT_ (y, f_y) |
|
5333 |
SETWIN(aGLXWindowId) |
|
1932 | 5334 |
#ifdef OPENGL |
5335 |
#else |
|
294 | 5336 |
scale((float)0, f_y, (float)0); |
1932 | 5337 |
#endif |
294 | 5338 |
%} |
5339 |
! |
|
5340 |
||
5341 |
glxScaleZ:z in:aGLXWindowId |
|
5342 |
"scale in z direction" |
|
5343 |
||
5344 |
%{ /* NOCONTEXT */ |
|
5345 |
||
5346 |
float f_z; |
|
5347 |
||
5348 |
_FLOAT_ (z, f_z) |
|
5349 |
SETWIN(aGLXWindowId) |
|
1932 | 5350 |
#ifdef OPENGL |
5351 |
#else |
|
294 | 5352 |
scale((float)0, (float)0, f_z); |
1932 | 5353 |
#endif |
294 | 5354 |
%} |
5355 |
! |
|
5356 |
||
5357 |
glxTranslate:arrayOf3Floats in:aGLXWindowId |
|
5358 |
"translate current matrix, given a 3-element vector" |
|
5359 |
||
5360 |
%{ /* NOCONTEXT */ |
|
5361 |
||
5362 |
float vec[3], *v; |
|
5363 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5364 |
if (! (v = __glx_getFloatsFromInto(arrayOf3Floats, vec, 3))) RETURN(false); |
294 | 5365 |
|
5366 |
SETWIN(aGLXWindowId) |
|
1932 | 5367 |
#ifdef OPENGL |
5368 |
#else |
|
294 | 5369 |
translate((Coord)(v[0]), (Coord)(v[1]), (Coord)(v[2])); |
1932 | 5370 |
#endif |
294 | 5371 |
%} |
5372 |
! |
|
5373 |
||
5374 |
glxTranslateX:x in:aGLXWindowId |
|
5375 |
"translate current matrix on X axis" |
|
5376 |
||
5377 |
%{ /* NOCONTEXT */ |
|
5378 |
||
5379 |
Coord c_x; |
|
5380 |
||
5381 |
_COORD_ (x, c_x) |
|
5382 |
SETWIN(aGLXWindowId) |
|
1932 | 5383 |
#ifdef OPENGL |
5384 |
#else |
|
294 | 5385 |
translate(c_x, (Coord)0, (Coord)0); |
1932 | 5386 |
#endif |
294 | 5387 |
%} |
5388 |
! |
|
5389 |
||
5390 |
glxTranslateX:x y:y z:z in:aGLXWindowId |
|
5391 |
"translate current matrix, given individual x, y and z values" |
|
5392 |
||
5393 |
%{ /* NOCONTEXT */ |
|
5394 |
||
5395 |
Coord c_x, c_y, c_z; |
|
5396 |
||
5397 |
_COORD_ (x, c_x) |
|
5398 |
_COORD_ (y, c_y) |
|
5399 |
_COORD_ (z, c_z) |
|
5400 |
SETWIN(aGLXWindowId) |
|
1932 | 5401 |
#ifdef OPENGL |
5402 |
#else |
|
294 | 5403 |
translate(c_x, c_y, c_z); |
1932 | 5404 |
#endif |
294 | 5405 |
%} |
5406 |
! |
|
5407 |
||
5408 |
glxTranslateY:y in:aGLXWindowId |
|
5409 |
"translate current matrix on Y axis" |
|
5410 |
||
5411 |
%{ /* NOCONTEXT */ |
|
5412 |
||
5413 |
Coord c_y; |
|
5414 |
||
5415 |
_COORD_ (y, c_y) |
|
5416 |
SETWIN(aGLXWindowId) |
|
1932 | 5417 |
#ifdef OPENGL |
5418 |
#else |
|
294 | 5419 |
translate((Coord)0, c_y, (Coord)0); |
1932 | 5420 |
#endif |
294 | 5421 |
%} |
5422 |
! |
|
5423 |
||
5424 |
glxTranslateZ:z in:aGLXWindowId |
|
5425 |
"translate current matrix on Z axis" |
|
5426 |
||
5427 |
%{ /* NOCONTEXT */ |
|
5428 |
||
5429 |
Coord c_z; |
|
5430 |
||
5431 |
_COORD_ (z, c_z) |
|
5432 |
SETWIN(aGLXWindowId) |
|
1932 | 5433 |
#ifdef OPENGL |
5434 |
#else |
|
294 | 5435 |
translate((Coord)0, (Coord)0, c_z); |
1932 | 5436 |
#endif |
294 | 5437 |
%} |
5438 |
! ! |
|
5439 |
||
5440 |
!GLXWorkstation methodsFor:'unspecified rest'! |
|
5441 |
||
5442 |
glxAcbufOp:op value:value in:aGLXWindowId |
|
5443 |
||
5444 |
%{ /* NOCONTEXT */ |
|
1932 | 5445 |
SETWIN(aGLXWindowId) |
5446 |
#ifdef GLX |
|
294 | 5447 |
acbuf(__intVal(op), _floatVal(value)); |
1932 | 5448 |
#endif |
5449 |
%} |
|
294 | 5450 |
! |
5451 |
||
5452 |
glxAcsizePlanes: planes in: aGLXWindowId |
|
5453 |
||
5454 |
%{ /* NOCONTEXT */ |
|
1932 | 5455 |
SETWIN(aGLXWindowId) |
5456 |
#ifdef GLX |
|
294 | 5457 |
acsize(__intVal(planes)); |
1932 | 5458 |
#endif |
5459 |
%} |
|
294 | 5460 |
! |
5461 |
||
5462 |
glxAfunctionRef: ref func: func in: aGLXWindowId |
|
5463 |
||
5464 |
%{ /* NOCONTEXT */ |
|
1932 | 5465 |
SETWIN(aGLXWindowId) |
5466 |
#ifdef GLX |
|
294 | 5467 |
afunction(__intVal(ref), __intVal(func)); |
1932 | 5468 |
#endif |
5469 |
%} |
|
294 | 5470 |
! |
5471 |
||
5472 |
glxBbox2Xmin: xmin ymin: ymin x1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
5473 |
||
5474 |
%{ /* NOCONTEXT */ |
|
5475 |
Screencoord c_xmin, c_ymin; |
|
4718 | 5476 |
Coord c_x1, c_y1, c_x2, c_y2; |
294 | 5477 |
|
5478 |
_SCREENCOORD_ (xmin, c_xmin) |
|
5479 |
_SCREENCOORD_ (ymin, c_ymin) |
|
5480 |
_COORD_ (x1, c_x1) |
|
5481 |
_COORD_ (y1, c_y1) |
|
5482 |
_COORD_ (x2, c_x2) |
|
5483 |
_COORD_ (y2, c_y2) |
|
5484 |
SETWIN(aGLXWindowId) |
|
1932 | 5485 |
#ifdef GLX |
294 | 5486 |
bbox2(c_xmin, c_ymin, c_x1, c_y1, c_x2, c_y2); |
1932 | 5487 |
#endif |
5488 |
%} |
|
294 | 5489 |
! |
5490 |
||
5491 |
glxBbox2iXmin: xmin ymin: ymin x1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
5492 |
||
5493 |
%{ /* NOCONTEXT */ |
|
5494 |
Screencoord c_xmin, c_ymin; |
|
4718 | 5495 |
Icoord c_x1, c_y1, c_x2, c_y2; |
294 | 5496 |
|
5497 |
_SCREENCOORD_ (xmin, c_xmin) |
|
5498 |
_SCREENCOORD_ (ymin, c_ymin) |
|
5499 |
_ICOORD_ (x1, c_x1) |
|
5500 |
_ICOORD_ (y1, c_y1) |
|
5501 |
_ICOORD_ (x2, c_x2) |
|
5502 |
_ICOORD_ (y2, c_y2) |
|
5503 |
SETWIN(aGLXWindowId) |
|
1932 | 5504 |
#ifdef GLX |
294 | 5505 |
bbox2i(c_xmin, c_ymin, c_x1, c_y1, c_x2, c_y2); |
1932 | 5506 |
#endif |
5507 |
%} |
|
294 | 5508 |
! |
5509 |
||
5510 |
glxBbox2sXmin: xmin ymin: ymin x1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
5511 |
||
5512 |
%{ /* NOCONTEXT */ |
|
5513 |
Screencoord c_xmin, c_ymin; |
|
4718 | 5514 |
Scoord c_x1, c_y1, c_x2, c_y2; |
294 | 5515 |
|
5516 |
_SCREENCOORD_ (xmin, c_xmin) |
|
5517 |
_SCREENCOORD_ (ymin, c_ymin) |
|
5518 |
_SCOORD_ (x1, c_x1) |
|
5519 |
_SCOORD_ (y1, c_y1) |
|
5520 |
_SCOORD_ (x2, c_x2) |
|
5521 |
_SCOORD_ (y2, c_y2) |
|
5522 |
SETWIN(aGLXWindowId) |
|
1932 | 5523 |
#ifdef GLX |
294 | 5524 |
bbox2s(c_xmin, c_ymin, c_x1, c_y1, c_x2, c_y2); |
1932 | 5525 |
#endif |
5526 |
%} |
|
294 | 5527 |
! |
5528 |
||
5529 |
glxBeginTrimIn: aGLXWindowId |
|
5530 |
||
5531 |
%{ /* NOCONTEXT */ |
|
1932 | 5532 |
SETWIN(aGLXWindowId) |
5533 |
#ifdef GLX |
|
294 | 5534 |
bgntrim(); |
1932 | 5535 |
#endif |
5536 |
%} |
|
294 | 5537 |
! |
5538 |
||
5539 |
glxBlankscreen: b in: aGLXWindowId |
|
5540 |
||
5541 |
%{ /* NOCONTEXT */ |
|
1932 | 5542 |
SETWIN(aGLXWindowId) |
5543 |
#ifdef GLX |
|
294 | 5544 |
blankscreen(_booleanVal(b)); |
1932 | 5545 |
#endif |
5546 |
%} |
|
294 | 5547 |
! |
5548 |
||
5549 |
glxBlanktime: count in: aGLXWindowId |
|
5550 |
||
5551 |
%{ /* NOCONTEXT */ |
|
1932 | 5552 |
SETWIN(aGLXWindowId) |
5553 |
#ifdef GLX |
|
294 | 5554 |
blanktime(__intVal(count)); |
1932 | 5555 |
#endif |
5556 |
%} |
|
294 | 5557 |
! |
5558 |
||
5559 |
glxBlendcolorRed: red green: green blue: blue alpha: alpha in: aGLXWindowId |
|
5560 |
||
5561 |
%{ /* NOCONTEXT */ |
|
1932 | 5562 |
SETWIN(aGLXWindowId) |
294 | 5563 |
#ifdef FULL_GLX |
4718 | 5564 |
blendcolor(_floatVal(red), _floatVal(green), _floatVal(blue), _floatVal(alpha)); |
1932 | 5565 |
#endif |
5566 |
%} |
|
294 | 5567 |
! |
5568 |
||
5569 |
glxBlendfunctionSfactr: sfactr dfactr: dfactr in: aGLXWindowId |
|
5570 |
||
5571 |
%{ /* NOCONTEXT */ |
|
1932 | 5572 |
SETWIN(aGLXWindowId) |
5573 |
#ifdef GLX |
|
294 | 5574 |
blendfunction(__intVal(sfactr), __intVal(dfactr)); |
1932 | 5575 |
#endif |
5576 |
%} |
|
294 | 5577 |
! |
5578 |
||
5579 |
glxBlinkRate: rate i: i red: red green: green blue: blue in: aGLXWindowId |
|
5580 |
||
5581 |
%{ /* NOCONTEXT */ |
|
1932 | 5582 |
SETWIN(aGLXWindowId) |
5583 |
#ifdef GLX |
|
4718 | 5584 |
blink(_shortVal(rate), _colorindexVal(i), |
294 | 5585 |
_shortVal(red), _shortVal(green), _shortVal(blue)); |
1932 | 5586 |
#endif |
5587 |
%} |
|
294 | 5588 |
! |
5589 |
||
5590 |
glxBlkqreadData: data n: n in: aGLXWindowId |
|
5591 |
||
5592 |
%{ /* NOCONTEXT */ |
|
1932 | 5593 |
int rslt = -1; |
5594 |
||
5595 |
SETWIN(aGLXWindowId) |
|
5596 |
#ifdef GLX |
|
5597 |
rslt = blkqread((short *)_indexedArea(data), __intVal(n)); |
|
5598 |
#endif |
|
5599 |
RETURN (__MKSMALLINT(rslt)); |
|
5600 |
%} |
|
294 | 5601 |
! |
5602 |
||
5603 |
glxC3f: v in: aGLXWindowId |
|
5604 |
||
5605 |
%{ /* NOCONTEXT */ |
|
5606 |
float vec[3], *c_v; |
|
5607 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5608 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 3))) RETURN(false); |
294 | 5609 |
SETWIN(aGLXWindowId) |
1932 | 5610 |
#ifdef GLX |
294 | 5611 |
c3f(c_v); |
1932 | 5612 |
#endif |
5613 |
%} |
|
294 | 5614 |
! |
5615 |
||
5616 |
glxC3i: v in: aGLXWindowId |
|
5617 |
||
5618 |
%{ /* NOCONTEXT */ |
|
5619 |
long vec[3], *c_v; |
|
5620 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5621 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 3))) RETURN(false); |
294 | 5622 |
SETWIN(aGLXWindowId) |
1932 | 5623 |
#ifdef GLX |
294 | 5624 |
c3i(c_v); |
1932 | 5625 |
#endif |
5626 |
%} |
|
294 | 5627 |
! |
5628 |
||
5629 |
glxC3s: v in: aGLXWindowId |
|
5630 |
||
5631 |
%{ /* NOCONTEXT */ |
|
5632 |
short vec[3], *c_v; |
|
5633 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5634 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 3))) RETURN(false); |
294 | 5635 |
SETWIN(aGLXWindowId) |
1932 | 5636 |
#ifdef GLX |
294 | 5637 |
c3s(c_v); |
1932 | 5638 |
#endif |
5639 |
%} |
|
294 | 5640 |
! |
5641 |
||
5642 |
glxC4f: v in: aGLXWindowId |
|
5643 |
||
5644 |
%{ /* NOCONTEXT */ |
|
5645 |
float vec[4], *c_v; |
|
5646 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5647 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 4))) RETURN(false); |
294 | 5648 |
SETWIN(aGLXWindowId) |
1932 | 5649 |
#ifdef GLX |
294 | 5650 |
c4f(c_v); |
1932 | 5651 |
#endif |
5652 |
%} |
|
294 | 5653 |
! |
5654 |
||
5655 |
glxC4i: v in: aGLXWindowId |
|
5656 |
||
5657 |
%{ /* NOCONTEXT */ |
|
5658 |
long vec[4], *c_v; |
|
5659 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5660 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 4))) RETURN(false); |
294 | 5661 |
SETWIN(aGLXWindowId) |
1932 | 5662 |
#ifdef GLX |
294 | 5663 |
c4i(c_v); |
1932 | 5664 |
#endif |
5665 |
%} |
|
294 | 5666 |
! |
5667 |
||
5668 |
glxC4s: v in: aGLXWindowId |
|
5669 |
||
5670 |
%{ /* NOCONTEXT */ |
|
5671 |
short vec[4], *c_v; |
|
5672 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5673 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 4))) RETURN(false); |
294 | 5674 |
SETWIN(aGLXWindowId) |
1932 | 5675 |
#ifdef GLX |
294 | 5676 |
c4s(c_v); |
1932 | 5677 |
#endif |
5678 |
%} |
|
294 | 5679 |
! |
5680 |
||
5681 |
glxClearhitcodeIn: aGLXWindowId |
|
5682 |
||
5683 |
%{ /* NOCONTEXT */ |
|
1932 | 5684 |
SETWIN(aGLXWindowId) |
5685 |
#ifdef GLX |
|
294 | 5686 |
clearhitcode(); |
1932 | 5687 |
#endif |
5688 |
%} |
|
294 | 5689 |
! |
5690 |
||
5691 |
glxClipplaneIndex: index mode: mode params: params in: aGLXWindowId |
|
5692 |
||
5693 |
%{ /* NOCONTEXT */ |
|
5694 |
float vec[4], *v; |
|
5695 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
5696 |
if (! (v = __glx_getFloatsFromInto(params, vec, 4))) RETURN(false); |
294 | 5697 |
SETWIN(aGLXWindowId) |
1932 | 5698 |
#ifdef GLX |
294 | 5699 |
clipplane(__intVal(index), __intVal(mode), v); |
1932 | 5700 |
#endif |
5701 |
%} |
|
294 | 5702 |
! |
5703 |
||
5704 |
glxCmodeIn: aGLXWindowId |
|
5705 |
||
5706 |
%{ /* NOCONTEXT */ |
|
1932 | 5707 |
SETWIN(aGLXWindowId) |
5708 |
#ifdef GLX |
|
294 | 5709 |
cmode(); |
1932 | 5710 |
#endif |
5711 |
%} |
|
294 | 5712 |
! |
5713 |
||
5714 |
glxColorfIndex: index in: aGLXWindowId |
|
5715 |
||
5716 |
^self glxColor: index in: aGLXWindowId |
|
5717 |
! |
|
5718 |
||
5719 |
glxCuroriginN: n xorigin: xorigin yorigin: yorigin in: aGLXWindowId |
|
5720 |
||
5721 |
%{ /* NOCONTEXT */ |
|
1932 | 5722 |
SETWIN(aGLXWindowId) |
5723 |
#ifdef GLX |
|
294 | 5724 |
curorigin(_shortVal(n), _shortVal(xorigin), _shortVal(yorigin)); |
1932 | 5725 |
#endif |
5726 |
%} |
|
294 | 5727 |
! |
5728 |
||
5729 |
glxCursoffIn: aGLXWindowId |
|
5730 |
||
5731 |
%{ /* NOCONTEXT */ |
|
1932 | 5732 |
SETWIN(aGLXWindowId) |
5733 |
#ifdef GLX |
|
294 | 5734 |
cursoff(); |
1932 | 5735 |
#endif |
5736 |
%} |
|
294 | 5737 |
! |
5738 |
||
5739 |
glxCursonIn: aGLXWindowId |
|
5740 |
||
5741 |
%{ /* NOCONTEXT */ |
|
1932 | 5742 |
SETWIN(aGLXWindowId) |
5743 |
#ifdef GLX |
|
294 | 5744 |
curson(); |
1932 | 5745 |
#endif |
5746 |
%} |
|
294 | 5747 |
! |
5748 |
||
5749 |
glxCurstype: type in: aGLXWindowId |
|
5750 |
||
5751 |
%{ /* NOCONTEXT */ |
|
1932 | 5752 |
SETWIN(aGLXWindowId) |
5753 |
#ifdef GLX |
|
294 | 5754 |
curstype(__intVal(type)); |
1932 | 5755 |
#endif |
5756 |
%} |
|
294 | 5757 |
! |
5758 |
||
5759 |
glxCyclemapDuration: duration map: map nxtmap: nxtmap in: aGLXWindowId |
|
5760 |
||
5761 |
%{ /* NOCONTEXT */ |
|
1932 | 5762 |
SETWIN(aGLXWindowId) |
5763 |
#ifdef GLX |
|
294 | 5764 |
cyclemap(_shortVal(duration), _shortVal(map), _shortVal(nxtmap)); |
1932 | 5765 |
#endif |
5766 |
%} |
|
294 | 5767 |
! |
5768 |
||
5769 |
glxDefpatternN: n size: size mask: mask in: aGLXWindowId |
|
5770 |
||
5771 |
%{ /* NOCONTEXT */ |
|
1932 | 5772 |
SETWIN(aGLXWindowId) |
5773 |
#ifdef GLX |
|
294 | 5774 |
defpattern(_shortVal(n), _shortVal(size), (unsigned short *)_indexedArea(mask)); |
1932 | 5775 |
#endif |
5776 |
%} |
|
294 | 5777 |
! |
5778 |
||
5779 |
glxDeltag: t in: aGLXWindowId |
|
5780 |
||
5781 |
%{ /* NOCONTEXT */ |
|
1932 | 5782 |
SETWIN(aGLXWindowId) |
5783 |
#ifdef GLX |
|
294 | 5784 |
deltag(_tagVal(t)); |
1932 | 5785 |
#endif |
5786 |
%} |
|
294 | 5787 |
! |
5788 |
||
5789 |
glxDepthcueMode: mode in: aGLXWindowId |
|
5790 |
||
5791 |
%{ /* NOCONTEXT */ |
|
1932 | 5792 |
SETWIN(aGLXWindowId) |
5793 |
#ifdef GLX |
|
294 | 5794 |
depthcue(_booleanVal(mode)); |
1932 | 5795 |
#endif |
5796 |
%} |
|
294 | 5797 |
! |
5798 |
||
5799 |
glxDitherMode: mode in: aGLXWindowId |
|
5800 |
||
5801 |
%{ /* NOCONTEXT */ |
|
1932 | 5802 |
SETWIN(aGLXWindowId) |
5803 |
#ifdef GLX |
|
294 | 5804 |
dither(_longVal(mode)); |
1932 | 5805 |
#endif |
5806 |
%} |
|
294 | 5807 |
! |
5808 |
||
5809 |
glxDopup: pup in: aGLXWindowId |
|
5810 |
||
5811 |
%{ /* NOCONTEXT */ |
|
1932 | 5812 |
SETWIN(aGLXWindowId) |
5813 |
#ifdef GLX |
|
294 | 5814 |
dopup(_longVal(pup)); |
1932 | 5815 |
#endif |
5816 |
%} |
|
294 | 5817 |
! |
5818 |
||
5819 |
glxDrawmode: mode in: aGLXWindowId |
|
5820 |
||
5821 |
%{ /* NOCONTEXT */ |
|
1932 | 5822 |
SETWIN(aGLXWindowId) |
5823 |
#ifdef GLX |
|
294 | 5824 |
drawmode(_longVal(mode)); |
1932 | 5825 |
#endif |
5826 |
%} |
|
294 | 5827 |
! |
5828 |
||
5829 |
glxEditobj: obj in: aGLXWindowId |
|
5830 |
||
5831 |
%{ /* NOCONTEXT */ |
|
1932 | 5832 |
SETWIN(aGLXWindowId) |
5833 |
#ifdef GLX |
|
294 | 5834 |
editobj(_objectVal(obj)); |
1932 | 5835 |
#endif |
5836 |
%} |
|
294 | 5837 |
! |
5838 |
||
5839 |
glxEndTrimIn: aGLXWindowId |
|
5840 |
||
5841 |
%{ /* NOCONTEXT */ |
|
1932 | 5842 |
SETWIN(aGLXWindowId) |
5843 |
#ifdef GLX |
|
294 | 5844 |
endtrim(); |
1932 | 5845 |
#endif |
5846 |
%} |
|
294 | 5847 |
! |
5848 |
||
5849 |
glxEndfullscrnIn: aGLXWindowId |
|
5850 |
||
5851 |
%{ /* NOCONTEXT */ |
|
1932 | 5852 |
SETWIN(aGLXWindowId) |
5853 |
#ifdef GLX |
|
294 | 5854 |
endfullscrn(); |
1932 | 5855 |
#endif |
5856 |
%} |
|
294 | 5857 |
! |
5858 |
||
5859 |
glxEndpupmodeIn: aGLXWindowId |
|
5860 |
||
5861 |
%{ /* NOCONTEXT */ |
|
1932 | 5862 |
SETWIN(aGLXWindowId) |
5863 |
#ifdef GLX |
|
294 | 5864 |
endpupmode(); |
1932 | 5865 |
#endif |
5866 |
%} |
|
294 | 5867 |
! |
5868 |
||
5869 |
glxFinishIn: aGLXWindowId |
|
5870 |
||
5871 |
%{ /* NOCONTEXT */ |
|
1932 | 5872 |
SETWIN(aGLXWindowId) |
5873 |
#ifdef GLX |
|
294 | 5874 |
finish(); |
1932 | 5875 |
#endif |
5876 |
%} |
|
294 | 5877 |
! |
5878 |
||
5879 |
glxFont: fntnum in: aGLXWindowId |
|
5880 |
||
5881 |
%{ /* NOCONTEXT */ |
|
5882 |
SETWIN(aGLXWindowId) |
|
1932 | 5883 |
#ifdef GLX |
294 | 5884 |
font(_shortVal(fntnum)); |
1932 | 5885 |
#endif |
294 | 5886 |
%} |
5887 |
! |
|
5888 |
||
5889 |
glxForegroundIn: aGLXWindowId |
|
5890 |
||
5891 |
%{ /* NOCONTEXT */ |
|
5892 |
SETWIN(aGLXWindowId) |
|
1932 | 5893 |
#ifdef OPENGL |
5894 |
#else |
|
294 | 5895 |
foreground(); |
1932 | 5896 |
#endif |
294 | 5897 |
%} |
5898 |
! |
|
5899 |
||
5900 |
glxFreepup: pup in: aGLXWindowId |
|
5901 |
||
5902 |
%{ /* NOCONTEXT */ |
|
1932 | 5903 |
SETWIN(aGLXWindowId) |
5904 |
#ifdef GLX |
|
294 | 5905 |
freepup(_longVal(pup)); |
1932 | 5906 |
#endif |
5907 |
%} |
|
294 | 5908 |
! |
5909 |
||
5910 |
glxFudgeXfudge: xfudge yfudge: yfudge in: aGLXWindowId |
|
5911 |
||
5912 |
%{ /* NOCONTEXT */ |
|
1932 | 5913 |
SETWIN(aGLXWindowId) |
5914 |
#ifdef GLX |
|
294 | 5915 |
fudge(_longVal(xfudge), _longVal(yfudge)); |
1932 | 5916 |
#endif |
5917 |
%} |
|
294 | 5918 |
! |
5919 |
||
5920 |
glxFullscrnIn: aGLXWindowId |
|
5921 |
||
5922 |
%{ /* NOCONTEXT */ |
|
1932 | 5923 |
SETWIN(aGLXWindowId) |
5924 |
#ifdef GLX |
|
294 | 5925 |
fullscrn(); |
1932 | 5926 |
#endif |
5927 |
%} |
|
294 | 5928 |
! |
5929 |
||
5930 |
glxGbeginIn: aGLXWindowId |
|
5931 |
||
5932 |
%{ /* NOCONTEXT */ |
|
1932 | 5933 |
SETWIN(aGLXWindowId) |
5934 |
#ifdef GLX |
|
294 | 5935 |
gbegin(); |
1932 | 5936 |
#endif |
5937 |
%} |
|
294 | 5938 |
! |
5939 |
||
5940 |
glxGentagIn: aGLXWindowId |
|
5941 |
||
5942 |
%{ /* NOCONTEXT */ |
|
1932 | 5943 |
int rslt = -1; |
5944 |
||
5945 |
#ifdef GLX |
|
5946 |
SETWIN(aGLXWindowId) |
|
5947 |
rslt = gentag(); |
|
5948 |
#endif |
|
5949 |
RETURN (__MKSMALLINT(rslt)); |
|
5950 |
%} |
|
294 | 5951 |
! |
5952 |
||
5953 |
glxGetbackfaceIn: aGLXWindowId |
|
5954 |
||
5955 |
%{ /* NOCONTEXT */ |
|
1932 | 5956 |
int rslt = -1; |
5957 |
||
5958 |
#ifdef GLX |
|
5959 |
SETWIN(aGLXWindowId) |
|
5960 |
rslt = getbackface(); |
|
5961 |
#endif |
|
5962 |
RETURN (__MKSMALLINT(rslt)); |
|
5963 |
%} |
|
294 | 5964 |
! |
5965 |
||
5966 |
glxGetbufferIn: aGLXWindowId |
|
5967 |
||
5968 |
%{ /* NOCONTEXT */ |
|
1932 | 5969 |
int rslt = -1; |
5970 |
||
5971 |
#ifdef GLX |
|
5972 |
SETWIN(aGLXWindowId) |
|
5973 |
rslt = getbuffer(); |
|
5974 |
#endif |
|
5975 |
RETURN (__MKSMALLINT(rslt)); |
|
5976 |
%} |
|
294 | 5977 |
! |
5978 |
||
5979 |
glxGetbutton: num in: aGLXWindowId |
|
5980 |
||
5981 |
%{ /* NOCONTEXT */ |
|
1932 | 5982 |
int rslt = -1; |
5983 |
||
5984 |
SETWIN(aGLXWindowId) |
|
5985 |
#ifdef OPENGL |
|
5986 |
#else |
|
5987 |
rslt = getbutton(_deviceVal(num)); |
|
5988 |
#endif |
|
5989 |
RETURN (__MKSMALLINT(rslt)); |
|
294 | 5990 |
%} |
5991 |
! |
|
5992 |
||
5993 |
glxGetcmmodeIn: aGLXWindowId |
|
5994 |
||
5995 |
%{ /* NOCONTEXT */ |
|
1932 | 5996 |
int rslt = 0; |
5997 |
||
5998 |
SETWIN(aGLXWindowId) |
|
5999 |
#ifdef GLX |
|
6000 |
rslt = getcmmode(); |
|
6001 |
#endif |
|
6002 |
RETURN (__MKBOOLEAN(rslt)); |
|
6003 |
%} |
|
294 | 6004 |
! |
6005 |
||
6006 |
glxGetcolorIn: aGLXWindowId |
|
6007 |
"return the current drawing color" |
|
6008 |
||
6009 |
%{ /* NOCONTEXT */ |
|
1932 | 6010 |
int rslt = -1; |
6011 |
||
6012 |
SETWIN(aGLXWindowId) |
|
6013 |
#ifdef OPENGL |
|
6014 |
#else |
|
6015 |
rslt = getcolor(); |
|
6016 |
#endif |
|
6017 |
RETURN (__MKSMALLINT(rslt)); |
|
294 | 6018 |
%} |
6019 |
! |
|
6020 |
||
6021 |
glxGetdcmIn: aGLXWindowId |
|
6022 |
||
6023 |
%{ /* NOCONTEXT */ |
|
6024 |
#ifdef GLX |
|
6025 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6026 |
RETURN (__MKBOOLEAN(getdcm())); |
294 | 6027 |
#endif |
6028 |
%} |
|
6029 |
. |
|
6030 |
^ false |
|
6031 |
! |
|
6032 |
||
6033 |
glxGetdescenderIn: aGLXWindowId |
|
6034 |
||
6035 |
%{ /* NOCONTEXT */ |
|
6036 |
#ifdef GLX |
|
6037 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6038 |
RETURN (__MKSMALLINT(getdescender())); |
294 | 6039 |
#endif |
6040 |
%} |
|
6041 |
. |
|
6042 |
^ false |
|
6043 |
! |
|
6044 |
||
6045 |
glxGetdisplaymodeIn: aGLXWindowId |
|
6046 |
||
6047 |
%{ /* NOCONTEXT */ |
|
6048 |
#ifdef GLX |
|
6049 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6050 |
RETURN (__MKSMALLINT(getdisplaymode())); |
294 | 6051 |
#endif |
6052 |
%} |
|
6053 |
. |
|
6054 |
^ false |
|
6055 |
! |
|
6056 |
||
6057 |
glxGetdrawmodeIn: aGLXWindowId |
|
6058 |
||
6059 |
%{ /* NOCONTEXT */ |
|
6060 |
#ifdef GLX |
|
6061 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6062 |
RETURN (__MKSMALLINT(getdrawmode())); |
294 | 6063 |
#endif |
6064 |
%} |
|
6065 |
. |
|
6066 |
^ false |
|
6067 |
! |
|
6068 |
||
6069 |
glxGetfontIn: aGLXWindowId |
|
6070 |
||
6071 |
%{ /* NOCONTEXT */ |
|
6072 |
#ifdef GLX |
|
6073 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6074 |
RETURN (__MKSMALLINT(getfont())); |
294 | 6075 |
#endif |
6076 |
%} |
|
6077 |
. |
|
6078 |
^ false |
|
6079 |
! |
|
6080 |
||
6081 |
glxGetgconfigBuffer: buffer in: aGLXWindowId |
|
6082 |
||
6083 |
%{ /* NOCONTEXT */ |
|
6084 |
#ifdef FULL_GLX |
|
6085 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6086 |
RETURN (__MKSMALLINT(getgconfig(_longVal(buffer)))); |
294 | 6087 |
#endif |
6088 |
%} |
|
6089 |
. |
|
6090 |
^ false |
|
6091 |
! |
|
6092 |
||
6093 |
glxGetgdescInquiry: inquiry in: aGLXWindowId |
|
6094 |
||
6095 |
%{ /* NOCONTEXT */ |
|
1932 | 6096 |
int rslt = 0; |
6097 |
||
6098 |
SETWIN(aGLXWindowId) |
|
6099 |
#ifdef OPENGL |
|
6100 |
#else |
|
6101 |
rslt = getgdesc(_longVal(inquiry)); |
|
6102 |
#endif |
|
6103 |
RETURN (__MKSMALLINT(rslt)); |
|
294 | 6104 |
%} |
6105 |
! |
|
6106 |
||
6107 |
glxGetheightIn: aGLXWindowId |
|
6108 |
||
6109 |
%{ /* NOCONTEXT */ |
|
1932 | 6110 |
int rslt = 0; |
6111 |
||
6112 |
SETWIN(aGLXWindowId) |
|
6113 |
#ifdef OPENGL |
|
6114 |
#else |
|
6115 |
rslt = getheight(); |
|
6116 |
#endif |
|
6117 |
RETURN (__MKSMALLINT(rslt)); |
|
294 | 6118 |
%} |
6119 |
! |
|
6120 |
||
6121 |
glxGethitcodeIn: aGLXWindowId |
|
6122 |
||
6123 |
%{ /* NOCONTEXT */ |
|
6124 |
#ifdef GLX |
|
6125 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6126 |
RETURN (__MKSMALLINT(gethitcode())); |
294 | 6127 |
#endif |
6128 |
%} |
|
6129 |
. |
|
6130 |
^ false |
|
6131 |
! |
|
6132 |
||
6133 |
glxGetlsbackupIn: aGLXWindowId |
|
6134 |
||
6135 |
%{ /* NOCONTEXT */ |
|
6136 |
#ifdef GLX |
|
6137 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6138 |
RETURN (__MKBOOLEAN(getlsbackup())); |
294 | 6139 |
#endif |
6140 |
%} |
|
6141 |
. |
|
6142 |
^ false |
|
6143 |
! |
|
6144 |
||
6145 |
glxGetlsrepeatIn: aGLXWindowId |
|
6146 |
||
6147 |
%{ /* NOCONTEXT */ |
|
6148 |
#ifdef GLX |
|
6149 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6150 |
RETURN (__MKSMALLINT(getlsrepeat())); |
294 | 6151 |
#endif |
6152 |
%} |
|
6153 |
. |
|
6154 |
^ false |
|
6155 |
! |
|
6156 |
||
6157 |
glxGetlstyleIn: aGLXWindowId |
|
6158 |
||
6159 |
%{ /* NOCONTEXT */ |
|
6160 |
#ifdef GLX |
|
6161 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6162 |
RETURN (__MKSMALLINT(getlstyle())); |
294 | 6163 |
#endif |
6164 |
%} |
|
6165 |
. |
|
6166 |
^ false |
|
6167 |
! |
|
6168 |
||
6169 |
glxGetlwidthIn: aGLXWindowId |
|
6170 |
||
6171 |
%{ /* NOCONTEXT */ |
|
6172 |
#ifdef GLX |
|
6173 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6174 |
RETURN (__MKSMALLINT(getlwidth())); |
294 | 6175 |
#endif |
6176 |
%} |
|
6177 |
. |
|
6178 |
^ false |
|
6179 |
! |
|
6180 |
||
6181 |
glxGetmapIn: aGLXWindowId |
|
6182 |
||
6183 |
%{ /* NOCONTEXT */ |
|
6184 |
#ifdef GLX |
|
6185 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6186 |
RETURN (__MKSMALLINT(getmap())); |
294 | 6187 |
#endif |
6188 |
%} |
|
6189 |
. |
|
6190 |
^ false |
|
6191 |
! |
|
6192 |
||
6193 |
glxGetmmodeIn: aGLXWindowId |
|
6194 |
||
6195 |
%{ /* NOCONTEXT */ |
|
6196 |
#ifdef GLX |
|
6197 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6198 |
RETURN (__MKSMALLINT(getmmode())); |
294 | 6199 |
#endif |
6200 |
%} |
|
6201 |
. |
|
6202 |
^ false |
|
6203 |
! |
|
6204 |
||
6205 |
glxGetmonitorIn: aGLXWindowId |
|
6206 |
||
6207 |
%{ /* NOCONTEXT */ |
|
6208 |
#ifdef GLX |
|
6209 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6210 |
RETURN (__MKSMALLINT(getmonitor())); |
294 | 6211 |
#endif |
6212 |
%} |
|
6213 |
. |
|
6214 |
^ false |
|
6215 |
! |
|
6216 |
||
6217 |
glxGetmultisampleIn: aGLXWindowId |
|
6218 |
||
6219 |
%{ /* NOCONTEXT */ |
|
6220 |
#ifdef FULL_GLX |
|
6221 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6222 |
RETURN (__MKBOOLEAN(getmultisample())); |
294 | 6223 |
#endif |
6224 |
%} |
|
6225 |
. |
|
6226 |
^ false |
|
6227 |
! |
|
6228 |
||
6229 |
glxGetothermonitorIn: aGLXWindowId |
|
6230 |
||
6231 |
%{ /* NOCONTEXT */ |
|
6232 |
#ifdef GLX |
|
6233 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6234 |
RETURN (__MKSMALLINT(getothermonitor())); |
294 | 6235 |
#endif |
6236 |
%} |
|
6237 |
. |
|
6238 |
^ false |
|
6239 |
! |
|
6240 |
||
6241 |
glxGetpatternIn: aGLXWindowId |
|
6242 |
||
6243 |
%{ /* NOCONTEXT */ |
|
6244 |
#ifdef GLX |
|
6245 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6246 |
RETURN (__MKSMALLINT(getpattern())); |
294 | 6247 |
#endif |
6248 |
%} |
|
6249 |
. |
|
6250 |
^ false |
|
6251 |
! |
|
6252 |
||
6253 |
glxGetresetlsIn: aGLXWindowId |
|
6254 |
||
6255 |
%{ /* NOCONTEXT */ |
|
6256 |
#ifdef GLX |
|
6257 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6258 |
RETURN (__MKBOOLEAN(getresetls())); |
294 | 6259 |
#endif |
6260 |
%} |
|
6261 |
. |
|
6262 |
^ false |
|
6263 |
! |
|
6264 |
||
6265 |
glxGetshadeIn: aGLXWindowId |
|
6266 |
||
6267 |
%{ /* NOCONTEXT */ |
|
6268 |
#ifdef GLX |
|
6269 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6270 |
RETURN (__MKSMALLINT(getshade())); |
294 | 6271 |
#endif |
6272 |
%} |
|
6273 |
. |
|
6274 |
^ false |
|
6275 |
! |
|
6276 |
||
6277 |
glxGetsmIn: aGLXWindowId |
|
6278 |
||
6279 |
%{ /* NOCONTEXT */ |
|
6280 |
#ifdef GLX |
|
6281 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6282 |
RETURN (__MKSMALLINT(getsm())); |
294 | 6283 |
#endif |
6284 |
%} |
|
6285 |
. |
|
6286 |
^ false |
|
6287 |
! |
|
6288 |
||
6289 |
glxGetvaluator: dev in: aGLXWindowId |
|
6290 |
||
6291 |
%{ /* NOCONTEXT */ |
|
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
6292 |
#ifndef OPENGL |
294 | 6293 |
SETWIN(aGLXWindowId) |
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6294 |
RETURN (__MKSMALLINT(getvaluator(_deviceVal(dev)))); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
6295 |
#endif |
294 | 6296 |
%} |
6297 |
. |
|
6298 |
^ false |
|
6299 |
! |
|
6300 |
||
6301 |
glxGetvideo: reg in: aGLXWindowId |
|
6302 |
||
6303 |
%{ /* NOCONTEXT */ |
|
6304 |
#ifdef GLX |
|
6305 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6306 |
RETURN (__MKSMALLINT(getvideo(_longVal(reg)))); |
294 | 6307 |
#endif |
6308 |
%} |
|
6309 |
. |
|
6310 |
^ false |
|
6311 |
! |
|
6312 |
||
6313 |
glxGetwritemaskIn: aGLXWindowId |
|
6314 |
||
6315 |
%{ /* NOCONTEXT */ |
|
6316 |
#ifdef GLX |
|
6317 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6318 |
RETURN (__MKSMALLINT(getwritemask())); |
294 | 6319 |
#endif |
6320 |
%} |
|
6321 |
. |
|
6322 |
^ false |
|
6323 |
! |
|
6324 |
||
6325 |
glxGetwscrnIn: aGLXWindowId |
|
6326 |
||
6327 |
%{ /* NOCONTEXT */ |
|
6328 |
#ifdef GLX |
|
6329 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6330 |
RETURN (__MKSMALLINT(getwscrn())); |
294 | 6331 |
#endif |
6332 |
%} |
|
6333 |
. |
|
6334 |
^ false |
|
6335 |
! |
|
6336 |
||
6337 |
glxGetzbufferIn: aGLXWindowId |
|
6338 |
||
6339 |
%{ /* NOCONTEXT */ |
|
6340 |
#ifdef GLX |
|
6341 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6342 |
RETURN (__MKBOOLEAN(getzbuffer())); |
294 | 6343 |
#endif |
6344 |
%} |
|
6345 |
. |
|
6346 |
^ false |
|
6347 |
! |
|
6348 |
||
6349 |
glxGexitIn: aGLXWindowId |
|
6350 |
||
6351 |
%{ /* NOCONTEXT */ |
|
1932 | 6352 |
SETWIN(aGLXWindowId) |
6353 |
#ifdef OPENGL |
|
6354 |
#else |
|
294 | 6355 |
gexit(); |
1932 | 6356 |
#endif |
6357 |
%} |
|
294 | 6358 |
! |
6359 |
||
6360 |
glxGflushIn: aGLXWindowId |
|
6361 |
||
6362 |
%{ /* NOCONTEXT */ |
|
6363 |
#ifdef GLX |
|
6364 |
SETWIN(aGLXWindowId) |
|
6365 |
gflush(); |
|
1932 | 6366 |
#endif |
6367 |
%} |
|
294 | 6368 |
! |
6369 |
||
6370 |
glxGinitIn: aGLXWindowId |
|
6371 |
||
6372 |
%{ /* NOCONTEXT */ |
|
1932 | 6373 |
SETWIN(aGLXWindowId) |
6374 |
#ifdef OPENGL |
|
6375 |
#else |
|
294 | 6376 |
ginit(); |
1932 | 6377 |
#endif |
6378 |
%} |
|
294 | 6379 |
! |
6380 |
||
6381 |
glxGlcompatMode: mode value: value in: aGLXWindowId |
|
6382 |
||
6383 |
%{ /* NOCONTEXT */ |
|
6384 |
#ifdef GLX |
|
6385 |
SETWIN(aGLXWindowId) |
|
6386 |
glcompat(_longVal(mode), _longVal(value)); |
|
1932 | 6387 |
#endif |
6388 |
%} |
|
294 | 6389 |
! |
6390 |
||
6391 |
glxGresetIn: aGLXWindowId |
|
6392 |
||
6393 |
%{ /* NOCONTEXT */ |
|
6394 |
#ifdef GLX |
|
6395 |
SETWIN(aGLXWindowId) |
|
6396 |
greset(); |
|
1932 | 6397 |
#endif |
6398 |
%} |
|
294 | 6399 |
! |
6400 |
||
6401 |
glxGsyncIn: aGLXWindowId |
|
6402 |
||
6403 |
%{ /* NOCONTEXT */ |
|
6404 |
#ifdef GLX |
|
6405 |
SETWIN(aGLXWindowId) |
|
6406 |
gsync(); |
|
1932 | 6407 |
#endif |
6408 |
%} |
|
294 | 6409 |
! |
6410 |
||
6411 |
glxIconsizeX: x y: y in: aGLXWindowId |
|
6412 |
||
6413 |
%{ /* NOCONTEXT */ |
|
6414 |
#ifdef GLX |
|
6415 |
SETWIN(aGLXWindowId) |
|
6416 |
iconsize(_longVal(x), _longVal(y)); |
|
1932 | 6417 |
#endif |
6418 |
%} |
|
294 | 6419 |
! |
6420 |
||
6421 |
glxImakebackgroundIn: aGLXWindowId |
|
6422 |
||
6423 |
%{ /* NOCONTEXT */ |
|
6424 |
#ifdef GLX |
|
6425 |
SETWIN(aGLXWindowId) |
|
6426 |
imakebackground(); |
|
1932 | 6427 |
#endif |
6428 |
%} |
|
294 | 6429 |
! |
6430 |
||
6431 |
glxInitnamesIn: aGLXWindowId |
|
6432 |
||
6433 |
%{ /* NOCONTEXT */ |
|
6434 |
#ifdef GLX |
|
6435 |
SETWIN(aGLXWindowId) |
|
6436 |
initnames(); |
|
1932 | 6437 |
#endif |
6438 |
%} |
|
294 | 6439 |
! |
6440 |
||
6441 |
glxIsqueued: dev in: aGLXWindowId |
|
6442 |
||
6443 |
%{ /* NOCONTEXT */ |
|
6444 |
#ifdef GLX |
|
6445 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6446 |
RETURN (__MKBOOLEAN(isqueued(_deviceVal(dev)))); |
294 | 6447 |
#endif |
6448 |
%} |
|
6449 |
. |
|
6450 |
^ false |
|
6451 |
! |
|
6452 |
||
6453 |
glxIstag: t in: aGLXWindowId |
|
6454 |
||
6455 |
%{ /* NOCONTEXT */ |
|
6456 |
#ifdef GLX |
|
6457 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6458 |
RETURN (__MKBOOLEAN(istag(_tagVal(t)))); |
294 | 6459 |
#endif |
6460 |
%} |
|
6461 |
. |
|
6462 |
^ false |
|
6463 |
! |
|
6464 |
||
6465 |
glxKeepaspectX: x y: y in: aGLXWindowId |
|
6466 |
||
6467 |
%{ /* NOCONTEXT */ |
|
6468 |
#ifdef GLX |
|
6469 |
SETWIN(aGLXWindowId) |
|
6470 |
keepaspect(_longVal(x), _longVal(y)); |
|
6471 |
RETURN (true); |
|
6472 |
#endif |
|
6473 |
%} |
|
6474 |
. |
|
6475 |
^ false |
|
6476 |
! |
|
6477 |
||
6478 |
glxLinesmoothMode: mode in: aGLXWindowId |
|
6479 |
||
6480 |
%{ /* NOCONTEXT */ |
|
6481 |
#ifdef GLX |
|
6482 |
SETWIN(aGLXWindowId) |
|
6483 |
linesmooth((ulong)__intVal(mode)); |
|
6484 |
RETURN (true); |
|
6485 |
#endif |
|
6486 |
%} |
|
6487 |
. |
|
6488 |
^ false |
|
6489 |
! |
|
6490 |
||
6491 |
glxLmcolorMode: mode in: aGLXWindowId |
|
6492 |
||
6493 |
%{ /* NOCONTEXT */ |
|
6494 |
#ifdef GLX |
|
6495 |
SETWIN(aGLXWindowId) |
|
6496 |
lmcolor(_longVal(mode)); |
|
6497 |
RETURN (true); |
|
6498 |
#endif |
|
6499 |
%} |
|
6500 |
. |
|
6501 |
^ false |
|
6502 |
! |
|
6503 |
||
6504 |
glxLoadname: name in: aGLXWindowId |
|
6505 |
||
6506 |
%{ /* NOCONTEXT */ |
|
6507 |
#ifdef GLX |
|
6508 |
SETWIN(aGLXWindowId) |
|
6509 |
loadname(_shortVal(name)); |
|
6510 |
RETURN (true); |
|
6511 |
#endif |
|
6512 |
%} |
|
6513 |
. |
|
6514 |
^ false |
|
6515 |
! |
|
6516 |
||
6517 |
glxLogicop: opcode in: aGLXWindowId |
|
6518 |
||
6519 |
%{ /* NOCONTEXT */ |
|
6520 |
#ifdef GLX |
|
6521 |
SETWIN(aGLXWindowId) |
|
6522 |
logicop(_longVal(opcode)); |
|
6523 |
RETURN (true); |
|
6524 |
#endif |
|
6525 |
%} |
|
6526 |
. |
|
6527 |
^ false |
|
6528 |
! |
|
6529 |
||
6530 |
glxLsbackup: b in: aGLXWindowId |
|
6531 |
||
6532 |
%{ /* NOCONTEXT */ |
|
6533 |
#ifdef GLX |
|
6534 |
SETWIN(aGLXWindowId) |
|
6535 |
lsbackup(_booleanVal(b)); |
|
6536 |
RETURN (true); |
|
6537 |
#endif |
|
6538 |
%} |
|
6539 |
. |
|
6540 |
^ false |
|
6541 |
! |
|
6542 |
||
2422
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
6543 |
glxLsetdepthNear:znear far:zfar in: aGLXWindowId |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
6544 |
|
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
6545 |
%{ /* NOCONTEXT */ |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
6546 |
#ifdef GLX |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
6547 |
SETWIN(aGLXWindowId) |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
6548 |
lsetdepth(_longVal(znear), _longVal(zfar)); |
294 | 6549 |
RETURN (true); |
6550 |
#endif |
|
6551 |
%} |
|
6552 |
. |
|
6553 |
^ false |
|
6554 |
! |
|
6555 |
||
6556 |
glxLshaderangeLowin: lowin hiwin: hiwin znear: znear zfar: zfar in: aGLXWindowId |
|
6557 |
||
6558 |
%{ /* NOCONTEXT */ |
|
6559 |
#ifdef GLX |
|
6560 |
SETWIN(aGLXWindowId) |
|
4718 | 6561 |
lshaderange(_colorindexVal(lowin), _colorindexVal(hiwin), |
294 | 6562 |
_longVal(znear), _longVal(zfar)); |
6563 |
RETURN (true); |
|
6564 |
#endif |
|
6565 |
%} |
|
6566 |
. |
|
6567 |
^ false |
|
6568 |
! |
|
6569 |
||
6570 |
glxLsrepeatFactor: factor in: aGLXWindowId |
|
6571 |
||
6572 |
%{ /* NOCONTEXT */ |
|
6573 |
#ifdef GLX |
|
6574 |
SETWIN(aGLXWindowId) |
|
6575 |
lsrepeat(_longVal(factor)); |
|
6576 |
RETURN (true); |
|
6577 |
#endif |
|
6578 |
%} |
|
6579 |
. |
|
6580 |
^ false |
|
6581 |
! |
|
6582 |
||
6583 |
glxMaketag: t in: aGLXWindowId |
|
6584 |
||
6585 |
%{ /* NOCONTEXT */ |
|
6586 |
#ifdef GLX |
|
6587 |
SETWIN(aGLXWindowId) |
|
6588 |
maketag(_tagVal(t)); |
|
6589 |
RETURN (true); |
|
6590 |
#endif |
|
6591 |
%} |
|
6592 |
. |
|
6593 |
^ false |
|
6594 |
! |
|
6595 |
||
6596 |
glxMaxsizeX: x y: y in: aGLXWindowId |
|
6597 |
||
6598 |
%{ /* NOCONTEXT */ |
|
6599 |
#ifdef GLX |
|
6600 |
SETWIN(aGLXWindowId) |
|
6601 |
maxsize(_longVal(x), _longVal(y)); |
|
6602 |
RETURN (true); |
|
6603 |
#endif |
|
6604 |
%} |
|
6605 |
. |
|
6606 |
^ false |
|
6607 |
! |
|
6608 |
||
6609 |
glxMinsizeX: x y: y in: aGLXWindowId |
|
6610 |
||
6611 |
%{ /* NOCONTEXT */ |
|
6612 |
#ifdef GLX |
|
6613 |
SETWIN(aGLXWindowId) |
|
6614 |
minsize(_longVal(x), _longVal(y)); |
|
6615 |
RETURN (true); |
|
6616 |
#endif |
|
6617 |
%} |
|
6618 |
. |
|
6619 |
^ false |
|
6620 |
! |
|
6621 |
||
6622 |
glxMsalphaMode: mode in: aGLXWindowId |
|
6623 |
||
6624 |
%{ /* NOCONTEXT */ |
|
6625 |
#ifdef FULL_GLX |
|
6626 |
SETWIN(aGLXWindowId) |
|
6627 |
msalpha(_longVal(mode)); |
|
6628 |
RETURN (true); |
|
6629 |
#endif |
|
6630 |
%} |
|
6631 |
. |
|
6632 |
^ false |
|
6633 |
! |
|
6634 |
||
6635 |
glxMsmask: mask inverse: inverse in: aGLXWindowId |
|
6636 |
||
6637 |
%{ /* NOCONTEXT */ |
|
6638 |
#ifdef FULL_GLX |
|
6639 |
SETWIN(aGLXWindowId) |
|
6640 |
msmask(_floatVal(mask), _booleanVal(inverse)); |
|
6641 |
RETURN (true); |
|
6642 |
#endif |
|
6643 |
%} |
|
6644 |
. |
|
6645 |
^ false |
|
6646 |
! |
|
6647 |
||
6648 |
glxMspattern: pattern in: aGLXWindowId |
|
6649 |
||
6650 |
%{ /* NOCONTEXT */ |
|
6651 |
#ifdef FULL_GLX |
|
6652 |
SETWIN(aGLXWindowId) |
|
6653 |
mspattern(_longVal(pattern)); |
|
6654 |
RETURN (true); |
|
6655 |
#endif |
|
6656 |
%} |
|
6657 |
. |
|
6658 |
^ false |
|
6659 |
! |
|
6660 |
||
6661 |
glxMssizeSamples: samples zsize: zsize ssize: ssize in: aGLXWindowId |
|
6662 |
||
6663 |
%{ /* NOCONTEXT */ |
|
6664 |
#ifdef FULL_GLX |
|
6665 |
SETWIN(aGLXWindowId) |
|
6666 |
mssize(_longVal(samples), _longVal(zsize), _longVal(ssize)); |
|
6667 |
RETURN (true); |
|
6668 |
#endif |
|
6669 |
%} |
|
6670 |
. |
|
6671 |
^ false |
|
6672 |
! |
|
6673 |
||
6674 |
glxMswapbuffers: fbuf in: aGLXWindowId |
|
6675 |
||
6676 |
%{ /* NOCONTEXT */ |
|
6677 |
#ifdef GLX |
|
6678 |
SETWIN(aGLXWindowId) |
|
6679 |
mswapbuffers(_longVal(fbuf)); |
|
6680 |
RETURN (true); |
|
6681 |
#endif |
|
6682 |
%} |
|
6683 |
. |
|
6684 |
^ false |
|
6685 |
! |
|
6686 |
||
6687 |
glxMultimapIn: aGLXWindowId |
|
6688 |
||
6689 |
%{ /* NOCONTEXT */ |
|
6690 |
#ifdef GLX |
|
6691 |
SETWIN(aGLXWindowId) |
|
6692 |
multimap(); |
|
6693 |
RETURN (true); |
|
6694 |
#endif |
|
6695 |
%} |
|
6696 |
. |
|
6697 |
^ false |
|
6698 |
! |
|
6699 |
||
6700 |
glxMultisample: bool in: aGLXWindowId |
|
6701 |
||
6702 |
%{ /* NOCONTEXT */ |
|
6703 |
#ifdef FULL_GLX |
|
6704 |
SETWIN(aGLXWindowId) |
|
6705 |
multisample(_booleanVal(bool)); |
|
6706 |
RETURN (true); |
|
6707 |
#endif |
|
6708 |
%} |
|
6709 |
. |
|
6710 |
^ false |
|
6711 |
! |
|
6712 |
||
6713 |
glxNewpupIn: aGLXWindowId |
|
6714 |
||
6715 |
%{ /* NOCONTEXT */ |
|
6716 |
#ifdef GLX |
|
6717 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
6718 |
RETURN (__MKSMALLINT(newpup())); |
294 | 6719 |
#endif |
6720 |
%} |
|
6721 |
. |
|
6722 |
^ false |
|
6723 |
! |
|
6724 |
||
6725 |
glxNewtag: newtg oldtg: oldtg offst: offst in: aGLXWindowId |
|
6726 |
||
6727 |
%{ /* NOCONTEXT */ |
|
6728 |
#ifdef GLX |
|
6729 |
SETWIN(aGLXWindowId) |
|
6730 |
newtag(_tagVal(newtg), _tagVal(oldtg), _offsetVal(offst)); |
|
6731 |
RETURN (true); |
|
6732 |
#endif |
|
6733 |
%} |
|
6734 |
. |
|
6735 |
^ false |
|
6736 |
! |
|
6737 |
||
6738 |
glxNoborderIn: aGLXWindowId |
|
6739 |
||
6740 |
%{ /* NOCONTEXT */ |
|
6741 |
#ifdef GLX |
|
6742 |
SETWIN(aGLXWindowId) |
|
6743 |
noborder(); |
|
6744 |
RETURN (true); |
|
6745 |
#endif |
|
6746 |
%} |
|
6747 |
. |
|
6748 |
^ false |
|
6749 |
! |
|
6750 |
||
6751 |
glxNoise: v delta: delta in: aGLXWindowId |
|
6752 |
||
6753 |
%{ /* NOCONTEXT */ |
|
6754 |
#ifdef GLX |
|
6755 |
SETWIN(aGLXWindowId) |
|
6756 |
noise(_deviceVal(v), _shortVal(delta)); |
|
6757 |
RETURN (true); |
|
6758 |
#endif |
|
6759 |
%} |
|
6760 |
. |
|
6761 |
^ false |
|
6762 |
! |
|
6763 |
||
6764 |
glxNoportIn: aGLXWindowId |
|
6765 |
||
6766 |
%{ /* NOCONTEXT */ |
|
6767 |
#ifdef GLX |
|
6768 |
SETWIN(aGLXWindowId) |
|
6769 |
noport(); |
|
6770 |
RETURN (true); |
|
6771 |
#endif |
|
6772 |
%} |
|
6773 |
. |
|
6774 |
^ false |
|
6775 |
! |
|
6776 |
||
6777 |
glxNurbscurveKnotCount: knotCount knotList: knotList |
|
4718 | 6778 |
offset: offset ctlArray: ctlArray |
294 | 6779 |
order: order type: type in: aGLXWindowId |
6780 |
||
6781 |
| ctlPoints i | |
|
6782 |
ctlPoints := DoubleArray new: ctlArray size * (ctlArray first size). |
|
6783 |
i := 1. |
|
6784 |
ctlArray do: [:point | |
|
4718 | 6785 |
point do: [:coord | |
294 | 6786 |
ctlPoints at: i put: coord. |
6787 |
i := i + 1]]. |
|
6788 |
||
6789 |
%{ /* NOCONTEXT */ |
|
6790 |
#ifdef GLX |
|
6791 |
char *knotElements, *ctlElements; |
|
6792 |
OBJ cls; |
|
6793 |
int ninstVars, nInstBytes; |
|
6794 |
||
6795 |
SETWIN(aGLXWindowId) |
|
6796 |
cls = __qClass(ctlPoints); |
|
6797 |
ninstVars = __intVal(_ClassInstPtr(cls)->c_ninstvars); |
|
6798 |
nInstBytes = OHDR_SIZE + ninstVars * sizeof(OBJ); |
|
6799 |
||
6800 |
ctlElements = (char *)(_InstPtr(ctlPoints)) + nInstBytes; |
|
6801 |
knotElements = (char *)(_InstPtr(knotList)) + nInstBytes; |
|
6802 |
||
6803 |
nurbscurve ( |
|
6804 |
_longVal(knotCount), (double *)knotElements, |
|
4718 | 6805 |
_longVal(offset), (double *)ctlElements, |
294 | 6806 |
_longVal(order), _longVal(type)); |
6807 |
RETURN(true); |
|
6808 |
#endif |
|
6809 |
%} |
|
6810 |
. |
|
6811 |
^ false |
|
6812 |
! |
|
6813 |
||
6814 |
glxObjdeleteTag1: tag1 tag2: tag2 in: aGLXWindowId |
|
6815 |
||
6816 |
%{ /* NOCONTEXT */ |
|
6817 |
#ifdef GLX |
|
6818 |
SETWIN(aGLXWindowId) |
|
6819 |
objdelete(_tagVal(tag1), _tagVal(tag2)); |
|
6820 |
RETURN (true); |
|
6821 |
#endif |
|
6822 |
%} |
|
6823 |
. |
|
6824 |
^ false |
|
6825 |
! |
|
6826 |
||
6827 |
glxObjinsert: t in: aGLXWindowId |
|
6828 |
||
6829 |
%{ /* NOCONTEXT */ |
|
6830 |
#ifdef GLX |
|
6831 |
SETWIN(aGLXWindowId) |
|
6832 |
objinsert(_tagVal(t)); |
|
6833 |
RETURN (true); |
|
6834 |
#endif |
|
6835 |
%} |
|
6836 |
. |
|
6837 |
^ false |
|
6838 |
! |
|
6839 |
||
6840 |
glxObjreplace: t in: aGLXWindowId |
|
6841 |
||
6842 |
%{ /* NOCONTEXT */ |
|
6843 |
#ifdef GLX |
|
6844 |
SETWIN(aGLXWindowId) |
|
6845 |
objreplace(_tagVal(t)); |
|
6846 |
RETURN (true); |
|
6847 |
#endif |
|
6848 |
%} |
|
6849 |
. |
|
6850 |
^ false |
|
6851 |
! |
|
6852 |
||
6853 |
glxOnemapIn: aGLXWindowId |
|
6854 |
||
6855 |
%{ /* NOCONTEXT */ |
|
6856 |
#ifdef GLX |
|
6857 |
SETWIN(aGLXWindowId) |
|
6858 |
onemap(); |
|
6859 |
RETURN (true); |
|
6860 |
#endif |
|
6861 |
%} |
|
6862 |
. |
|
6863 |
^ false |
|
6864 |
! |
|
6865 |
||
6866 |
glxPagecolor: pcolor in: aGLXWindowId |
|
6867 |
||
6868 |
%{ /* NOCONTEXT */ |
|
6869 |
#ifdef GLX |
|
6870 |
SETWIN(aGLXWindowId) |
|
6871 |
pagecolor(_colorindexVal(pcolor)); |
|
6872 |
RETURN (true); |
|
6873 |
#endif |
|
6874 |
%} |
|
6875 |
. |
|
6876 |
^ false |
|
6877 |
! |
|
6878 |
||
6879 |
glxPassthroughToken: token in: aGLXWindowId |
|
6880 |
||
6881 |
%{ /* NOCONTEXT */ |
|
6882 |
#ifdef GLX |
|
6883 |
SETWIN(aGLXWindowId) |
|
6884 |
passthrough(_shortVal(token)); |
|
6885 |
RETURN (true); |
|
6886 |
#endif |
|
6887 |
%} |
|
6888 |
. |
|
6889 |
^ false |
|
6890 |
! |
|
6891 |
||
6892 |
glxPclosIn: aGLXWindowId |
|
6893 |
||
6894 |
%{ /* NOCONTEXT */ |
|
6895 |
#ifdef GLX |
|
6896 |
SETWIN(aGLXWindowId) |
|
6897 |
pclos(); |
|
6898 |
RETURN (true); |
|
6899 |
#endif |
|
6900 |
%} |
|
6901 |
. |
|
6902 |
^ false |
|
6903 |
! |
|
6904 |
||
6905 |
glxPicksizeX: x y: y in: aGLXWindowId |
|
6906 |
||
6907 |
%{ /* NOCONTEXT */ |
|
6908 |
#ifdef GLX |
|
6909 |
SETWIN(aGLXWindowId) |
|
6910 |
picksize(_shortVal(x), _shortVal(y)); |
|
6911 |
RETURN (true); |
|
6912 |
#endif |
|
6913 |
%} |
|
6914 |
. |
|
6915 |
^ false |
|
6916 |
! |
|
6917 |
||
6918 |
glxPixmode: mode value: value in: aGLXWindowId |
|
6919 |
||
6920 |
%{ /* NOCONTEXT */ |
|
6921 |
#ifdef GLX |
|
6922 |
SETWIN(aGLXWindowId) |
|
6923 |
pixmode(_longVal(mode), _longVal(value)); |
|
6924 |
RETURN (true); |
|
6925 |
#endif |
|
6926 |
%} |
|
6927 |
. |
|
6928 |
^ false |
|
6929 |
! |
|
6930 |
||
6931 |
glxPntsmoothMode: mode in: aGLXWindowId |
|
6932 |
||
6933 |
%{ /* NOCONTEXT */ |
|
6934 |
#ifdef GLX |
|
6935 |
SETWIN(aGLXWindowId) |
|
6936 |
pntsmooth((ulong)__intVal(mode)); |
|
6937 |
RETURN (true); |
|
6938 |
#endif |
|
6939 |
%} |
|
6940 |
. |
|
6941 |
^ false |
|
6942 |
! |
|
6943 |
||
6944 |
glxPolysmoothMode: mode in: aGLXWindowId |
|
6945 |
||
6946 |
%{ /* NOCONTEXT */ |
|
6947 |
#ifdef GLX |
|
6948 |
SETWIN(aGLXWindowId) |
|
6949 |
polysmooth(_longVal(mode)); |
|
6950 |
RETURN (true); |
|
6951 |
#endif |
|
6952 |
%} |
|
6953 |
. |
|
6954 |
^ false |
|
6955 |
! |
|
6956 |
||
6957 |
glxPopnameIn: aGLXWindowId |
|
6958 |
||
6959 |
%{ /* NOCONTEXT */ |
|
6960 |
#ifdef GLX |
|
6961 |
SETWIN(aGLXWindowId) |
|
6962 |
popname(); |
|
6963 |
RETURN (true); |
|
6964 |
#endif |
|
6965 |
%} |
|
6966 |
. |
|
6967 |
^ false |
|
6968 |
! |
|
6969 |
||
6970 |
glxPrefpositionX1: x1 x2: x2 y1: y1 y2: y2 in: aGLXWindowId |
|
6971 |
||
6972 |
%{ /* NOCONTEXT */ |
|
6973 |
SETWIN(aGLXWindowId) |
|
1932 | 6974 |
#ifdef OPENGL |
6975 |
#else |
|
294 | 6976 |
prefposition(_longVal(x1), _longVal(x2), _longVal(y1), _longVal(y2)); |
1932 | 6977 |
#endif |
294 | 6978 |
RETURN (true); |
6979 |
%} |
|
6980 |
! |
|
6981 |
||
6982 |
glxPrefsizeX: x y: y in: aGLXWindowId |
|
6983 |
||
6984 |
%{ /* NOCONTEXT */ |
|
6985 |
SETWIN(aGLXWindowId) |
|
1932 | 6986 |
#ifdef OPENGL |
6987 |
#else |
|
294 | 6988 |
prefsize(_longVal(x), _longVal(y)); |
1932 | 6989 |
#endif |
294 | 6990 |
RETURN (true); |
6991 |
%} |
|
6992 |
! |
|
6993 |
||
6994 |
glxPupmodeIn: aGLXWindowId |
|
6995 |
||
6996 |
%{ /* NOCONTEXT */ |
|
6997 |
#ifdef GLX |
|
6998 |
SETWIN(aGLXWindowId) |
|
6999 |
pupmode(); |
|
7000 |
RETURN (true); |
|
7001 |
#endif |
|
7002 |
%} |
|
7003 |
. |
|
7004 |
^ false |
|
7005 |
! |
|
7006 |
||
7007 |
glxPushname: name In: aGLXWindowId |
|
7008 |
||
7009 |
%{ /* NOCONTEXT */ |
|
7010 |
#ifdef GLX |
|
7011 |
SETWIN(aGLXWindowId) |
|
7012 |
pushname(_shortVal(name)); |
|
7013 |
RETURN (true); |
|
7014 |
#endif |
|
7015 |
%} |
|
7016 |
. |
|
7017 |
^ false |
|
7018 |
! |
|
7019 |
||
7020 |
glxQdevice: dev in: aGLXWindowId |
|
7021 |
||
7022 |
%{ /* NOCONTEXT */ |
|
1932 | 7023 |
SETWIN(aGLXWindowId) |
7024 |
#ifdef OPENGL |
|
7025 |
#else |
|
294 | 7026 |
qdevice(_deviceVal(dev)); |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
7027 |
#endif |
294 | 7028 |
%} |
7029 |
! |
|
7030 |
||
7031 |
glxQenterDev: dev val: val in: aGLXWindowId |
|
7032 |
||
7033 |
%{ /* NOCONTEXT */ |
|
7034 |
SETWIN(aGLXWindowId) |
|
1932 | 7035 |
#ifdef OPENGL |
7036 |
#else |
|
294 | 7037 |
qenter(_deviceVal(dev), _shortVal(val)); |
1932 | 7038 |
#endif |
294 | 7039 |
%} |
7040 |
! |
|
7041 |
||
7042 |
glxQgetfdIn: aGLXWindowId |
|
7043 |
||
7044 |
%{ /* NOCONTEXT */ |
|
7045 |
#ifdef GLX |
|
7046 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
7047 |
RETURN (__MKSMALLINT(qgetfd())); |
294 | 7048 |
#endif |
7049 |
%} |
|
7050 |
. |
|
7051 |
^ false |
|
7052 |
! |
|
7053 |
||
7054 |
glxQreadIn: aGLXWindowId |
|
7055 |
||
7056 |
| dev data | |
|
4718 | 7057 |
%{ |
294 | 7058 |
short c_data; |
7059 |
||
7060 |
SETWIN(aGLXWindowId) |
|
1932 | 7061 |
#ifdef OPENGL |
7062 |
#else |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
7063 |
dev = __MKSMALLINT(qread(&c_data)); |
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
7064 |
data = __MKSMALLINT(c_data); |
1932 | 7065 |
#endif |
294 | 7066 |
%} |
7067 |
. |
|
7068 |
^ Array with: dev with: data |
|
7069 |
! |
|
7070 |
||
7071 |
glxQresetIn: aGLXWindowId |
|
7072 |
||
7073 |
%{ /* NOCONTEXT */ |
|
7074 |
SETWIN(aGLXWindowId) |
|
1932 | 7075 |
#ifdef OPENGL |
7076 |
#else |
|
294 | 7077 |
qreset(); |
1932 | 7078 |
#endif |
294 | 7079 |
RETURN (true); |
7080 |
%} |
|
7081 |
! |
|
7082 |
||
7083 |
glxQtestIn: aGLXWindowId |
|
7084 |
||
7085 |
%{ /* NOCONTEXT */ |
|
1932 | 7086 |
int rslt = 0; |
7087 |
||
7088 |
SETWIN(aGLXWindowId) |
|
7089 |
#ifdef OPENGL |
|
7090 |
#else |
|
7091 |
rslt = qtest(); |
|
7092 |
#endif |
|
7093 |
RETURN (__MKSMALLINT(rslt)); |
|
294 | 7094 |
%} |
7095 |
! |
|
7096 |
||
4718 | 7097 |
glxRGBcursorIndex: index red: red green: green blue: blue |
294 | 7098 |
redm: redm greenm: greenm bluem: bluem in: aGLXWindowId |
7099 |
||
7100 |
%{ /* NOCONTEXT */ |
|
7101 |
#ifdef GLX |
|
7102 |
SETWIN(aGLXWindowId) |
|
4718 | 7103 |
RGBcursor(_shortVal(index), |
7104 |
_shortVal(red), _shortVal(green), _shortVal(blue), |
|
294 | 7105 |
_shortVal(redm), _shortVal(greenm), _shortVal(bluem)); |
7106 |
RETURN (true); |
|
7107 |
#endif |
|
7108 |
%} |
|
7109 |
. |
|
7110 |
^ false |
|
7111 |
! |
|
7112 |
||
7113 |
glxRGBwritemaskRed: red green: green blue: blue in: aGLXWindowId |
|
7114 |
||
7115 |
%{ /* NOCONTEXT */ |
|
7116 |
#ifdef GLX |
|
7117 |
SETWIN(aGLXWindowId) |
|
7118 |
RGBwritemask(_shortVal(red), _shortVal(green), _shortVal(blue)); |
|
7119 |
RETURN (true); |
|
7120 |
#endif |
|
7121 |
%} |
|
7122 |
. |
|
7123 |
^ false |
|
7124 |
! |
|
7125 |
||
7126 |
glxRectzoomX: xfactor y: yfactor in: aGLXWindowId |
|
7127 |
||
7128 |
%{ /* NOCONTEXT */ |
|
7129 |
#ifdef GLX |
|
7130 |
SETWIN(aGLXWindowId) |
|
7131 |
rectzoom(_floatVal(xfactor), _floatVal(yfactor)); |
|
7132 |
RETURN (true); |
|
7133 |
#endif |
|
7134 |
%} |
|
7135 |
. |
|
7136 |
^ false |
|
7137 |
! |
|
7138 |
||
7139 |
glxResetls: b in: aGLXWindowId |
|
7140 |
||
7141 |
%{ /* NOCONTEXT */ |
|
7142 |
#ifdef GLX |
|
7143 |
SETWIN(aGLXWindowId) |
|
7144 |
resetls(_booleanVal(b)); |
|
7145 |
RETURN (true); |
|
7146 |
#endif |
|
7147 |
%} |
|
7148 |
. |
|
7149 |
^ false |
|
7150 |
! |
|
7151 |
||
7152 |
glxRingbellIn: aGLXWindowId |
|
7153 |
||
7154 |
%{ /* NOCONTEXT */ |
|
7155 |
#ifdef GLX |
|
7156 |
SETWIN(aGLXWindowId) |
|
7157 |
ringbell(); |
|
7158 |
RETURN (true); |
|
7159 |
#endif |
|
7160 |
%} |
|
7161 |
. |
|
7162 |
^ false |
|
7163 |
! |
|
7164 |
||
7165 |
glxSboxX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
7166 |
||
7167 |
%{ /* NOCONTEXT */ |
|
7168 |
#ifdef GLX |
|
7169 |
SETWIN(aGLXWindowId) |
|
7170 |
sbox(_coordVal(x1), _coordVal(y1), _coordVal(x2), _coordVal(y2)); |
|
7171 |
RETURN (true); |
|
7172 |
#endif |
|
7173 |
%} |
|
7174 |
. |
|
7175 |
^ false |
|
7176 |
! |
|
7177 |
||
7178 |
glxSboxfX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
7179 |
||
7180 |
%{ /* NOCONTEXT */ |
|
7181 |
#ifdef GLX |
|
7182 |
SETWIN(aGLXWindowId) |
|
7183 |
sboxf(_coordVal(x1), _coordVal(y1), _coordVal(x2), _coordVal(y2)); |
|
7184 |
RETURN (true); |
|
7185 |
#endif |
|
7186 |
%} |
|
7187 |
. |
|
7188 |
^ false |
|
7189 |
! |
|
7190 |
||
7191 |
glxSboxfiX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
7192 |
||
7193 |
%{ /* NOCONTEXT */ |
|
7194 |
#ifdef GLX |
|
7195 |
SETWIN(aGLXWindowId) |
|
7196 |
sboxfi(_icoordVal(x1), _icoordVal(y1), _icoordVal(x2), _icoordVal(y2)); |
|
7197 |
RETURN (true); |
|
7198 |
#endif |
|
7199 |
%} |
|
7200 |
. |
|
7201 |
^ false |
|
7202 |
! |
|
7203 |
||
7204 |
glxSboxfsX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
7205 |
||
7206 |
%{ /* NOCONTEXT */ |
|
7207 |
#ifdef GLX |
|
7208 |
SETWIN(aGLXWindowId) |
|
7209 |
sboxfs(_scoordVal(x1), _scoordVal(y1), _scoordVal(x2), _scoordVal(y2)); |
|
7210 |
RETURN (true); |
|
7211 |
#endif |
|
7212 |
%} |
|
7213 |
. |
|
7214 |
^ false |
|
7215 |
! |
|
7216 |
||
7217 |
glxSboxiX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
7218 |
||
7219 |
%{ /* NOCONTEXT */ |
|
7220 |
#ifdef GLX |
|
7221 |
SETWIN(aGLXWindowId) |
|
7222 |
sboxi(_icoordVal(x1), _icoordVal(y1), _icoordVal(x2), _icoordVal(y2)); |
|
7223 |
RETURN (true); |
|
7224 |
#endif |
|
7225 |
%} |
|
7226 |
. |
|
7227 |
^ false |
|
7228 |
! |
|
7229 |
||
7230 |
glxSboxsX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
7231 |
||
7232 |
%{ /* NOCONTEXT */ |
|
7233 |
#ifdef GLX |
|
7234 |
SETWIN(aGLXWindowId) |
|
7235 |
sboxs(_scoordVal(x1), _scoordVal(y1), _scoordVal(x2), _scoordVal(y2)); |
|
7236 |
RETURN (true); |
|
7237 |
#endif |
|
7238 |
%} |
|
7239 |
. |
|
7240 |
^ false |
|
7241 |
! |
|
7242 |
||
7243 |
glxSclearSval: sval in: aGLXWindowId |
|
7244 |
||
7245 |
%{ /* NOCONTEXT */ |
|
7246 |
#ifdef GLX |
|
7247 |
SETWIN(aGLXWindowId) |
|
7248 |
sclear((ulong)__intVal(sval)); |
|
7249 |
RETURN (true); |
|
7250 |
#endif |
|
7251 |
%} |
|
7252 |
. |
|
7253 |
^ false |
|
7254 |
! |
|
7255 |
||
7256 |
glxScrbox: arg in: aGLXWindowId |
|
7257 |
||
7258 |
%{ /* NOCONTEXT */ |
|
7259 |
#ifdef GLX |
|
7260 |
SETWIN(aGLXWindowId) |
|
7261 |
scrbox(_longVal(arg)); |
|
7262 |
RETURN (true); |
|
7263 |
#endif |
|
7264 |
%} |
|
7265 |
. |
|
7266 |
^ false |
|
7267 |
! |
|
7268 |
||
7269 |
glxScreenspaceIn: aGLXWindowId |
|
7270 |
||
7271 |
%{ /* NOCONTEXT */ |
|
7272 |
#ifdef GLX |
|
7273 |
SETWIN(aGLXWindowId) |
|
7274 |
screenspace(); |
|
7275 |
RETURN (true); |
|
7276 |
#endif |
|
7277 |
%} |
|
7278 |
. |
|
7279 |
^ false |
|
7280 |
! |
|
7281 |
||
7282 |
glxScrmaskLeft: left right: right bottom: bottom top: top in: aGLXWindowId |
|
7283 |
||
7284 |
%{ /* NOCONTEXT */ |
|
7285 |
#ifdef GLX |
|
7286 |
SETWIN(aGLXWindowId) |
|
4718 | 7287 |
scrmask(_screencoordVal(left), _screencoordVal(right), |
294 | 7288 |
_screencoordVal(bottom), _screencoordVal(top)); |
7289 |
RETURN (true); |
|
7290 |
#endif |
|
7291 |
%} |
|
7292 |
. |
|
7293 |
^ false |
|
7294 |
! |
|
7295 |
||
7296 |
glxScrnattach: gsnr in: aGLXWindowId |
|
7297 |
||
7298 |
%{ /* NOCONTEXT */ |
|
7299 |
#ifdef GLX |
|
7300 |
SETWIN(aGLXWindowId) |
|
7301 |
scrnattach(_longVal(gsnr)); |
|
7302 |
RETURN (true); |
|
7303 |
#endif |
|
7304 |
%} |
|
7305 |
. |
|
7306 |
^ false |
|
7307 |
! |
|
7308 |
||
7309 |
glxScrnselect: gsnr in: aGLXWindowId |
|
7310 |
||
7311 |
%{ /* NOCONTEXT */ |
|
7312 |
#ifdef GLX |
|
7313 |
SETWIN(aGLXWindowId) |
|
7314 |
scrnselect(_longVal(gsnr)); |
|
7315 |
RETURN (true); |
|
7316 |
#endif |
|
7317 |
%} |
|
7318 |
. |
|
7319 |
^ false |
|
7320 |
! |
|
7321 |
||
7322 |
glxSetcursorIndex: index color: color wtn: wtn in: aGLXWindowId |
|
7323 |
||
7324 |
%{ /* NOCONTEXT */ |
|
7325 |
#ifdef GLX |
|
7326 |
SETWIN(aGLXWindowId) |
|
7327 |
setcursor(_shortVal(index), _colorindexVal(color), _colorindexVal(wtn)); |
|
7328 |
RETURN (true); |
|
7329 |
#endif |
|
7330 |
%} |
|
7331 |
. |
|
7332 |
^ false |
|
7333 |
! |
|
7334 |
||
7335 |
glxSetdblightsMask: mask in: aGLXWindowId |
|
7336 |
||
7337 |
%{ /* NOCONTEXT */ |
|
7338 |
#ifdef GLX |
|
7339 |
SETWIN(aGLXWindowId) |
|
7340 |
setdblights((ulong)__intVal(mask)); |
|
7341 |
RETURN (true); |
|
7342 |
#endif |
|
7343 |
%} |
|
7344 |
. |
|
7345 |
^ false |
|
7346 |
! |
|
7347 |
||
2422
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
7348 |
glxSetdepthNear:znear far:zfar in: aGLXWindowId |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
7349 |
|
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
7350 |
%{ /* NOCONTEXT */ |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
7351 |
#ifdef GLX |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
7352 |
SETWIN(aGLXWindowId) |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
7353 |
setdepth(_screencoordVal(znear), _screencoordVal(zfar)); |
294 | 7354 |
RETURN (true); |
7355 |
#endif |
|
7356 |
%} |
|
7357 |
. |
|
7358 |
^ false |
|
7359 |
! |
|
7360 |
||
7361 |
glxSetmap: mapnum in: aGLXWindowId |
|
7362 |
||
7363 |
%{ /* NOCONTEXT */ |
|
7364 |
#ifdef GLX |
|
7365 |
SETWIN(aGLXWindowId) |
|
7366 |
setmap(_shortVal(mapnum)); |
|
7367 |
RETURN (true); |
|
7368 |
#endif |
|
7369 |
%} |
|
7370 |
. |
|
7371 |
^ false |
|
7372 |
! |
|
7373 |
||
7374 |
glxSetmonitor: mtype in: aGLXWindowId |
|
7375 |
||
7376 |
%{ /* NOCONTEXT */ |
|
7377 |
#ifdef GLX |
|
7378 |
SETWIN(aGLXWindowId) |
|
7379 |
setmonitor(_shortVal(mtype)); |
|
7380 |
RETURN (true); |
|
7381 |
#endif |
|
7382 |
%} |
|
7383 |
. |
|
7384 |
^ false |
|
7385 |
! |
|
7386 |
||
7387 |
glxSetnurbsproperty: property value: value in: aGLXWindowId |
|
7388 |
||
7389 |
%{ /* NOCONTEXT */ |
|
7390 |
#ifdef GLX |
|
7391 |
SETWIN(aGLXWindowId) |
|
7392 |
setnurbsproperty(_longVal(property), _floatVal(value)); |
|
7393 |
RETURN (true); |
|
7394 |
#endif |
|
7395 |
%} |
|
7396 |
. |
|
7397 |
^ false |
|
7398 |
! |
|
7399 |
||
7400 |
glxSetpattern: index in: aGLXWindowId |
|
7401 |
||
7402 |
%{ /* NOCONTEXT */ |
|
7403 |
#ifdef GLX |
|
7404 |
SETWIN(aGLXWindowId) |
|
7405 |
setpattern(_shortVal(index)); |
|
7406 |
RETURN (true); |
|
7407 |
#endif |
|
7408 |
%} |
|
7409 |
. |
|
7410 |
^ false |
|
7411 |
! |
|
7412 |
||
7413 |
glxSetpup: pup entry: entry mode: mode in: aGLXWindowId |
|
7414 |
||
7415 |
%{ /* NOCONTEXT */ |
|
7416 |
#ifdef GLX |
|
7417 |
SETWIN(aGLXWindowId) |
|
7418 |
setpup(_longVal(pup), _longVal(entry), (ulong)__intVal(mode)); |
|
7419 |
RETURN (true); |
|
7420 |
#endif |
|
7421 |
%} |
|
7422 |
. |
|
7423 |
^ false |
|
7424 |
! |
|
7425 |
||
7426 |
glxSetvaluator: v init: init vmin: vmin vmax: vmax in: aGLXWindowId |
|
7427 |
||
7428 |
%{ /* NOCONTEXT */ |
|
7429 |
#ifdef GLX |
|
7430 |
SETWIN(aGLXWindowId) |
|
7431 |
setvaluator(_deviceVal(v), _shortVal(init), _shortVal(vmin), _shortVal(vmax)); |
|
7432 |
RETURN (true); |
|
7433 |
#endif |
|
7434 |
%} |
|
7435 |
. |
|
7436 |
^ false |
|
7437 |
! |
|
7438 |
||
7439 |
glxSetvideo: reg value: value in: aGLXWindowId |
|
7440 |
||
7441 |
%{ /* NOCONTEXT */ |
|
7442 |
#ifdef GLX |
|
7443 |
SETWIN(aGLXWindowId) |
|
7444 |
setvideo(_longVal(reg), _longVal(value)); |
|
7445 |
RETURN (true); |
|
7446 |
#endif |
|
7447 |
%} |
|
7448 |
. |
|
7449 |
^ false |
|
7450 |
! |
|
7451 |
||
7452 |
glxShademodel: model in: aGLXWindowId |
|
7453 |
||
7454 |
%{ /* NOCONTEXT */ |
|
7455 |
#ifdef GLX |
|
7456 |
SETWIN(aGLXWindowId) |
|
7457 |
shademodel(_longVal(model)); |
|
7458 |
RETURN (true); |
|
7459 |
#endif |
|
7460 |
%} |
|
7461 |
. |
|
7462 |
^ false |
|
7463 |
! |
|
7464 |
||
7465 |
glxShaderangeLowin: lowin hiwin: hiwin z1: z1 z2: z2 in: aGLXWindowId |
|
7466 |
||
7467 |
%{ /* NOCONTEXT */ |
|
7468 |
#ifdef GLX |
|
7469 |
SETWIN(aGLXWindowId) |
|
4718 | 7470 |
shaderange(_colorindexVal(lowin), _colorindexVal(hiwin), |
294 | 7471 |
_screencoordVal(z1), _screencoordVal(z2)); |
7472 |
RETURN (true); |
|
7473 |
#endif |
|
7474 |
%} |
|
7475 |
. |
|
7476 |
^ false |
|
7477 |
! |
|
7478 |
||
7479 |
glxSmoothline: mode in: aGLXWindowId |
|
7480 |
||
7481 |
%{ /* NOCONTEXT */ |
|
7482 |
#ifdef GLX |
|
7483 |
SETWIN(aGLXWindowId) |
|
7484 |
smoothline(_longVal(mode)); |
|
7485 |
RETURN (true); |
|
7486 |
#endif |
|
7487 |
%} |
|
7488 |
. |
|
7489 |
^ false |
|
7490 |
! |
|
7491 |
||
4718 | 7492 |
glxStencilEnable: enable ref: ref func: func mask: mask fail: fail |
294 | 7493 |
pass: pass zpass: zpass in: aGLXWindowId |
7494 |
||
7495 |
%{ /* NOCONTEXT */ |
|
7496 |
#ifdef GLX |
|
7497 |
SETWIN(aGLXWindowId) |
|
4718 | 7498 |
stencil(_longVal(enable), (ulong)__intVal(ref), _longVal(func), |
294 | 7499 |
(ulong)__intVal(mask), _longVal(fail), _longVal(pass), _longVal(zpass)); |
7500 |
RETURN (true); |
|
7501 |
#endif |
|
7502 |
%} |
|
7503 |
. |
|
7504 |
^ false |
|
7505 |
! |
|
7506 |
||
7507 |
glxStensize: planes in: aGLXWindowId |
|
7508 |
||
7509 |
%{ /* NOCONTEXT */ |
|
7510 |
#ifdef GLX |
|
7511 |
SETWIN(aGLXWindowId) |
|
7512 |
stensize(_longVal(planes)); |
|
7513 |
RETURN (true); |
|
7514 |
#endif |
|
7515 |
%} |
|
7516 |
. |
|
7517 |
^ false |
|
7518 |
! |
|
7519 |
||
7520 |
glxStepunitX: x y: y in: aGLXWindowId |
|
7521 |
||
7522 |
%{ /* NOCONTEXT */ |
|
7523 |
#ifdef GLX |
|
7524 |
SETWIN(aGLXWindowId) |
|
7525 |
stepunit(_longVal(x), _longVal(y)); |
|
7526 |
RETURN (true); |
|
7527 |
#endif |
|
7528 |
%} |
|
7529 |
. |
|
7530 |
^ false |
|
7531 |
! |
|
7532 |
||
7533 |
glxSubpixel: b in: aGLXWindowId |
|
7534 |
||
7535 |
%{ /* NOCONTEXT */ |
|
7536 |
#ifdef GLX |
|
7537 |
SETWIN(aGLXWindowId) |
|
7538 |
subpixel(_booleanVal(b)); |
|
7539 |
RETURN (true); |
|
7540 |
#endif |
|
7541 |
%} |
|
7542 |
. |
|
7543 |
^ false |
|
7544 |
! |
|
7545 |
||
7546 |
glxSwapinterval: i in: aGLXWindowId |
|
7547 |
||
7548 |
%{ /* NOCONTEXT */ |
|
7549 |
#ifdef GLX |
|
7550 |
SETWIN(aGLXWindowId) |
|
7551 |
swapinterval(_shortVal(i)); |
|
7552 |
RETURN (true); |
|
7553 |
#endif |
|
7554 |
%} |
|
7555 |
. |
|
7556 |
^ false |
|
7557 |
! |
|
7558 |
||
7559 |
glxSwaptmeshIn: aGLXWindowId |
|
7560 |
||
7561 |
%{ /* NOCONTEXT */ |
|
7562 |
#ifdef GLX |
|
7563 |
SETWIN(aGLXWindowId) |
|
7564 |
swaptmesh(); |
|
7565 |
RETURN (true); |
|
7566 |
#endif |
|
7567 |
%} |
|
7568 |
. |
|
7569 |
^ false |
|
7570 |
! |
|
7571 |
||
7572 |
glxSwinopen: parent in: aGLXWindowId |
|
7573 |
||
7574 |
%{ /* NOCONTEXT */ |
|
7575 |
#ifdef GLX |
|
7576 |
SETWIN(aGLXWindowId) |
|
7577 |
swinopen(_longVal(parent)); |
|
7578 |
RETURN (true); |
|
7579 |
#endif |
|
7580 |
%} |
|
7581 |
. |
|
7582 |
^ false |
|
7583 |
! |
|
7584 |
||
7585 |
glxSwritemask: mask in: aGLXWindowId |
|
7586 |
||
7587 |
%{ /* NOCONTEXT */ |
|
7588 |
#ifdef GLX |
|
7589 |
SETWIN(aGLXWindowId) |
|
7590 |
swritemask((ulong)__intVal(mask)); |
|
7591 |
RETURN (true); |
|
7592 |
#endif |
|
7593 |
%} |
|
7594 |
. |
|
7595 |
^ false |
|
7596 |
! |
|
7597 |
||
7598 |
glxTextinitIn: aGLXWindowId |
|
7599 |
||
7600 |
%{ /* NOCONTEXT */ |
|
7601 |
#ifdef GLX |
|
7602 |
SETWIN(aGLXWindowId) |
|
7603 |
textinit(); |
|
7604 |
RETURN (true); |
|
7605 |
#endif |
|
7606 |
%} |
|
7607 |
. |
|
7608 |
^ false |
|
7609 |
! |
|
7610 |
||
7611 |
glxTextportLeft: left right: right bottom: bottom top: top in: aGLXWindowId |
|
7612 |
||
7613 |
%{ /* NOCONTEXT */ |
|
7614 |
#ifdef GLX |
|
7615 |
SETWIN(aGLXWindowId) |
|
4718 | 7616 |
textport(_screencoordVal(left), _screencoordVal(right), |
294 | 7617 |
_screencoordVal(bottom), _screencoordVal(top)); |
7618 |
RETURN (true); |
|
7619 |
#endif |
|
7620 |
%} |
|
7621 |
. |
|
7622 |
^ false |
|
7623 |
! |
|
7624 |
||
7625 |
glxTieB: b v1: v1 v2: v2 in: aGLXWindowId |
|
7626 |
||
7627 |
%{ /* NOCONTEXT */ |
|
7628 |
#ifdef GLX |
|
7629 |
SETWIN(aGLXWindowId) |
|
7630 |
tie(_deviceVal(b), _deviceVal(v1), _deviceVal(v2)); |
|
7631 |
RETURN (true); |
|
7632 |
#endif |
|
7633 |
%} |
|
7634 |
. |
|
7635 |
^ false |
|
7636 |
! |
|
7637 |
||
7638 |
glxTlutbind: target index: index in: aGLXWindowId |
|
7639 |
||
7640 |
%{ /* NOCONTEXT */ |
|
7641 |
#ifdef FULL_GLX |
|
7642 |
SETWIN(aGLXWindowId) |
|
7643 |
tlutbind(_longVal(target), _longVal(index)); |
|
7644 |
RETURN (true); |
|
7645 |
#endif |
|
7646 |
%} |
|
7647 |
. |
|
7648 |
^ false |
|
7649 |
! |
|
7650 |
||
7651 |
glxTpoffIn: aGLXWindowId |
|
7652 |
||
7653 |
%{ /* NOCONTEXT */ |
|
7654 |
#ifdef GLX |
|
7655 |
SETWIN(aGLXWindowId) |
|
7656 |
tpoff(); |
|
7657 |
RETURN (true); |
|
7658 |
#endif |
|
7659 |
%} |
|
7660 |
. |
|
7661 |
^ false |
|
7662 |
! |
|
7663 |
||
7664 |
glxTponIn: aGLXWindowId |
|
7665 |
||
7666 |
%{ /* NOCONTEXT */ |
|
7667 |
#ifdef GLX |
|
7668 |
SETWIN(aGLXWindowId) |
|
7669 |
tpon(); |
|
7670 |
RETURN (true); |
|
7671 |
#endif |
|
7672 |
%} |
|
7673 |
. |
|
7674 |
^ false |
|
7675 |
! |
|
7676 |
||
7677 |
glxUnqdevice: dev in: aGLXWindowId |
|
7678 |
||
7679 |
%{ /* NOCONTEXT */ |
|
1932 | 7680 |
SETWIN(aGLXWindowId) |
7681 |
#ifdef OPENGL |
|
7682 |
#else |
|
294 | 7683 |
unqdevice(_deviceVal(dev)); |
1932 | 7684 |
#endif |
7685 |
%} |
|
294 | 7686 |
! |
7687 |
||
7688 |
glxWmpack: pack in: aGLXWindowId |
|
7689 |
||
7690 |
%{ /* NOCONTEXT */ |
|
7691 |
#ifdef GLX |
|
7692 |
SETWIN(aGLXWindowId) |
|
7693 |
wmpack((ulong)__intVal(pack)); |
|
7694 |
RETURN (true); |
|
7695 |
#endif |
|
7696 |
%} |
|
7697 |
. |
|
7698 |
^ false |
|
7699 |
! |
|
7700 |
||
7701 |
glxWritemask: wtm in: aGLXWindowId |
|
7702 |
||
7703 |
%{ /* NOCONTEXT */ |
|
7704 |
#ifdef GLX |
|
7705 |
SETWIN(aGLXWindowId) |
|
7706 |
writemask(_colorindexVal(wtm)); |
|
7707 |
RETURN (true); |
|
7708 |
#endif |
|
7709 |
%} |
|
7710 |
. |
|
7711 |
^ false |
|
7712 |
! |
|
7713 |
||
7714 |
glxXfpt2X: x y: y in: aGLXWindowId |
|
7715 |
||
7716 |
%{ /* NOCONTEXT */ |
|
7717 |
#ifdef GLX |
|
7718 |
Coord c_x, c_y; |
|
7719 |
||
7720 |
_COORD_ (x, c_x) |
|
7721 |
_COORD_ (y, c_y) |
|
7722 |
SETWIN(aGLXWindowId) |
|
7723 |
xfpt2(c_x, c_y); |
|
7724 |
RETURN (true); |
|
7725 |
#endif |
|
7726 |
%} |
|
7727 |
. |
|
7728 |
^ false |
|
7729 |
! |
|
7730 |
||
7731 |
glxXfpt2iX: x y: y in: aGLXWindowId |
|
7732 |
||
7733 |
%{ /* NOCONTEXT */ |
|
7734 |
#ifdef GLX |
|
7735 |
Icoord c_x, c_y; |
|
7736 |
||
7737 |
_ICOORD_ (x, c_x) |
|
7738 |
_ICOORD_ (y, c_y) |
|
7739 |
SETWIN(aGLXWindowId) |
|
7740 |
xfpt2i(c_x, c_y); |
|
7741 |
RETURN (true); |
|
7742 |
#endif |
|
7743 |
%} |
|
7744 |
. |
|
7745 |
^ false |
|
7746 |
! |
|
7747 |
||
7748 |
glxXfpt2sX: x y: y in: aGLXWindowId |
|
7749 |
||
7750 |
%{ /* NOCONTEXT */ |
|
7751 |
#ifdef GLX |
|
7752 |
Scoord c_x, c_y; |
|
7753 |
||
7754 |
_SCOORD_ (x, c_x) |
|
7755 |
_SCOORD_ (y, c_y) |
|
7756 |
SETWIN(aGLXWindowId) |
|
7757 |
xfpt2s(c_x, c_y); |
|
7758 |
RETURN (true); |
|
7759 |
#endif |
|
7760 |
%} |
|
7761 |
. |
|
7762 |
^ false |
|
7763 |
! |
|
7764 |
||
7765 |
glxXfpt4X: x y: y z: z w: w in: aGLXWindowId |
|
7766 |
||
7767 |
%{ /* NOCONTEXT */ |
|
7768 |
#ifdef GLX |
|
7769 |
Coord c_x, c_y, c_z, c_w; |
|
7770 |
||
7771 |
_COORD_ (x, c_x) |
|
7772 |
_COORD_ (y, c_y) |
|
7773 |
_COORD_ (z, c_z) |
|
7774 |
_COORD_ (w, c_w) |
|
7775 |
SETWIN(aGLXWindowId) |
|
7776 |
xfpt4(c_x, c_y, c_z, c_w); |
|
7777 |
RETURN (true); |
|
7778 |
#endif |
|
7779 |
%} |
|
7780 |
. |
|
7781 |
^ false |
|
7782 |
! |
|
7783 |
||
7784 |
glxXfpt4iX: x y: y z: z w: w in: aGLXWindowId |
|
7785 |
||
7786 |
%{ /* NOCONTEXT */ |
|
7787 |
#ifdef GLX |
|
7788 |
Icoord c_x, c_y, c_z, c_w; |
|
7789 |
||
7790 |
_ICOORD_ (x, c_x) |
|
7791 |
_ICOORD_ (y, c_y) |
|
7792 |
_ICOORD_ (z, c_z) |
|
7793 |
_ICOORD_ (w, c_w) |
|
7794 |
SETWIN(aGLXWindowId) |
|
7795 |
xfpt4i(c_x, c_y, c_z, c_w); |
|
7796 |
RETURN (true); |
|
7797 |
#endif |
|
7798 |
%} |
|
7799 |
. |
|
7800 |
^ false |
|
7801 |
! |
|
7802 |
||
7803 |
glxXfpt4sX: x y: y z: z w: w in: aGLXWindowId |
|
7804 |
||
7805 |
%{ /* NOCONTEXT */ |
|
7806 |
#ifdef GLX |
|
7807 |
Scoord c_x, c_y, c_z, c_w; |
|
7808 |
||
7809 |
_SCOORD_ (x, c_x) |
|
7810 |
_SCOORD_ (y, c_y) |
|
7811 |
_SCOORD_ (z, c_z) |
|
7812 |
_SCOORD_ (w, c_w) |
|
7813 |
SETWIN(aGLXWindowId) |
|
7814 |
xfpt4s(c_x, c_y, c_z, c_w); |
|
7815 |
RETURN (true); |
|
7816 |
#endif |
|
7817 |
%} |
|
7818 |
. |
|
7819 |
^ false |
|
7820 |
! |
|
7821 |
||
7822 |
glxXfptX: x y: y z: z in: aGLXWindowId |
|
7823 |
||
7824 |
%{ /* NOCONTEXT */ |
|
7825 |
#ifdef GLX |
|
7826 |
Coord c_x, c_y, c_z; |
|
7827 |
||
7828 |
_COORD_ (x, c_x) |
|
7829 |
_COORD_ (y, c_y) |
|
7830 |
_COORD_ (z, c_z) |
|
7831 |
SETWIN(aGLXWindowId) |
|
7832 |
xfpt(c_x, c_y, c_z); |
|
7833 |
RETURN (true); |
|
7834 |
#endif |
|
7835 |
%} |
|
7836 |
. |
|
7837 |
^ false |
|
7838 |
! |
|
7839 |
||
7840 |
glxXfptiX: x y: y z: z in: aGLXWindowId |
|
7841 |
||
7842 |
%{ /* NOCONTEXT */ |
|
7843 |
#ifdef GLX |
|
7844 |
Icoord c_x, c_y, c_z; |
|
7845 |
||
7846 |
_ICOORD_ (x, c_x) |
|
7847 |
_ICOORD_ (y, c_y) |
|
7848 |
_ICOORD_ (z, c_z) |
|
7849 |
SETWIN(aGLXWindowId) |
|
7850 |
xfpti(c_x, c_y, c_z); |
|
7851 |
RETURN (true); |
|
7852 |
#endif |
|
7853 |
%} |
|
7854 |
. |
|
7855 |
^ false |
|
7856 |
! |
|
7857 |
||
7858 |
glxXfptsX: x y: y z: z in: aGLXWindowId |
|
7859 |
||
7860 |
%{ /* NOCONTEXT */ |
|
7861 |
#ifdef GLX |
|
7862 |
Scoord c_x, c_y, c_z; |
|
7863 |
||
7864 |
_SCOORD_ (x, c_x) |
|
7865 |
_SCOORD_ (y, c_y) |
|
7866 |
_SCOORD_ (z, c_z) |
|
7867 |
SETWIN(aGLXWindowId) |
|
7868 |
xfpts(c_x, c_y, c_z); |
|
7869 |
RETURN (true); |
|
7870 |
#endif |
|
7871 |
%} |
|
7872 |
. |
|
7873 |
^ false |
|
7874 |
! ! |
|
7875 |
||
7876 |
!GLXWorkstation methodsFor:'vertex data transfer'! |
|
7877 |
||
7878 |
glxN3f:arrayOf3Floats in:aGLXWindowId |
|
7879 |
"argument must be an array of 3 floats containing the |
|
7880 |
current vertex normal - in real GL only" |
|
7881 |
||
7882 |
%{ /* NOCONTEXT */ |
|
7883 |
#ifdef GLX |
|
7884 |
float vec[3], *v; |
|
7885 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
7886 |
if (! (v = __glx_getFloatsFromInto(arrayOf3Floats, vec, 3))) RETURN(false); |
294 | 7887 |
SETWIN(aGLXWindowId) |
7888 |
n3f(v); |
|
7889 |
RETURN (true); |
|
7890 |
#endif |
|
7891 |
%} |
|
7892 |
. |
|
7893 |
^ false |
|
7894 |
! |
|
7895 |
||
7896 |
glxV2d:v in:aGLXWindowId |
|
7897 |
"pass a vertex; v must be a vector with 2 doubles; z is taken as 0" |
|
7898 |
||
7899 |
%{ /* NOCONTEXT */ |
|
7900 |
double vec[2], *c_v; |
|
7901 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
7902 |
if (! (c_v = __glx_getDoublesFromInto(v, vec, 2))) RETURN(false); |
294 | 7903 |
SETWIN(aGLXWindowId) |
1932 | 7904 |
#ifdef OPENGL |
7905 |
#else |
|
294 | 7906 |
v2d(c_v); |
1932 | 7907 |
#endif |
294 | 7908 |
RETURN (true); |
7909 |
%} |
|
7910 |
! |
|
7911 |
||
7912 |
glxV2f:v in:aGLXWindowId |
|
7913 |
"pass a vertex; v must be a vector with 2 floats; z is taken as 0" |
|
7914 |
||
7915 |
%{ /* NOCONTEXT */ |
|
7916 |
float vec[2], *c_v; |
|
7917 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
7918 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 2))) RETURN(false); |
294 | 7919 |
SETWIN(aGLXWindowId) |
1932 | 7920 |
#ifdef OPENGL |
7921 |
#else |
|
294 | 7922 |
v2f(c_v); |
1932 | 7923 |
#endif |
294 | 7924 |
RETURN (true); |
7925 |
%} |
|
7926 |
! |
|
7927 |
||
7928 |
glxV2fX:x y:y in:aGLXWindowId |
|
7929 |
"pass a vertex from individual x and y values; z is taken as 0.0" |
|
7930 |
||
7931 |
%{ /* NOCONTEXT */ |
|
7932 |
float vec[2]; |
|
7933 |
||
7934 |
_FLOAT_(x, vec[0]) |
|
7935 |
_FLOAT_(y, vec[1]) |
|
7936 |
SETWIN(aGLXWindowId) |
|
1932 | 7937 |
#ifdef OPENGL |
7938 |
#else |
|
294 | 7939 |
v2f(vec); |
1932 | 7940 |
#endif |
294 | 7941 |
RETURN (true); |
7942 |
%} |
|
7943 |
! |
|
7944 |
||
7945 |
glxV2i:v in:aGLXWindowId |
|
7946 |
"pass a vertex; v must be a vector with 2 longs; z is taken as 0" |
|
7947 |
||
7948 |
%{ /* NOCONTEXT */ |
|
7949 |
long vec[2], *c_v; |
|
7950 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
7951 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 2))) RETURN(false); |
294 | 7952 |
SETWIN(aGLXWindowId) |
1932 | 7953 |
#ifdef OPENGL |
7954 |
#else |
|
294 | 7955 |
v2i(c_v); |
1932 | 7956 |
#endif |
294 | 7957 |
RETURN (true); |
7958 |
%} |
|
7959 |
! |
|
7960 |
||
7961 |
glxV2s:v in:aGLXWindowId |
|
7962 |
"pass a vertex; v must be a vector with 2 shorts; z is taken as 0" |
|
7963 |
||
7964 |
%{ /* NOCONTEXT */ |
|
7965 |
short vec[2], *c_v; |
|
7966 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
7967 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 2))) RETURN(false); |
294 | 7968 |
SETWIN(aGLXWindowId) |
1932 | 7969 |
#ifdef OPENGL |
7970 |
#else |
|
294 | 7971 |
v2s(c_v); |
1932 | 7972 |
#endif |
294 | 7973 |
RETURN (true); |
7974 |
%} |
|
7975 |
! |
|
7976 |
||
7977 |
glxV3d:v in:aGLXWindowId |
|
7978 |
"pass a vertex; v must be a 3-element double-vector" |
|
7979 |
||
7980 |
%{ /* NOCONTEXT */ |
|
7981 |
double vec[3], *c_v; |
|
7982 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
7983 |
if (! (c_v = __glx_getDoublesFromInto(v, vec, 3))) RETURN(false); |
294 | 7984 |
SETWIN(aGLXWindowId) |
1932 | 7985 |
#ifdef OPENGL |
7986 |
#else |
|
294 | 7987 |
v3d(c_v); |
1932 | 7988 |
#endif |
294 | 7989 |
RETURN (true); |
7990 |
%} |
|
7991 |
. |
|
7992 |
^ false |
|
7993 |
! |
|
7994 |
||
7995 |
glxV3f:v in:aGLXWindowId |
|
7996 |
"pass a vertex; v must be a 3-element float-vector" |
|
7997 |
||
7998 |
%{ /* NOCONTEXT */ |
|
7999 |
float vec[3], *c_v; |
|
8000 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8001 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 3))) RETURN(false); |
294 | 8002 |
SETWIN(aGLXWindowId) |
1932 | 8003 |
#ifdef OPENGL |
8004 |
#else |
|
294 | 8005 |
v3f(c_v); |
1932 | 8006 |
#endif |
294 | 8007 |
RETURN (true); |
8008 |
%} |
|
8009 |
! |
|
8010 |
||
8011 |
glxV3fX:x y:y z:z in: aGLXWindowId |
|
8012 |
"pass a vector from individual x, y and z (float) values" |
|
8013 |
||
8014 |
%{ /* NOCONTEXT */ |
|
8015 |
float vec[3]; |
|
8016 |
||
8017 |
_FLOAT_(x, vec[0]) |
|
8018 |
_FLOAT_(y, vec[1]) |
|
8019 |
_FLOAT_(z, vec[2]) |
|
8020 |
SETWIN(aGLXWindowId) |
|
1932 | 8021 |
#ifdef OPENGL |
8022 |
#else |
|
294 | 8023 |
v3f(vec); |
1932 | 8024 |
#endif |
294 | 8025 |
RETURN (true); |
8026 |
%} |
|
8027 |
! |
|
8028 |
||
8029 |
glxV3i:v in:aGLXWindowId |
|
8030 |
"pass a vertex; v must be a vector with 3 longs" |
|
8031 |
||
8032 |
%{ /* NOCONTEXT */ |
|
8033 |
long vec[3], *c_v; |
|
8034 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8035 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 3))) RETURN(false); |
294 | 8036 |
SETWIN(aGLXWindowId) |
1932 | 8037 |
#ifdef OPENGL |
8038 |
#else |
|
294 | 8039 |
v3i(c_v); |
1932 | 8040 |
#endif |
294 | 8041 |
RETURN (true); |
8042 |
%} |
|
8043 |
! |
|
8044 |
||
8045 |
glxV3s:v in:aGLXWindowId |
|
8046 |
"pass a vertex; v must be a vector with 3 shorts" |
|
8047 |
||
8048 |
%{ /* NOCONTEXT */ |
|
8049 |
short vec[3], *c_v; |
|
8050 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8051 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 3))) RETURN(false); |
294 | 8052 |
SETWIN(aGLXWindowId) |
1932 | 8053 |
#ifdef OPENGL |
8054 |
#else |
|
294 | 8055 |
v3s(c_v); |
1932 | 8056 |
#endif |
294 | 8057 |
RETURN (true); |
8058 |
%} |
|
8059 |
! |
|
8060 |
||
8061 |
glxV4d:v in:aGLXWindowId |
|
8062 |
"pass a vertex; v must be a 4-element double-vector, |
|
8063 |
containing x, y, z and w" |
|
8064 |
||
8065 |
%{ /* NOCONTEXT */ |
|
8066 |
double vec[4], *c_v; |
|
8067 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8068 |
if (! (c_v = __glx_getDoublesFromInto(v, vec, 4))) RETURN(false); |
294 | 8069 |
SETWIN(aGLXWindowId) |
1932 | 8070 |
#ifdef OPENGL |
8071 |
#else |
|
294 | 8072 |
v4d(c_v); |
1932 | 8073 |
#endif |
294 | 8074 |
RETURN (true); |
8075 |
%} |
|
8076 |
! |
|
8077 |
||
8078 |
glxV4f:v in:aGLXWindowId |
|
8079 |
"pass a vertex; v must be a 4-element float-vector, |
|
8080 |
containing x, y, z and w" |
|
8081 |
||
8082 |
%{ /* NOCONTEXT */ |
|
8083 |
float vec[4], *c_v; |
|
8084 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8085 |
if (! (c_v = __glx_getFloatsFromInto(v, vec, 4))) RETURN(false); |
294 | 8086 |
SETWIN(aGLXWindowId) |
1932 | 8087 |
#ifdef OPENGL |
8088 |
#else |
|
294 | 8089 |
v4f(c_v); |
1932 | 8090 |
#endif |
294 | 8091 |
RETURN (true); |
8092 |
%} |
|
8093 |
! |
|
8094 |
||
8095 |
glxV4i:v in:aGLXWindowId |
|
8096 |
"pass a vertex; v must be a 4-element int-vector, |
|
8097 |
containing x, y, z and w" |
|
8098 |
||
8099 |
%{ /* NOCONTEXT */ |
|
8100 |
long vec[4], *c_v; |
|
8101 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8102 |
if (! (c_v = __glx_getLongsFromInto(v, vec, 4))) RETURN(false); |
294 | 8103 |
SETWIN(aGLXWindowId) |
1932 | 8104 |
#ifdef OPENGL |
8105 |
#else |
|
294 | 8106 |
v4i(c_v); |
1932 | 8107 |
#endif |
294 | 8108 |
RETURN (true); |
8109 |
%} |
|
8110 |
! |
|
8111 |
||
8112 |
glxV4s:v in:aGLXWindowId |
|
8113 |
"pass a vertex; v must be a 4-element short-vector, |
|
8114 |
containing x, y, z and w" |
|
8115 |
||
8116 |
%{ /* NOCONTEXT */ |
|
8117 |
short vec[4], *c_v; |
|
8118 |
||
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8119 |
if (! (c_v = __glx_getShortsFromInto(v, vec, 4))) RETURN(false); |
294 | 8120 |
SETWIN(aGLXWindowId) |
1932 | 8121 |
#ifdef OPENGL |
8122 |
#else |
|
294 | 8123 |
v4s(c_v); |
1932 | 8124 |
#endif |
294 | 8125 |
RETURN (true); |
8126 |
%} |
|
8127 |
! |
|
8128 |
||
8129 |
glxVOriginIn:aGLXWindowId |
|
8130 |
"pass a 0.0/0.0/0.0 vector. |
|
8131 |
This is the same as v3f:#(0.0 0.0 0.0), but, since its so |
|
8132 |
common, this somewhat faster method has been provided" |
|
8133 |
||
8134 |
%{ /* NOCONTEXT */ |
|
8135 |
static float vec[3] = {0.0, 0.0, 0.0}; |
|
8136 |
||
8137 |
SETWIN(aGLXWindowId) |
|
1932 | 8138 |
#ifdef OPENGL |
8139 |
#else |
|
294 | 8140 |
v3f(vec); |
1932 | 8141 |
#endif |
294 | 8142 |
RETURN (true); |
8143 |
%} |
|
8144 |
! |
|
8145 |
||
8146 |
glxVUnitXIn:aGLXWindowId |
|
8147 |
"pass a 1.0/0.0/0.0 vector. |
|
8148 |
This is the same as v3f:#(1.0 0.0 0.0), but, since its so |
|
8149 |
common, this somewhat faster method has been provided" |
|
8150 |
||
8151 |
%{ /* NOCONTEXT */ |
|
8152 |
static float vec[3] = {1.0, 0.0, 0.0}; |
|
8153 |
||
8154 |
SETWIN(aGLXWindowId) |
|
1932 | 8155 |
#ifdef OPENGL |
8156 |
#else |
|
294 | 8157 |
v3f(vec); |
1932 | 8158 |
#endif |
294 | 8159 |
RETURN (true); |
8160 |
%} |
|
8161 |
! |
|
8162 |
||
8163 |
glxVUnitYIn:aGLXWindowId |
|
8164 |
"pass a 0.0/1.0/0.0 vector. |
|
8165 |
This is the same as v3f:#(0.0 1.0 0.0), but, since its so |
|
8166 |
common, this somewhat faster method has been provided" |
|
8167 |
||
8168 |
%{ /* NOCONTEXT */ |
|
8169 |
static float vec[3] = {0.0, 1.0, 0.0}; |
|
8170 |
||
8171 |
SETWIN(aGLXWindowId) |
|
1932 | 8172 |
#ifdef OPENGL |
8173 |
#else |
|
294 | 8174 |
v3f(vec); |
1932 | 8175 |
#endif |
294 | 8176 |
RETURN (true); |
8177 |
%} |
|
8178 |
! |
|
8179 |
||
8180 |
glxVUnitZIn:aGLXWindowId |
|
8181 |
"pass a 0.0/0.0/1.0 vector. |
|
8182 |
This is the same as v3f:#(0.0 0.0 1.0), but, since its so |
|
8183 |
common, this somewhat faster method has been provided" |
|
8184 |
||
8185 |
%{ /* NOCONTEXT */ |
|
8186 |
static float vec[3] = {0.0, 0.0, 1.0}; |
|
8187 |
||
8188 |
SETWIN(aGLXWindowId) |
|
1932 | 8189 |
#ifdef OPENGL |
8190 |
#else |
|
294 | 8191 |
v3f(vec); |
1932 | 8192 |
#endif |
294 | 8193 |
RETURN (true); |
8194 |
%} |
|
8195 |
! ! |
|
8196 |
||
8197 |
!GLXWorkstation methodsFor:'video and planes'! |
|
8198 |
||
8199 |
glxOverlayPlanes: planes in: aGLXWindowId |
|
8200 |
||
8201 |
%{ /* NOCONTEXT */ |
|
8202 |
#ifdef GLX |
|
8203 |
SETWIN(aGLXWindowId) |
|
8204 |
overlay(_longVal(planes)); |
|
8205 |
RETURN (true); |
|
8206 |
#endif |
|
8207 |
%} |
|
8208 |
. |
|
8209 |
^ false |
|
8210 |
! |
|
8211 |
||
8212 |
glxStereobufferIn: aGLXWindowId |
|
8213 |
||
8214 |
%{ /* NOCONTEXT */ |
|
8215 |
#ifdef FULL_GLX |
|
8216 |
SETWIN(aGLXWindowId) |
|
8217 |
stereobuffer(); |
|
8218 |
RETURN (true); |
|
8219 |
#endif |
|
8220 |
%} |
|
8221 |
. |
|
8222 |
^ false |
|
8223 |
! |
|
8224 |
||
8225 |
glxUnderlay: planes in: aGLXWindowId |
|
8226 |
||
8227 |
%{ /* NOCONTEXT */ |
|
8228 |
#ifdef GLX |
|
8229 |
SETWIN(aGLXWindowId) |
|
8230 |
underlay(_longVal(planes)); |
|
8231 |
RETURN (true); |
|
8232 |
#endif |
|
8233 |
%} |
|
8234 |
. |
|
8235 |
^ false |
|
8236 |
! |
|
8237 |
||
8238 |
glxVideocmd:cmd in:aGLXWindowId |
|
8239 |
||
8240 |
%{ /* NOCONTEXT */ |
|
8241 |
#ifdef GLX |
|
8242 |
SETWIN(aGLXWindowId) |
|
8243 |
videocmd(_longVal(cmd)); |
|
8244 |
RETURN (true); |
|
8245 |
#endif |
|
8246 |
%} |
|
8247 |
. |
|
8248 |
^ false |
|
8249 |
! ! |
|
8250 |
||
8251 |
!GLXWorkstation methodsFor:'viewing'! |
|
8252 |
||
8253 |
glxLookatVx:vx vy:vy vz:vz px:px py:py pz:pz twist:twist in:aGLXWindowId |
|
8254 |
"define viewing transformation" |
|
8255 |
||
8256 |
%{ /* NOCONTEXT */ |
|
8257 |
||
8258 |
Coord f_vx, f_vy, f_vz, f_px, f_py, f_pz; |
|
8259 |
Angle a_twist; |
|
8260 |
||
8261 |
_COORD_ (vx, f_vx) |
|
8262 |
_COORD_ (vy, f_vy) |
|
8263 |
_COORD_ (vz, f_vz) |
|
8264 |
_COORD_ (px, f_px) |
|
8265 |
_COORD_ (py, f_py) |
|
8266 |
_COORD_ (pz, f_pz) |
|
8267 |
_ANGLE_ (twist, a_twist) |
|
8268 |
SETWIN(aGLXWindowId) |
|
1932 | 8269 |
#ifdef OPENGL |
8270 |
#else |
|
294 | 8271 |
lookat(f_vx, f_vy, f_vz, f_px, f_py, f_pz, a_twist); |
1932 | 8272 |
#endif |
294 | 8273 |
%} |
8274 |
! |
|
8275 |
||
8276 |
glxOrtho2Left: left right: right bottom: bottom top: top in: aGLXWindowId |
|
8277 |
"define 2D orthogonal projection" |
|
8278 |
||
8279 |
%{ /* NOCONTEXT */ |
|
8280 |
float f_left, f_right, f_top, f_bottom; |
|
8281 |
||
8282 |
SETWIN(aGLXWindowId) |
|
8283 |
_FLOAT_(left, f_left) |
|
8284 |
_FLOAT_(right, f_right) |
|
8285 |
_FLOAT_(bottom, f_bottom) |
|
8286 |
_FLOAT_(top, f_top) |
|
1932 | 8287 |
#ifdef OPENGL |
8288 |
#else |
|
294 | 8289 |
ortho2(f_left, f_right, f_bottom, f_top); |
1932 | 8290 |
#endif |
8291 |
%} |
|
294 | 8292 |
! |
8293 |
||
2422
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8294 |
glxOrthoLeft: left right: right bottom: bottom top: top near: znear far: zfar in: aGLXWindowId |
294 | 8295 |
"define orthogonal projection" |
8296 |
||
8297 |
%{ /* NOCONTEXT */ |
|
8298 |
float f_left, f_right, f_bottom, f_top, |
|
8299 |
f_near, f_far; |
|
8300 |
||
8301 |
_FLOAT_(left, f_left) |
|
8302 |
_FLOAT_(right, f_right) |
|
8303 |
_FLOAT_(bottom, f_bottom) |
|
8304 |
_FLOAT_(top, f_top) |
|
2422
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8305 |
_FLOAT_(znear, f_near) |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8306 |
_FLOAT_(zfar, f_far) |
294 | 8307 |
SETWIN(aGLXWindowId) |
1932 | 8308 |
#ifdef OPENGL |
8309 |
#else |
|
294 | 8310 |
ortho(f_left, f_right, f_bottom, f_top, f_near, f_far); |
1932 | 8311 |
#endif |
294 | 8312 |
%} |
8313 |
! |
|
8314 |
||
2422
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8315 |
glxPerspectiveFovy:fovy aspect:aspect near:znear far:zfar in:aGLXWindowId |
294 | 8316 |
"define perspective projection" |
8317 |
||
8318 |
%{ /* NOCONTEXT */ |
|
8319 |
||
8320 |
Angle a_fovy; |
|
8321 |
Coord c_near, c_far; |
|
8322 |
float f_aspect; |
|
8323 |
||
8324 |
_ANGLE_ (fovy, a_fovy) |
|
8325 |
_FLOAT_ (aspect, f_aspect) |
|
2422
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8326 |
_COORD_ (znear, c_near) |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8327 |
_COORD_ (zfar, c_far) |
294 | 8328 |
|
8329 |
SETWIN(aGLXWindowId) |
|
1932 | 8330 |
#ifdef OPENGL |
8331 |
#else |
|
294 | 8332 |
perspective(a_fovy, f_aspect, c_near, c_far); |
1932 | 8333 |
#endif |
294 | 8334 |
%} |
8335 |
! |
|
8336 |
||
8337 |
glxPolarviewDist: dist azim: azim inc: inc twist: twist in: aGLXWindowId |
|
8338 |
||
8339 |
%{ /* NOCONTEXT */ |
|
8340 |
Coord c_dist; |
|
8341 |
Angle a_azim, a_inc, a_twist; |
|
8342 |
||
8343 |
_COORD_(dist, c_dist) |
|
8344 |
_ANGLE_(azim, a_azim) |
|
8345 |
_ANGLE_(inc, a_inc) |
|
8346 |
_ANGLE_(twist, a_twist) |
|
8347 |
SETWIN(aGLXWindowId) |
|
1932 | 8348 |
#ifdef OPENGL |
8349 |
#else |
|
294 | 8350 |
polarview(c_dist, a_azim, a_inc, a_twist); |
1932 | 8351 |
#endif |
294 | 8352 |
%} |
8353 |
! |
|
8354 |
||
528 | 8355 |
glxPopviewportIn: aGLXWindowId |
8356 |
"pops the top viewport off the viewport stack" |
|
8357 |
||
8358 |
%{ /* NOCONTEXT */ |
|
8359 |
SETWIN(aGLXWindowId) |
|
1932 | 8360 |
#ifdef OPENGL |
8361 |
#else |
|
528 | 8362 |
popviewport(); |
1932 | 8363 |
#endif |
528 | 8364 |
%} |
8365 |
||
8366 |
"Modified: 19.3.1996 / 18:58:24 / cg" |
|
8367 |
! |
|
8368 |
||
8369 |
glxPushviewportIn: aGLXWindowId |
|
8370 |
"pushes the current viewport on the viewport stack" |
|
8371 |
||
8372 |
%{ /* NOCONTEXT */ |
|
8373 |
SETWIN(aGLXWindowId) |
|
1932 | 8374 |
#ifdef OPENGL |
8375 |
#else |
|
528 | 8376 |
pushviewport(); |
1932 | 8377 |
#endif |
528 | 8378 |
%} |
8379 |
||
8380 |
"Modified: 19.3.1996 / 18:58:02 / cg" |
|
8381 |
! |
|
8382 |
||
294 | 8383 |
glxReshapeViewPortIn: aGLXWindowId |
8384 |
||
8385 |
%{ /* NOCONTEXT */ |
|
8386 |
SETWIN(aGLXWindowId) |
|
1932 | 8387 |
#ifdef OPENGL |
8388 |
#else |
|
294 | 8389 |
reshapeviewport(); |
1932 | 8390 |
#endif |
8391 |
%} |
|
294 | 8392 |
! |
8393 |
||
8394 |
glxViewportLeft:left right:right bottom:bottom top:top in:aGLXWindowId |
|
8395 |
||
8396 |
%{ /* NOCONTEXT */ |
|
8397 |
SETWIN(aGLXWindowId) |
|
1932 | 8398 |
#ifdef OPENGL |
8399 |
#else |
|
4718 | 8400 |
viewport(_screencoordVal(left), _screencoordVal(right), |
294 | 8401 |
_screencoordVal(bottom), _screencoordVal(top)); |
1932 | 8402 |
#endif |
294 | 8403 |
%} |
8404 |
! |
|
8405 |
||
2422
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8406 |
glxWindowLeft: left right: right bottom: bottom top: top near: znear far: zfar in: aGLXWindowId |
294 | 8407 |
"this one was added independently by JEFF - kept for his programs ..." |
8408 |
||
2422
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8409 |
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
|
8410 |
! |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8411 |
|
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8412 |
glxWindowLeft:left right:right top:top bottom:bottom near:znear far:zfar in:aGLXWindowId |
294 | 8413 |
"define perspective viewing pyramid" |
8414 |
||
8415 |
%{ /* NOCONTEXT */ |
|
8416 |
Coord c_left, c_right, c_top, c_bot, c_near, c_far; |
|
8417 |
||
8418 |
_COORD_ (left, c_left) |
|
8419 |
_COORD_ (right, c_right) |
|
8420 |
_COORD_ (top, c_top) |
|
8421 |
_COORD_ (bottom, c_bot) |
|
2422
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8422 |
_COORD_ (znear, c_near) |
6bffcb4c8360
changes for egcs (__new in stdio)
Claus Gittinger <cg@exept.de>
parents:
2075
diff
changeset
|
8423 |
_COORD_ (zfar, c_far) |
294 | 8424 |
SETWIN(aGLXWindowId) |
1932 | 8425 |
#ifdef OPENGL |
8426 |
#else |
|
294 | 8427 |
window(c_left, c_right, c_bot, c_top, c_near, c_far); |
1932 | 8428 |
#endif |
294 | 8429 |
%} |
8430 |
! ! |
|
8431 |
||
8432 |
!GLXWorkstation methodsFor:'window control'! |
|
8433 |
||
2045 | 8434 |
glxResizedView:aGLXWindowId width:width height:height |
2048 | 8435 |
"pass down resize info to the GL - this adjusts the viewport. |
8436 |
This only works with VGL or openGL" |
|
8437 |
||
8438 |
%{ /* NOCONTEXT */ |
|
2074 | 8439 |
SETWIN(aGLXWindowId) |
8440 |
#ifdef VGL |
|
2045 | 8441 |
X11_resized(__intVal(width), __intVal(height)); |
8442 |
RETURN (true); |
|
8443 |
#endif |
|
8444 |
%} |
|
8445 |
. |
|
8446 |
^ false |
|
8447 |
! |
|
8448 |
||
294 | 8449 |
glxWinclose:gwid in:aGLXWindowId |
8450 |
||
8451 |
%{ /* NOCONTEXT */ |
|
8452 |
#ifdef GLX |
|
8453 |
SETWIN(aGLXWindowId) |
|
8454 |
winclose(_longVal(gwid)); |
|
8455 |
RETURN (true); |
|
8456 |
#endif |
|
8457 |
%} |
|
8458 |
. |
|
8459 |
^ false |
|
8460 |
! |
|
8461 |
||
8462 |
glxWinconstraintsIn: aGLXWindowId |
|
8463 |
||
8464 |
%{ /* NOCONTEXT */ |
|
8465 |
#ifdef GLX |
|
8466 |
SETWIN(aGLXWindowId) |
|
8467 |
winconstraints(); |
|
8468 |
RETURN (true); |
|
8469 |
#endif |
|
8470 |
%} |
|
8471 |
. |
|
8472 |
^ false |
|
8473 |
! |
|
8474 |
||
8475 |
glxWindepth: gwid in: aGLXWindowId |
|
8476 |
||
8477 |
%{ /* NOCONTEXT */ |
|
8478 |
#ifdef GLX |
|
8479 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
8480 |
RETURN (__MKSMALLINT(windepth(_longVal(gwid)))); |
294 | 8481 |
#endif |
8482 |
%} |
|
8483 |
. |
|
8484 |
^ false |
|
8485 |
! |
|
8486 |
||
8487 |
glxWingetIn: aGLXWindowId |
|
8488 |
||
8489 |
%{ /* NOCONTEXT */ |
|
8490 |
#ifdef GLX |
|
8491 |
SETWIN(aGLXWindowId) |
|
315
2abc494f0c45
_-macros replaced by __-macros
Claus Gittinger <cg@exept.de>
parents:
294
diff
changeset
|
8492 |
RETURN (__MKSMALLINT(winget())); |
294 | 8493 |
#endif |
8494 |
%} |
|
8495 |
. |
|
8496 |
^ false |
|
8497 |
! |
|
8498 |
||
8499 |
glxWinmoveX: x y: y in: aGLXWindowId |
|
8500 |
||
8501 |
%{ /* NOCONTEXT */ |
|
8502 |
#ifdef GLX |
|
8503 |
SETWIN(aGLXWindowId) |
|
8504 |
winmove(_longVal(x), _longVal(y)); |
|
8505 |
RETURN (true); |
|
8506 |
#endif |
|
8507 |
%} |
|
8508 |
. |
|
8509 |
^ false |
|
8510 |
! |
|
8511 |
||
8512 |
glxWinpopIn: aGLXWindowId |
|
8513 |
||
8514 |
%{ /* NOCONTEXT */ |
|
8515 |
#ifdef GLX |
|
8516 |
SETWIN(aGLXWindowId) |
|
8517 |
winpop(); |
|
8518 |
RETURN (true); |
|
8519 |
#endif |
|
8520 |
%} |
|
8521 |
. |
|
8522 |
^ false |
|
8523 |
! |
|
8524 |
||
8525 |
glxWinpositionX1: x1 y1: y1 x2: x2 y2: y2 in: aGLXWindowId |
|
8526 |
||
8527 |
%{ /* NOCONTEXT */ |
|
8528 |
#ifdef GLX |
|
8529 |
SETWIN(aGLXWindowId) |
|
8530 |
winposition(_longVal(x1), _longVal(y1), _longVal(x2), _longVal(y2)); |
|
8531 |
RETURN (true); |
|
8532 |
#endif |
|
8533 |
%} |
|
8534 |
. |
|
8535 |
^ false |
|
8536 |
! |
|
8537 |
||
8538 |
glxWinpushIn: aGLXWindowId |
|
8539 |
||
8540 |
%{ /* NOCONTEXT */ |
|
8541 |
#ifdef GLX |
|
8542 |
SETWIN(aGLXWindowId) |
|
8543 |
winpush(); |
|
8544 |
RETURN (true); |
|
8545 |
#endif |
|
8546 |
%} |
|
8547 |
. |
|
8548 |
^ false |
|
8549 |
! |
|
8550 |
||
8551 |
glxWinset: gwid in: aGLXWindowId |
|
8552 |
||
8553 |
%{ /* NOCONTEXT */ |
|
8554 |
#ifdef GLX |
|
8555 |
SETWIN(aGLXWindowId) |
|
8556 |
winset(_longVal(gwid)); |
|
8557 |
RETURN (true); |
|
8558 |
#endif |
|
8559 |
%} |
|
8560 |
. |
|
8561 |
^ false |
|
8562 |
! ! |
|
8563 |
||
0 | 8564 |
!GLXWorkstation methodsFor:'window creation'! |
8565 |
||
12 | 8566 |
createGLXWindowFor:aView left:xpos top:ypos width:wwidth height:wheight type:glxType |
157 | 8567 |
|ext wsuperView wsuperViewId windowId| |
0 | 8568 |
|
212
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
8569 |
glOK ifFalse:[^ nil]. |
fc4c2afefff1
on IRIX5: no remote GL (to avoid exit in gl)
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
8570 |
|
793 | 8571 |
wsuperView := aView superView view. |
0 | 8572 |
wsuperView notNil ifTrue:[ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8573 |
wsuperViewId := wsuperView id |
0 | 8574 |
]. |
8575 |
||
524 | 8576 |
%{ /* CALLSSTACK: 20000 */ |
0 | 8577 |
Display *dpy = myDpy; |
185 | 8578 |
int screen = __intVal(_INST(screen)); |
0 | 8579 |
Window newWindow, parentWindow; |
12 | 8580 |
int t; |
0 | 8581 |
|
97 | 8582 |
if (__isSmallInteger(xpos) && __isSmallInteger(ypos) |
8583 |
&& __isSmallInteger(wwidth) && __isSmallInteger(wheight)) { |
|
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8584 |
if (__isExternalAddress(wsuperViewId)) { |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8585 |
parentWindow = _WindowVal(wsuperViewId); |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8586 |
} else { |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8587 |
parentWindow = RootWindow(dpy, screen); |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8588 |
} |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8589 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8590 |
if (glxType == @symbol(colorIndexSingleBuffer)) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8591 |
t = GLXcolorIndexSingleBuffer; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8592 |
else if (glxType == @symbol(colorIndexDoubleBuffer)) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8593 |
t = GLXcolorIndexDoubleBuffer; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8594 |
else if (glxType == @symbol(rgbSingleBuffer)) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8595 |
t = GLXrgbSingleBuffer; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8596 |
else if (glxType == @symbol(rgbDoubleBuffer)) |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8597 |
t = GLXrgbDoubleBuffer; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8598 |
else { |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8599 |
RETURN ( nil ); |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8600 |
} |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8601 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8602 |
ENTERGLX; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8603 |
newWindow = __GLXCreateWindow(dpy, parentWindow, |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8604 |
__intVal(xpos), __intVal(ypos), |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8605 |
__intVal(wwidth), __intVal(wheight), |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8606 |
0, t); |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8607 |
LEAVEGLX; |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8608 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8609 |
if (! newWindow) { |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8610 |
RETURN ( nil ); |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8611 |
} |
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8612 |
|
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8613 |
windowId = __MKOBJ(newWindow); |
0 | 8614 |
} |
206
4284b80bebdf
changed to use ExternalAddress handles for all Window, Font,
Claus Gittinger <cg@exept.de>
parents:
190
diff
changeset
|
8615 |
%}. |
0 | 8616 |
windowId notNil ifTrue:[ |
962
9c2a114a2bc5
simply suppress those BadWindow-destroy messages (sigh)
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
8617 |
self addKnownView:aView withId:windowId. |
0 | 8618 |
]. |
8619 |
^ windowId |
|
20 | 8620 |
! |
8621 |
||
8622 |
unlinkGLXView:aGLXWindowId |
|
8623 |
"remove X/GLX link" |
|
524 | 8624 |
|
8625 |
%{ /* CALLSSTACK: 20000 */ |
|
206
4284b80bebdf
changed to use ExternalAddress handles for all Window, Font,
Claus Gittinger <cg@exept.de>
parents:
190
diff
changeset
|
8626 |
if (__isExternalAddress(aGLXWindowId)) { |
134 | 8627 |
ENTERGLX; |
553
616145ac342d
first steps towards openGL support
Claus Gittinger <cg@exept.de>
parents:
543
diff
changeset
|
8628 |
__GLXUnlinkWindow(myDpy, _WindowVal(aGLXWindowId)); |
134 | 8629 |
LEAVEGLX; |
8630 |
} |
|
20 | 8631 |
%} |
0 | 8632 |
! ! |
8633 |
||
294 | 8634 |
!GLXWorkstation methodsFor:'zbuffer'! |
8635 |
||
8636 |
glxZbsize: planes in: aGLXWindowId |
|
127 | 8637 |
|
8638 |
%{ /* NOCONTEXT */ |
|
8639 |
#ifdef FULL_GLX |
|
8640 |
SETWIN(aGLXWindowId) |
|
294 | 8641 |
zbsize(_longVal(planes)); |
8642 |
RETURN (true); |
|
8643 |
#endif |
|
8644 |
%} |
|
8645 |
. |
|
8646 |
^ false |
|
8647 |
! |
|
64 | 8648 |
|
8649 |
glxZbuffer:aBoolean in:aGLXWindowId |
|
8650 |
"enable/disable z-buffer operation" |
|
8651 |
||
8652 |
%{ /* NOCONTEXT */ |
|
8653 |
#ifdef GLX |
|
8654 |
SETWIN(aGLXWindowId) |
|
8655 |
zbuffer(aBoolean == false ? FALSE : TRUE); |
|
8656 |
RETURN (true); |
|
8657 |
#endif |
|
8658 |
%} |
|
8659 |
. |
|
8660 |
^ false |
|
294 | 8661 |
! |
64 | 8662 |
|
8663 |
glxZdraw: b in: aGLXWindowId |
|
8664 |
"enable/disable drawing into the z-buffer" |
|
8665 |
||
8666 |
%{ /* NOCONTEXT */ |
|
8667 |
#ifdef GLX |
|
8668 |
SETWIN(aGLXWindowId) |
|
8669 |
zdraw(_booleanVal(b)); |
|
8670 |
RETURN (true); |
|
8671 |
#endif |
|
8672 |
%} |
|
8673 |
. |
|
8674 |
^ false |
|
294 | 8675 |
! |
64 | 8676 |
|
8677 |
glxZfunction: func in: aGLXWindowId |
|
8678 |
"set the z-buffer comparison function. |
|
8679 |
func may be either the numeric value or a symbol (preferred)" |
|
8680 |
||
8681 |
%{ /* NOCONTEXT */ |
|
8682 |
#ifdef GLX |
|
8683 |
long f; |
|
8684 |
||
8685 |
SETWIN(aGLXWindowId) |
|
8686 |
if (func == @symbol(NEVER)) |
|
77 | 8687 |
f = ZF_NEVER; |
64 | 8688 |
else if (func == @symbol(LESS)) |
77 | 8689 |
f = ZF_LESS; |
64 | 8690 |
else if (func == @symbol(EQUAL)) |
77 | 8691 |
f = ZF_EQUAL; |
64 | 8692 |
else if (func == @symbol(LEQUAL)) |
77 | 8693 |
f = ZF_LEQUAL; |
64 | 8694 |
else if (func == @symbol(GREATER)) |
77 | 8695 |
f = ZF_GREATER; |
64 | 8696 |
else if (func == @symbol(NOTEQUAL)) |
77 | 8697 |
f = ZF_NOTEQUAL; |
64 | 8698 |
else if (func == @symbol(GEQUAL)) |
77 | 8699 |
f = ZF_GEQUAL; |
64 | 8700 |
else if (func == @symbol(ALWAYS)) |
77 | 8701 |
f = ZF_ALWAYS; |
64 | 8702 |
else |
77 | 8703 |
f = _longVal(func); |
64 | 8704 |
zfunction(f); |
8705 |
RETURN (true); |
|
8706 |
#endif |
|
8707 |
%} |
|
8708 |
. |
|
8709 |
^ false |
|
294 | 8710 |
! |
64 | 8711 |
|
8712 |
glxZsource: src in: aGLXWindowId |
|
8713 |
||
8714 |
%{ /* NOCONTEXT */ |
|
8715 |
#ifdef GLX |
|
8716 |
SETWIN(aGLXWindowId) |
|
8717 |
zsource(_longVal(src)); |
|
8718 |
RETURN (true); |
|
8719 |
#endif |
|
8720 |
%} |
|
8721 |
. |
|
8722 |
^ false |
|
294 | 8723 |
! |
64 | 8724 |
|
8725 |
glxZwritemask: mask in: aGLXWindowId |
|
8726 |
||
8727 |
%{ /* NOCONTEXT */ |
|
8728 |
#ifdef GLX |
|
8729 |
SETWIN(aGLXWindowId) |
|
185 | 8730 |
zwritemask((ulong)__intVal(mask)); |
64 | 8731 |
RETURN (true); |
8732 |
#endif |
|
8733 |
%} |
|
8734 |
. |
|
8735 |
^ false |
|
8736 |
! ! |
|
8737 |
||
294 | 8738 |
!GLXWorkstation class methodsFor:'documentation'! |
8739 |
||
8740 |
version |
|
6978 | 8741 |
^ '$Header$' |
5479
ae6b3ac21920
__isByteArray() to __isByteArrayLike() in primitive code
Stefan Vogel <sv@exept.de>
parents:
4718
diff
changeset
|
8742 |
! |
ae6b3ac21920
__isByteArray() to __isByteArrayLike() in primitive code
Stefan Vogel <sv@exept.de>
parents:
4718
diff
changeset
|
8743 |
|
ae6b3ac21920
__isByteArray() to __isByteArrayLike() in primitive code
Stefan Vogel <sv@exept.de>
parents:
4718
diff
changeset
|
8744 |
version_CVS |
6978 | 8745 |
^ '$Header$' |
89 | 8746 |
! ! |
7656 | 8747 |