[[tags: egg]]

glut

  1. glut
    1. Description
    2. Author
    3. Requirements
    4. Download
    5. Documentation
    6. Examples
    7. Changelog
    8. License

Description

Bindings for the GLUT API.

Author

felix winkelmann

Requirements

Download

glut.egg

Documentation

[constant] glut:RGB
[constant] glut:RGBA
[constant] glut:INDEX
[constant] glut:SINGLE
[constant] glut:DOUBLE
[constant] glut:ACCUM
[constant] glut:ALPHA
[constant] glut:DEPTH
[constant] glut:STENCIL
[constant] glut:MULTISAMPLE
[constant] glut:STEREO
[constant] glut:LUMINANCE
[constant] glut:LEFT_BUTTON
[constant] glut:MIDDLE_BUTTON
[constant] glut:RIGHT_BUTTON
[constant] glut:DOWN
[constant] glut:UP
[constant] glut:KEY_F1
[constant] glut:KEY_F2
[constant] glut:KEY_F3
[constant] glut:KEY_F4
[constant] glut:KEY_F5
[constant] glut:KEY_F6
[constant] glut:KEY_F7
[constant] glut:KEY_F8
[constant] glut:KEY_F9
[constant] glut:KEY_F10
[constant] glut:KEY_F11
[constant] glut:KEY_F12
[constant] glut:KEY_LEFT
[constant] glut:KEY_UP
[constant] glut:KEY_RIGHT
[constant] glut:KEY_DOWN
[constant] glut:KEY_PAGE_UP
[constant] glut:KEY_PAGE_DOWN
[constant] glut:KEY_HOME
[constant] glut:KEY_END
[constant] glut:KEY_INSERT
[constant] glut:LEFT
[constant] glut:ENTERED
[constant] glut:MENU_NOT_IN_USE
[constant] glut:MENU_IN_USE
[constant] glut:NOT_VISIBLE
[constant] glut:VISIBLE
[constant] glut:HIDDEN
[constant] glut:FULLY_RETAINED
[constant] glut:PARTIALLY_RETAINED
[constant] glut:FULLY_COVERED
[constant] glut:RED
[constant] glut:GREEN
[constant] glut:BLUE
[constant] glut:NORMAL
[constant] glut:OVERLAY
[constant] glut:WINDOW_X
[constant] glut:WINDOW_Y
[constant] glut:WINDOW_WIDTH
[constant] glut:WINDOW_HEIGHT
[constant] glut:WINDOW_BUFFER_SIZE
[constant] glut:WINDOW_STENCIL_SIZE
[constant] glut:WINDOW_DEPTH_SIZE
[constant] glut:WINDOW_RED_SIZE
[constant] glut:WINDOW_GREEN_SIZE
[constant] glut:WINDOW_BLUE_SIZE
[constant] glut:WINDOW_ALPHA_SIZE
[constant] glut:WINDOW_ACCUM_RED_SIZE
[constant] glut:WINDOW_ACCUM_GREEN_SIZE
[constant] glut:WINDOW_ACCUM_BLUE_SIZE
[constant] glut:WINDOW_ACCUM_ALPHA_SIZE
[constant] glut:WINDOW_DOUBLEBUFFER
[constant] glut:WINDOW_RGBA
[constant] glut:WINDOW_PARENT
[constant] glut:WINDOW_NUM_CHILDREN
[constant] glut:WINDOW_COLORMAP_SIZE
[constant] glut:WINDOW_NUM_SAMPLES
[constant] glut:WINDOW_STEREO
[constant] glut:WINDOW_CURSOR
[constant] glut:SCREEN_WIDTH
[constant] glut:SCREEN_HEIGHT
[constant] glut:SCREEN_WIDTH_MM
[constant] glut:SCREEN_HEIGHT_MM
[constant] glut:MENU_NUM_ITEMS
[constant] glut:DISPLAY_MODE_POSSIBLE
[constant] glut:INIT_WINDOW_X
[constant] glut:INIT_WINDOW_Y
[constant] glut:INIT_WINDOW_WIDTH
[constant] glut:INIT_WINDOW_HEIGHT
[constant] glut:INIT_DISPLAY_MODE
[constant] glut:ELAPSED_TIME
[constant] glut:WINDOW_FORMAT_ID
[constant] glut:HAS_KEYBOARD
[constant] glut:HAS_MOUSE
[constant] glut:HAS_SPACEBALL
[constant] glut:HAS_DIAL_AND_BUTTON_BOX
[constant] glut:HAS_TABLET
[constant] glut:NUM_MOUSE_BUTTONS
[constant] glut:NUM_SPACEBALL_BUTTONS
[constant] glut:NUM_BUTTON_BOX_BUTTONS
[constant] glut:NUM_DIALS
[constant] glut:NUM_TABLET_BUTTONS
[constant] glut:DEVICE_IGNORE_KEY_REPEAT
[constant] glut:DEVICE_KEY_REPEAT
[constant] glut:HAS_JOYSTICK
[constant] glut:OWNS_JOYSTICK
[constant] glut:JOYSTICK_BUTTONS
[constant] glut:JOYSTICK_AXES
[constant] glut:JOYSTICK_POLL_RATE
[constant] glut:OVERLAY_POSSIBLE
[constant] glut:LAYER_IN_USE
[constant] glut:HAS_OVERLAY
[constant] glut:TRANSPARENT_INDEX
[constant] glut:NORMAL_DAMAGED
[constant] glut:OVERLAY_DAMAGED
[constant] glut:VIDEO_RESIZE_POSSIBLE
[constant] glut:VIDEO_RESIZE_IN_USE
[constant] glut:VIDEO_RESIZE_X_DELTA
[constant] glut:VIDEO_RESIZE_Y_DELTA
[constant] glut:VIDEO_RESIZE_WIDTH_DELTA
[constant] glut:VIDEO_RESIZE_HEIGHT_DELTA
[constant] glut:VIDEO_RESIZE_X
[constant] glut:VIDEO_RESIZE_Y
[constant] glut:VIDEO_RESIZE_WIDTH
[constant] glut:VIDEO_RESIZE_HEIGHT
[constant] glut:NORMAL
[constant] glut:OVERLAY
[constant] glut:ACTIVE_SHIFT
[constant] glut:ACTIVE_CTRL
[constant] glut:ACTIVE_ALT
[constant] glut:CURSOR_RIGHT_ARROW
[constant] glut:CURSOR_LEFT_ARROW
[constant] glut:CURSOR_INFO
[constant] glut:CURSOR_DESTROY
[constant] glut:CURSOR_HELP
[constant] glut:CURSOR_CYCLE
[constant] glut:CURSOR_SPRAY
[constant] glut:CURSOR_WAIT
[constant] glut:CURSOR_TEXT
[constant] glut:CURSOR_CROSSHAIR
[constant] glut:CURSOR_UP_DOWN
[constant] glut:CURSOR_LEFT_RIGHT
[constant] glut:CURSOR_TOP_SIDE
[constant] glut:CURSOR_BOTTOM_SIDE
[constant] glut:CURSOR_LEFT_SIDE
[constant] glut:CURSOR_RIGHT_SIDE
[constant] glut:CURSOR_TOP_LEFT_CORNER
[constant] glut:CURSOR_TOP_RIGHT_CORNER
[constant] glut:CURSOR_BOTTOM_RIGHT_CORNER
[constant] glut:CURSOR_BOTTOM_LEFT_CORNER
[constant] glut:CURSOR_INHERIT
[constant] glut:CURSOR_NONE
[constant] glut:CURSOR_FULL_CROSSHAIR
[constant] glut:STROKE_ROMAN
[constant] glut:STROKE_MONO_ROMAN
[constant] glut:BITMAP_9_BY_15
[constant] glut:BITMAP_8_BY_13
[constant] glut:BITMAP_TIMES_ROMAN_10
[constant] glut:BITMAP_TIMES_ROMAN_24
[constant] glut:BITMAP_HELVETICA_10
[constant] glut:BITMAP_HELVETICA_12
[constant] glut:BITMAP_HELVETICA_18
[constant] glut:KEY_REPEAT_OFF
[constant] glut:KEY_REPEAT_ON
[constant] glut:KEY_REPEAT_DEFAULT
[constant] glut:JOYSTICK_BUTTON_A
[constant] glut:JOYSTICK_BUTTON_B
[constant] glut:JOYSTICK_BUTTON_C
[constant] glut:JOYSTICK_BUTTON_D
[constant] glut:GAME_MODE_ACTIVE
[constant] glut:GAME_MODE_POSSIBLE
[constant] glut:GAME_MODE_WIDTH
[constant] glut:GAME_MODE_HEIGHT
[constant] glut:GAME_MODE_PIXEL_DEPTH
[constant] glut:GAME_MODE_REFRESH_RATE
[constant] glut:GAME_MODE_DISPLAY_CHANGED
[procedure] (glut:InitDisplayMode UNSIGNED-INTEGER)
[procedure] (glut:InitDisplayString STRING)
[procedure] (glut:InitWindowPosition INTEGER INTEGER)
[procedure] (glut:InitWindowSize INTEGER INTEGER)
[procedure] (glut:MainLoop)
[procedure] (glut:CreateWindow C-STRING) -> INTEGER
[procedure] (glut:CreateSubWindow INTEGER INTEGER INTEGER INTEGER INTEGER) -> INTEGER
[procedure] (glut:DestroyWindow INTEGER)
[procedure] (glut:PostRedisplay)
[procedure] (glut:PostWindowRedisplay INTEGER)
[procedure] (glut:PostWindowOverlayRedisplay INTEGER)
[procedure] (glut:SwapBuffers)
[procedure] (glut:GetWindow) -> INTEGER
[procedure] (glut:SetWindow INTEGER)
[procedure] (glut:SetWindowTitle C-STRING)
[procedure] (glut:SetIconTitle C-STRING)
[procedure] (glut:PositionWindow INTEGER INTEGER)
[procedure] (glut:ReshapeWindow INTEGER INTEGER)
[procedure] (glut:PopWindow)
[procedure] (glut:PushWindow)
[procedure] (glut:IconifyWindow)
[procedure] (glut:ShowWindow)
[procedure] (glut:HideWindow)
[procedure] (glut:CreateMenu PROCEDURE) -> INTEGER
[procedure] (glut:DestroyMenu INTEGER)
[procedure] (glut:GetMenu) -> INTEGER
[procedure] (glut:SetMenu INTEGER)
[procedure] (glut:AddMenuEntry C-STRING INTEGER)
[procedure] (glut:AddSubMenu C-STRING INTEGER)
[procedure] (glut:ChangeToMenuEntry INTEGER C-STRING INTEGER)
[procedure] (glut:ChangeToSubMenu INTEGER C-STRING INTEGER)
[procedure] (glut:RemoveMenuItem INTEGER)
[procedure] (glut:AttachMenu INTEGER)
[procedure] (glut:DetachMenu INTEGER)
[procedure] (glut:DisplayFunc PROCEDURE)
[procedure] (glut:ReshapeFunc PROCEDURE)
[procedure] (glut:KeyboardFunc PROCEDURE)
[procedure] (glut:MouseFunc PROCEDURE)
[procedure] (glut:MotionFunc PROCEDURE)
[procedure] (glut:PassiveMotionFunc PROCEDURE)
[procedure] (glut:EntryFunc PROCEDURE)
[procedure] (glut:VisibilityFunc PROCEDURE)
[procedure] (glut:IdleFunc PROCEDURE)
[procedure] (glut:TimerFunc UNSIGNED-INTEGER PROCEDURE INTEGER)
[procedure] (glut:MenuStateFunc PROCEDURE)
[procedure] (glut:WindowStatusFunc PROCEDURE)
[procedure] (glut:KeyboardUpFunc PROCEDURE)
[procedure] (glut:SpecialUpFunc PROCEDURE)
[procedure] (glut:JoystickFunc PROCEDURE)
[procedure] (glut:SetColor INTEGER FLOAT FLOAT FLOAT)
[procedure] (glut:GetColor INTEGER INTEGER) -> FLOAT
[procedure] (glut:CopyColormap INTEGER)
[procedure] (glut:Get INTEGER) -> INTEGER
[procedure] (glut:DeviceGet INTEGER) -> INTEGER
[procedure] (glut:BitmapCharacter (POINTER VOID) CHAR)
[procedure] (glut:BitmapWidth (POINTER VOID) CHAR) -> INTEGER
[procedure] (glut:StrokeCharacter (POINTER VOID) CHAR)
[procedure] (glut:StrokeWidth (POINTER VOID) CHAR) -> INTEGER
[procedure] (glut:WireSphere DOUBLE INTEGER INTEGER)
[procedure] (glut:SolidSphere DOUBLE INTEGER INTEGER)
[procedure] (glut:WireCone DOUBLE DOUBLE INTEGER INTEGER)
[procedure] (glut:SolidCone DOUBLE DOUBLE INTEGER INTEGER)
[procedure] (glut:WireCube DOUBLE)
[procedure] (glut:SolidCube DOUBLE)
[procedure] (glut:WireTorus DOUBLE DOUBLE INTEGER INTEGER)
[procedure] (glut:SolidTorus DOUBLE DOUBLE INTEGER INTEGER)
[procedure] (glut:WireDodecahedron)
[procedure] (glut:SolidDodecahedron)
[procedure] (glut:WireTeapot DOUBLE)
[procedure] (glut:SolidTeapot DOUBLE)
[procedure] (glut:WireOctahedron)
[procedure] (glut:SolidOctahedron)
[procedure] (glut:WireTetrahedron)
[procedure] (glut:SolidTetrahedron)
[procedure] (glut:WireIcosahedron)
[procedure] (glut:SolidIcosahedron)
[procedure] (glut:WarpPointer INTEGER INTEGER)
[procedure] (glut:VideoResizeGet INTEGER)
[procedure] (glut:SetupVideoResizing)
[procedure] (glut:StopVideoResizing)
[procedure] (glut:VideoResize INTEGER INTEGER INTEGER INTEGER)
[procedure] (glut:VideoPan INTEGER INTEGER INTEGER INTEGER)
[procedure] (glut:ReportErrors)
[procedure] (glut:IgnoreKeyRepeat BOOLEAN)
[procedure] (glut:SetKeyRepeat INTEGER)
[procedure] (glut:ForceJoystickFunc)
[procedure] (glut:GameModeString STRING)
[procedure] (glut:EnterGameMode)
[procedure] (glut:LeaveGameMode)
[procedure] (glut:GameModeGet INTEGER)

