glut

This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 version of this egg, if it exists.

If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.

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

glut

Description

Bindings for the GLUT API.

Author

felix winkelmann

Requirements

Documentation

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

Some examples can be found here.

Changelog

License

 Copyright (c) 2004-2010, 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.