back

glut

Description:

Bindings for the GLUT API.

Author:

felix

Version:

Usage:

(require-extension glut)

Download:

glut.egg

Documentation:

[value] glut:RGB
[value] glut:RGBA
[value] glut:INDEX
[value] glut:SINGLE
[value] glut:DOUBLE
[value] glut:ACCUM
[value] glut:ALPHA
[value] glut:DEPTH
[value] glut:STENCIL
[value] glut:MULTISAMPLE
[value] glut:STEREO
[value] glut:LUMINANCE
[value] glut:LEFT_BUTTON
[value] glut:MIDDLE_BUTTON
[value] glut:RIGHT_BUTTON
[value] glut:DOWN
[value] glut:UP
[value] glut:KEY_F1
[value] glut:KEY_F2
[value] glut:KEY_F3
[value] glut:KEY_F4
[value] glut:KEY_F5
[value] glut:KEY_F6
[value] glut:KEY_F7
[value] glut:KEY_F8
[value] glut:KEY_F9
[value] glut:KEY_F10
[value] glut:KEY_F11
[value] glut:KEY_F12
[value] glut:KEY_LEFT
[value] glut:KEY_UP
[value] glut:KEY_RIGHT
[value] glut:KEY_DOWN
[value] glut:KEY_PAGE_UP
[value] glut:KEY_PAGE_DOWN
[value] glut:KEY_HOME
[value] glut:KEY_END
[value] glut:KEY_INSERT
[value] glut:LEFT
[value] glut:ENTERED
[value] glut:MENU_NOT_IN_USE
[value] glut:MENU_IN_USE
[value] glut:NOT_VISIBLE
[value] glut:VISIBLE
[value] glut:HIDDEN
[value] glut:FULLY_RETAINED
[value] glut:PARTIALLY_RETAINED
[value] glut:FULLY_COVERED
[value] glut:RED
[value] glut:GREEN
[value] glut:BLUE
[value] glut:NORMAL
[value] glut:OVERLAY
[value] glut:WINDOW_X
[value] glut:WINDOW_Y
[value] glut:WINDOW_WIDTH
[value] glut:WINDOW_HEIGHT
[value] glut:WINDOW_BUFFER_SIZE
[value] glut:WINDOW_STENCIL_SIZE
[value] glut:WINDOW_DEPTH_SIZE
[value] glut:WINDOW_RED_SIZE
[value] glut:WINDOW_GREEN_SIZE
[value] glut:WINDOW_BLUE_SIZE
[value] glut:WINDOW_ALPHA_SIZE
[value] glut:WINDOW_ACCUM_RED_SIZE
[value] glut:WINDOW_ACCUM_GREEN_SIZE
[value] glut:WINDOW_ACCUM_BLUE_SIZE
[value] glut:WINDOW_ACCUM_ALPHA_SIZE
[value] glut:WINDOW_DOUBLEBUFFER
[value] glut:WINDOW_RGBA
[value] glut:WINDOW_PARENT
[value] glut:WINDOW_NUM_CHILDREN
[value] glut:WINDOW_COLORMAP_SIZE
[value] glut:WINDOW_NUM_SAMPLES
[value] glut:WINDOW_STEREO
[value] glut:WINDOW_CURSOR
[value] glut:SCREEN_WIDTH
[value] glut:SCREEN_HEIGHT
[value] glut:SCREEN_WIDTH_MM
[value] glut:SCREEN_HEIGHT_MM
[value] glut:MENU_NUM_ITEMS
[value] glut:DISPLAY_MODE_POSSIBLE
[value] glut:INIT_WINDOW_X
[value] glut:INIT_WINDOW_Y
[value] glut:INIT_WINDOW_WIDTH
[value] glut:INIT_WINDOW_HEIGHT
[value] glut:INIT_DISPLAY_MODE
[value] glut:ELAPSED_TIME
[value] glut:WINDOW_FORMAT_ID
[value] glut:HAS_KEYBOARD
[value] glut:HAS_MOUSE
[value] glut:HAS_SPACEBALL
[value] glut:HAS_DIAL_AND_BUTTON_BOX
[value] glut:HAS_TABLET
[value] glut:NUM_MOUSE_BUTTONS
[value] glut:NUM_SPACEBALL_BUTTONS
[value] glut:NUM_BUTTON_BOX_BUTTONS
[value] glut:NUM_DIALS
[value] glut:NUM_TABLET_BUTTONS
[value] glut:DEVICE_IGNORE_KEY_REPEAT
[value] glut:DEVICE_KEY_REPEAT
[value] glut:HAS_JOYSTICK
[value] glut:OWNS_JOYSTICK
[value] glut:JOYSTICK_BUTTONS
[value] glut:JOYSTICK_AXES
[value] glut:JOYSTICK_POLL_RATE
[value] glut:OVERLAY_POSSIBLE
[value] glut:LAYER_IN_USE
[value] glut:HAS_OVERLAY
[value] glut:TRANSPARENT_INDEX
[value] glut:NORMAL_DAMAGED
[value] glut:OVERLAY_DAMAGED
[value] glut:VIDEO_RESIZE_POSSIBLE
[value] glut:VIDEO_RESIZE_IN_USE
[value] glut:VIDEO_RESIZE_X_DELTA
[value] glut:VIDEO_RESIZE_Y_DELTA
[value] glut:VIDEO_RESIZE_WIDTH_DELTA
[value] glut:VIDEO_RESIZE_HEIGHT_DELTA
[value] glut:VIDEO_RESIZE_X
[value] glut:VIDEO_RESIZE_Y
[value] glut:VIDEO_RESIZE_WIDTH
[value] glut:VIDEO_RESIZE_HEIGHT
[value] glut:NORMAL
[value] glut:OVERLAY
[value] glut:ACTIVE_SHIFT
[value] glut:ACTIVE_CTRL
[value] glut:ACTIVE_ALT
[value] glut:CURSOR_RIGHT_ARROW
[value] glut:CURSOR_LEFT_ARROW
[value] glut:CURSOR_INFO
[value] glut:CURSOR_DESTROY
[value] glut:CURSOR_HELP
[value] glut:CURSOR_CYCLE
[value] glut:CURSOR_SPRAY
[value] glut:CURSOR_WAIT
[value] glut:CURSOR_TEXT
[value] glut:CURSOR_CROSSHAIR
[value] glut:CURSOR_UP_DOWN
[value] glut:CURSOR_LEFT_RIGHT
[value] glut:CURSOR_TOP_SIDE
[value] glut:CURSOR_BOTTOM_SIDE
[value] glut:CURSOR_LEFT_SIDE
[value] glut:CURSOR_RIGHT_SIDE
[value] glut:CURSOR_TOP_LEFT_CORNER
[value] glut:CURSOR_TOP_RIGHT_CORNER
[value] glut:CURSOR_BOTTOM_RIGHT_CORNER
[value] glut:CURSOR_BOTTOM_LEFT_CORNER
[value] glut:CURSOR_INHERIT
[value] glut:CURSOR_NONE
[value] glut:CURSOR_FULL_CROSSHAIR
[value] glut:STROKE_ROMAN
[value] glut:STROKE_MONO_ROMAN
[value] glut:BITMAP_9_BY_15
[value] glut:BITMAP_8_BY_13
[value] glut:BITMAP_TIMES_ROMAN_10
[value] glut:BITMAP_TIMES_ROMAN_24
[value] glut:BITMAP_HELVETICA_10
[value] glut:BITMAP_HELVETICA_12
[value] glut:BITMAP_HELVETICA_18
[value] glut:KEY_REPEAT_OFF
[value] glut:KEY_REPEAT_ON
[value] glut:KEY_REPEAT_DEFAULT
[value] glut:JOYSTICK_BUTTON_A
[value] glut:JOYSTICK_BUTTON_B
[value] glut:JOYSTICK_BUTTON_C
[value] glut:JOYSTICK_BUTTON_D
[value] glut:GAME_MODE_ACTIVE
[value] glut:GAME_MODE_POSSIBLE
[value] glut:GAME_MODE_WIDTH
[value] glut:GAME_MODE_HEIGHT
[value] glut:GAME_MODE_PIXEL_DEPTH
[value] glut:GAME_MODE_REFRESH_RATE
[value] 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 here: gears.scm.

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.

back