Constants and procedures for the OpenGL GLUT API. Note that glutInit will be called automatically after the (opengl glut) extension is loaded.

Examples

A most trivial example: a white rectangle

(require-extension gl glut)

(glut:CreateWindow "simple")

(glut:DisplayFunc
 (lambda ()
   (gl:Clear gl:COLOR_BUFFER_BIT)
   (gl:Begin gl:POLYGON)
   (gl:Vertex2f -0.5 -0.5)
   (gl:Vertex2f -0.5 0.5)
   (gl:Vertex2f 0.5 0.5)
   (gl:Vertex2f 0.5 -0.5)
   (gl:End) 
   (gl:Flush) ) )

(gl:ClearColor 0 0 0 1)
(glut:MainLoop)

The well-known "gears" example can be found in the gears.scm file in the egg distribution.

Changelog

License

 Copyright (c) 2004-2006, Felix L. Winkelmann
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
 conditions are met:
 
   Redistributions of source code must retain the above copyright notice, this list of conditions and the following
     disclaimer. 
   Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
     disclaimer in the documentation and/or other materials provided with the distribution. 
   Neither the name of the author nor the names of its contributors may be used to endorse or promote
     products derived from this software without specific prior written permission. 
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
 AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 POSSIBILITY OF SUCH DAMAGE.