source: project/release/3/glut/glut.html @ 7700

Last change on this file since 7700 was 6960, checked in by felix winkelmann, 13 years ago

various fixes of the use of _callback [reported by Salmonella]

File size: 11.4 KB
Line 
1<html>
2<head><title>Eggs Unlimited - glut</title></head>
3<body>
4
5<center><img src="egg.jpg"></center>
6<center><a href="index.html">back</a></center>
7
8<h2>glut</h2>
9
10<h3>Description:</h3>
11Bindings for the GLUT API.
12
13<h3>Author:</h3>
14<a href="mailto:felix@call-with-current-continuation.org">felix</a>
15
16<h3>Version:</h3>
17<ul>
18<li>1.14
19Removed use of <tt>___callback</tt>
20<li>1.13
21Initial version that is separate from the <a href="opengl.html">opengl</a> egg
22</ul>
23
24<h3>Usage:</h3>
25<pre>
26(require-extension glut)
27</pre>
28
29<h3>Download:</h3>
30<a href="glut.egg">glut.egg</a>
31
32<h3>Documentation:</h3>
33
34<!-- glut -->
35<dl>
36<dt><b><pre>
37[value] glut:RGB
38[value] glut:RGBA
39[value] glut:INDEX
40[value] glut:SINGLE
41[value] glut:DOUBLE
42[value] glut:ACCUM
43[value] glut:ALPHA
44[value] glut:DEPTH
45[value] glut:STENCIL
46[value] glut:MULTISAMPLE
47[value] glut:STEREO
48[value] glut:LUMINANCE
49[value] glut:LEFT_BUTTON
50[value] glut:MIDDLE_BUTTON
51[value] glut:RIGHT_BUTTON
52[value] glut:DOWN
53[value] glut:UP
54[value] glut:KEY_F1
55[value] glut:KEY_F2
56[value] glut:KEY_F3
57[value] glut:KEY_F4
58[value] glut:KEY_F5
59[value] glut:KEY_F6
60[value] glut:KEY_F7
61[value] glut:KEY_F8
62[value] glut:KEY_F9
63[value] glut:KEY_F10
64[value] glut:KEY_F11
65[value] glut:KEY_F12
66[value] glut:KEY_LEFT
67[value] glut:KEY_UP
68[value] glut:KEY_RIGHT
69[value] glut:KEY_DOWN
70[value] glut:KEY_PAGE_UP
71[value] glut:KEY_PAGE_DOWN
72[value] glut:KEY_HOME
73[value] glut:KEY_END
74[value] glut:KEY_INSERT
75[value] glut:LEFT
76[value] glut:ENTERED
77[value] glut:MENU_NOT_IN_USE
78[value] glut:MENU_IN_USE
79[value] glut:NOT_VISIBLE
80[value] glut:VISIBLE
81[value] glut:HIDDEN
82[value] glut:FULLY_RETAINED
83[value] glut:PARTIALLY_RETAINED
84[value] glut:FULLY_COVERED
85[value] glut:RED
86[value] glut:GREEN
87[value] glut:BLUE
88[value] glut:NORMAL
89[value] glut:OVERLAY
90[value] glut:WINDOW_X
91[value] glut:WINDOW_Y
92[value] glut:WINDOW_WIDTH
93[value] glut:WINDOW_HEIGHT
94[value] glut:WINDOW_BUFFER_SIZE
95[value] glut:WINDOW_STENCIL_SIZE
96[value] glut:WINDOW_DEPTH_SIZE
97[value] glut:WINDOW_RED_SIZE
98[value] glut:WINDOW_GREEN_SIZE
99[value] glut:WINDOW_BLUE_SIZE
100[value] glut:WINDOW_ALPHA_SIZE
101[value] glut:WINDOW_ACCUM_RED_SIZE
102[value] glut:WINDOW_ACCUM_GREEN_SIZE
103[value] glut:WINDOW_ACCUM_BLUE_SIZE
104[value] glut:WINDOW_ACCUM_ALPHA_SIZE
105[value] glut:WINDOW_DOUBLEBUFFER
106[value] glut:WINDOW_RGBA
107[value] glut:WINDOW_PARENT
108[value] glut:WINDOW_NUM_CHILDREN
109[value] glut:WINDOW_COLORMAP_SIZE
110[value] glut:WINDOW_NUM_SAMPLES
111[value] glut:WINDOW_STEREO
112[value] glut:WINDOW_CURSOR
113[value] glut:SCREEN_WIDTH
114[value] glut:SCREEN_HEIGHT
115[value] glut:SCREEN_WIDTH_MM
116[value] glut:SCREEN_HEIGHT_MM
117[value] glut:MENU_NUM_ITEMS
118[value] glut:DISPLAY_MODE_POSSIBLE
119[value] glut:INIT_WINDOW_X
120[value] glut:INIT_WINDOW_Y
121[value] glut:INIT_WINDOW_WIDTH
122[value] glut:INIT_WINDOW_HEIGHT
123[value] glut:INIT_DISPLAY_MODE
124[value] glut:ELAPSED_TIME
125[value] glut:WINDOW_FORMAT_ID
126[value] glut:HAS_KEYBOARD
127[value] glut:HAS_MOUSE
128[value] glut:HAS_SPACEBALL
129[value] glut:HAS_DIAL_AND_BUTTON_BOX
130[value] glut:HAS_TABLET
131[value] glut:NUM_MOUSE_BUTTONS
132[value] glut:NUM_SPACEBALL_BUTTONS
133[value] glut:NUM_BUTTON_BOX_BUTTONS
134[value] glut:NUM_DIALS
135[value] glut:NUM_TABLET_BUTTONS
136[value] glut:DEVICE_IGNORE_KEY_REPEAT
137[value] glut:DEVICE_KEY_REPEAT
138[value] glut:HAS_JOYSTICK
139[value] glut:OWNS_JOYSTICK
140[value] glut:JOYSTICK_BUTTONS
141[value] glut:JOYSTICK_AXES
142[value] glut:JOYSTICK_POLL_RATE
143[value] glut:OVERLAY_POSSIBLE
144[value] glut:LAYER_IN_USE
145[value] glut:HAS_OVERLAY
146[value] glut:TRANSPARENT_INDEX
147[value] glut:NORMAL_DAMAGED
148[value] glut:OVERLAY_DAMAGED
149[value] glut:VIDEO_RESIZE_POSSIBLE
150[value] glut:VIDEO_RESIZE_IN_USE
151[value] glut:VIDEO_RESIZE_X_DELTA
152[value] glut:VIDEO_RESIZE_Y_DELTA
153[value] glut:VIDEO_RESIZE_WIDTH_DELTA
154[value] glut:VIDEO_RESIZE_HEIGHT_DELTA
155[value] glut:VIDEO_RESIZE_X
156[value] glut:VIDEO_RESIZE_Y
157[value] glut:VIDEO_RESIZE_WIDTH
158[value] glut:VIDEO_RESIZE_HEIGHT
159[value] glut:NORMAL
160[value] glut:OVERLAY
161[value] glut:ACTIVE_SHIFT
162[value] glut:ACTIVE_CTRL
163[value] glut:ACTIVE_ALT
164[value] glut:CURSOR_RIGHT_ARROW
165[value] glut:CURSOR_LEFT_ARROW
166[value] glut:CURSOR_INFO
167[value] glut:CURSOR_DESTROY
168[value] glut:CURSOR_HELP
169[value] glut:CURSOR_CYCLE
170[value] glut:CURSOR_SPRAY
171[value] glut:CURSOR_WAIT
172[value] glut:CURSOR_TEXT
173[value] glut:CURSOR_CROSSHAIR
174[value] glut:CURSOR_UP_DOWN
175[value] glut:CURSOR_LEFT_RIGHT
176[value] glut:CURSOR_TOP_SIDE
177[value] glut:CURSOR_BOTTOM_SIDE
178[value] glut:CURSOR_LEFT_SIDE
179[value] glut:CURSOR_RIGHT_SIDE
180[value] glut:CURSOR_TOP_LEFT_CORNER
181[value] glut:CURSOR_TOP_RIGHT_CORNER
182[value] glut:CURSOR_BOTTOM_RIGHT_CORNER
183[value] glut:CURSOR_BOTTOM_LEFT_CORNER
184[value] glut:CURSOR_INHERIT
185[value] glut:CURSOR_NONE
186[value] glut:CURSOR_FULL_CROSSHAIR
187[value] glut:STROKE_ROMAN
188[value] glut:STROKE_MONO_ROMAN
189[value] glut:BITMAP_9_BY_15
190[value] glut:BITMAP_8_BY_13
191[value] glut:BITMAP_TIMES_ROMAN_10
192[value] glut:BITMAP_TIMES_ROMAN_24
193[value] glut:BITMAP_HELVETICA_10
194[value] glut:BITMAP_HELVETICA_12
195[value] glut:BITMAP_HELVETICA_18
196[value] glut:KEY_REPEAT_OFF
197[value] glut:KEY_REPEAT_ON
198[value] glut:KEY_REPEAT_DEFAULT
199[value] glut:JOYSTICK_BUTTON_A
200[value] glut:JOYSTICK_BUTTON_B
201[value] glut:JOYSTICK_BUTTON_C
202[value] glut:JOYSTICK_BUTTON_D
203[value] glut:GAME_MODE_ACTIVE
204[value] glut:GAME_MODE_POSSIBLE
205[value] glut:GAME_MODE_WIDTH
206[value] glut:GAME_MODE_HEIGHT
207[value] glut:GAME_MODE_PIXEL_DEPTH
208[value] glut:GAME_MODE_REFRESH_RATE
209[value] glut:GAME_MODE_DISPLAY_CHANGED
210[procedure] (glut:InitDisplayMode UNSIGNED-INTEGER)
211[procedure] (glut:InitDisplayString STRING)
212[procedure] (glut:InitWindowPosition INTEGER INTEGER)
213[procedure] (glut:InitWindowSize INTEGER INTEGER)
214[procedure] (glut:MainLoop)
215[procedure] (glut:CreateWindow C-STRING) -> INTEGER
216[procedure] (glut:CreateSubWindow INTEGER INTEGER INTEGER INTEGER INTEGER) -> INTEGER
217[procedure] (glut:DestroyWindow INTEGER)
218[procedure] (glut:PostRedisplay)
219[procedure] (glut:PostWindowRedisplay INTEGER)
220[procedure] (glut:PostWindowOverlayRedisplay INTEGER)
221[procedure] (glut:SwapBuffers)
222[procedure] (glut:GetWindow) -> INTEGER
223[procedure] (glut:SetWindow INTEGER)
224[procedure] (glut:SetWindowTitle C-STRING)
225[procedure] (glut:SetIconTitle C-STRING)
226[procedure] (glut:PositionWindow INTEGER INTEGER)
227[procedure] (glut:ReshapeWindow INTEGER INTEGER)
228[procedure] (glut:PopWindow)
229[procedure] (glut:PushWindow)
230[procedure] (glut:IconifyWindow)
231[procedure] (glut:ShowWindow)
232[procedure] (glut:HideWindow)
233[procedure] (glut:CreateMenu PROCEDURE) -> INTEGER
234[procedure] (glut:DestroyMenu INTEGER)
235[procedure] (glut:GetMenu) -> INTEGER
236[procedure] (glut:SetMenu INTEGER)
237[procedure] (glut:AddMenuEntry C-STRING INTEGER)
238[procedure] (glut:AddSubMenu C-STRING INTEGER)
239[procedure] (glut:ChangeToMenuEntry INTEGER C-STRING INTEGER)
240[procedure] (glut:ChangeToSubMenu INTEGER C-STRING INTEGER)
241[procedure] (glut:RemoveMenuItem INTEGER)
242[procedure] (glut:AttachMenu INTEGER)
243[procedure] (glut:DetachMenu INTEGER)
244[procedure] (glut:DisplayFunc PROCEDURE)
245[procedure] (glut:ReshapeFunc PROCEDURE)
246[procedure] (glut:KeyboardFunc PROCEDURE)
247[procedure] (glut:MouseFunc PROCEDURE)
248[procedure] (glut:MotionFunc PROCEDURE)
249[procedure] (glut:PassiveMotionFunc PROCEDURE)
250[procedure] (glut:EntryFunc PROCEDURE)
251[procedure] (glut:VisibilityFunc PROCEDURE)
252[procedure] (glut:IdleFunc PROCEDURE)
253[procedure] (glut:TimerFunc UNSIGNED-INTEGER PROCEDURE INTEGER)
254[procedure] (glut:MenuStateFunc PROCEDURE)
255[procedure] (glut:WindowStatusFunc PROCEDURE)
256[procedure] (glut:KeyboardUpFunc PROCEDURE)
257[procedure] (glut:SpecialUpFunc PROCEDURE)
258[procedure] (glut:JoystickFunc PROCEDURE)
259[procedure] (glut:SetColor INTEGER FLOAT FLOAT FLOAT)
260[procedure] (glut:GetColor INTEGER INTEGER) -> FLOAT
261[procedure] (glut:CopyColormap INTEGER)
262[procedure] (glut:Get INTEGER) -> INTEGER
263[procedure] (glut:DeviceGet INTEGER) -> INTEGER
264[procedure] (glut:BitmapCharacter (POINTER VOID) CHAR)
265[procedure] (glut:BitmapWidth (POINTER VOID) CHAR) -> INTEGER
266[procedure] (glut:StrokeCharacter (POINTER VOID) CHAR)
267[procedure] (glut:StrokeWidth (POINTER VOID) CHAR) -> INTEGER
268[procedure] (glut:WireSphere DOUBLE INTEGER INTEGER)
269[procedure] (glut:SolidSphere DOUBLE INTEGER INTEGER)
270[procedure] (glut:WireCone DOUBLE DOUBLE INTEGER INTEGER)
271[procedure] (glut:SolidCone DOUBLE DOUBLE INTEGER INTEGER)
272[procedure] (glut:WireCube DOUBLE)
273[procedure] (glut:SolidCube DOUBLE)
274[procedure] (glut:WireTorus DOUBLE DOUBLE INTEGER INTEGER)
275[procedure] (glut:SolidTorus DOUBLE DOUBLE INTEGER INTEGER)
276[procedure] (glut:WireDodecahedron)
277[procedure] (glut:SolidDodecahedron)
278[procedure] (glut:WireTeapot DOUBLE)
279[procedure] (glut:SolidTeapot DOUBLE)
280[procedure] (glut:WireOctahedron)
281[procedure] (glut:SolidOctahedron)
282[procedure] (glut:WireTetrahedron)
283[procedure] (glut:SolidTetrahedron)
284[procedure] (glut:WireIcosahedron)
285[procedure] (glut:SolidIcosahedron)
286[procedure] (glut:WarpPointer INTEGER INTEGER)
287[procedure] (glut:VideoResizeGet INTEGER)
288[procedure] (glut:SetupVideoResizing)
289[procedure] (glut:StopVideoResizing)
290[procedure] (glut:VideoResize INTEGER INTEGER INTEGER INTEGER)
291[procedure] (glut:VideoPan INTEGER INTEGER INTEGER INTEGER)
292[procedure] (glut:ReportErrors)
293[procedure] (glut:IgnoreKeyRepeat BOOLEAN)
294[procedure] (glut:SetKeyRepeat INTEGER)
295[procedure] (glut:ForceJoystickFunc)
296[procedure] (glut:GameModeString STRING)
297[procedure] (glut:EnterGameMode)
298[procedure] (glut:LeaveGameMode)
299[procedure] (glut:GameModeGet INTEGER)
300</b></pre>
301<dd>
302Constants and procedures for the OpenGL GLUT API. Note that <code>glutInit</code> will be called automatically
303after the <code>(opengl glut)</code> extension is loaded.
304
305</dl>
306
307
308<p><h3>Examples:</h3>
309
310A most trivial example: a white rectangle
311
312<pre>
313(require-extension gl glut)
314
315(glut:CreateWindow "simple")
316
317(glut:DisplayFunc
318 (lambda ()
319   (gl:Clear gl:COLOR_BUFFER_BIT)
320   (gl:Begin gl:POLYGON)
321   (gl:Vertex2f -0.5 -0.5)
322   (gl:Vertex2f -0.5 0.5)
323   (gl:Vertex2f 0.5 0.5)
324   (gl:Vertex2f 0.5 -0.5)
325   (gl:End)
326   (gl:Flush) ) )
327
328(gl:ClearColor 0 0 0 1)
329(glut:MainLoop)
330</pre>
331
332<p>The well-known "gears" example can be found here: <a href="gears.scm">gears.scm</a>.
333</pre> 
334
335<h3>License:</h3>
336<pre>
337Copyright (c) 2004-2006, Felix L. Winkelmann
338All rights reserved.
339
340Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
341conditions are met:
342
343  Redistributions of source code must retain the above copyright notice, this list of conditions and the following
344    disclaimer.
345  Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
346    disclaimer in the documentation and/or other materials provided with the distribution.
347  Neither the name of the author nor the names of its contributors may be used to endorse or promote
348    products derived from this software without specific prior written permission.
349
350THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
351OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
352AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
353CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
354CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
355SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
356THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
357OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
358POSSIBILITY OF SUCH DAMAGE.
359</pre>
360
361
362<hr><a href="index.html">back</a>
363
364</body>
365</html>
Note: See TracBrowser for help on using the repository browser.