chickadee » glut

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.

glut

Description

Bindings for the GLUT API.

Author

felix winkelmann

Requirements

Documentation

glut:ACCUMconstant
glut:ACTIVE_ALTconstant
glut:ACTIVE_CTRLconstant
glut:ACTIVE_SHIFTconstant
glut:ALPHAconstant
glut:BITMAP_8_BY_13constant
glut:BITMAP_9_BY_15constant
glut:BITMAP_HELVETICA_10constant
glut:BITMAP_HELVETICA_12constant
glut:BITMAP_HELVETICA_18constant
glut:BITMAP_TIMES_ROMAN_10constant
glut:BITMAP_TIMES_ROMAN_24constant
glut:BLUEconstant
glut:CURSOR_BOTTOM_LEFT_CORNERconstant
glut:CURSOR_BOTTOM_RIGHT_CORNERconstant
glut:CURSOR_BOTTOM_SIDEconstant
glut:CURSOR_CROSSHAIRconstant
glut:CURSOR_CYCLEconstant
glut:CURSOR_DESTROYconstant
glut:CURSOR_FULL_CROSSHAIRconstant
glut:CURSOR_HELPconstant
glut:CURSOR_INFOconstant
glut:CURSOR_INHERITconstant
glut:CURSOR_LEFT_ARROWconstant
glut:CURSOR_LEFT_RIGHTconstant
glut:CURSOR_LEFT_SIDEconstant
glut:CURSOR_NONEconstant
glut:CURSOR_RIGHT_ARROWconstant
glut:CURSOR_RIGHT_SIDEconstant
glut:CURSOR_SPRAYconstant
glut:CURSOR_TEXTconstant
glut:CURSOR_TOP_LEFT_CORNERconstant
glut:CURSOR_TOP_RIGHT_CORNERconstant
glut:CURSOR_TOP_SIDEconstant
glut:CURSOR_UP_DOWNconstant
glut:CURSOR_WAITconstant
glut:DEPTHconstant
glut:DEVICE_IGNORE_KEY_REPEATconstant
glut:DEVICE_KEY_REPEATconstant
glut:DISPLAY_MODE_POSSIBLEconstant
glut:DOUBLEconstant
glut:DOWNconstant
glut:ELAPSED_TIMEconstant
glut:ENTEREDconstant
glut:FULLY_COVEREDconstant
glut:FULLY_RETAINEDconstant
glut:GAME_MODE_ACTIVEconstant
glut:GAME_MODE_DISPLAY_CHANGEDconstant
glut:GAME_MODE_HEIGHTconstant
glut:GAME_MODE_PIXEL_DEPTHconstant
glut:GAME_MODE_POSSIBLEconstant
glut:GAME_MODE_REFRESH_RATEconstant
glut:GAME_MODE_WIDTHconstant
glut:GREENconstant
glut:HAS_DIAL_AND_BUTTON_BOXconstant
glut:HAS_JOYSTICKconstant
glut:HAS_KEYBOARDconstant
glut:HAS_MOUSEconstant
glut:HAS_OVERLAYconstant
glut:HAS_SPACEBALLconstant
glut:HAS_TABLETconstant
glut:HIDDENconstant
glut:INDEXconstant
glut:INIT_DISPLAY_MODEconstant
glut:INIT_WINDOW_HEIGHTconstant
glut:INIT_WINDOW_WIDTHconstant
glut:INIT_WINDOW_Xconstant
glut:INIT_WINDOW_Yconstant
glut:JOYSTICK_AXESconstant
glut:JOYSTICK_BUTTONSconstant
glut:JOYSTICK_BUTTON_Aconstant
glut:JOYSTICK_BUTTON_Bconstant
glut:JOYSTICK_BUTTON_Cconstant
glut:JOYSTICK_BUTTON_Dconstant
glut:JOYSTICK_POLL_RATEconstant
glut:KEY_DOWNconstant
glut:KEY_ENDconstant
glut:KEY_F10constant
glut:KEY_F11constant
glut:KEY_F12constant
glut:KEY_F1constant
glut:KEY_F2constant
glut:KEY_F3constant
glut:KEY_F4constant
glut:KEY_F5constant
glut:KEY_F6constant
glut:KEY_F7constant
glut:KEY_F8constant
glut:KEY_F9constant
glut:KEY_HOMEconstant
glut:KEY_INSERTconstant
glut:KEY_LEFTconstant
glut:KEY_PAGE_DOWNconstant
glut:KEY_PAGE_UPconstant
glut:KEY_REPEAT_DEFAULTconstant
glut:KEY_REPEAT_OFFconstant
glut:KEY_REPEAT_ONconstant
glut:KEY_RIGHTconstant
glut:KEY_UPconstant
glut:LAYER_IN_USEconstant
glut:LEFTconstant
glut:LEFT_BUTTONconstant
glut:LUMINANCEconstant
glut:MENU_IN_USEconstant
glut:MENU_NOT_IN_USEconstant
glut:MENU_NUM_ITEMSconstant
glut:MIDDLE_BUTTONconstant
glut:MULTISAMPLEconstant
glut:NORMALconstant
glut:NORMALconstant
glut:NORMAL_DAMAGEDconstant
glut:NOT_VISIBLEconstant
glut:NUM_BUTTON_BOX_BUTTONSconstant
glut:NUM_DIALSconstant
glut:NUM_MOUSE_BUTTONSconstant
glut:NUM_SPACEBALL_BUTTONSconstant
glut:NUM_TABLET_BUTTONSconstant
glut:OVERLAYconstant
glut:OVERLAYconstant
glut:OVERLAY_DAMAGEDconstant
glut:OVERLAY_POSSIBLEconstant
glut:OWNS_JOYSTICKconstant
glut:PARTIALLY_RETAINEDconstant
glut:REDconstant
glut:RGBconstant
glut:RGBAconstant
glut:RIGHT_BUTTONconstant
glut:SCREEN_HEIGHTconstant
glut:SCREEN_HEIGHT_MMconstant
glut:SCREEN_WIDTHconstant
glut:SCREEN_WIDTH_MMconstant
glut:SINGLEconstant
glut:STENCILconstant
glut:STEREOconstant
glut:STROKE_MONO_ROMANconstant
glut:STROKE_ROMANconstant
glut:TRANSPARENT_INDEXconstant
glut:UPconstant
glut:VIDEO_RESIZE_HEIGHTconstant
glut:VIDEO_RESIZE_HEIGHT_DELTAconstant
glut:VIDEO_RESIZE_IN_USEconstant
glut:VIDEO_RESIZE_POSSIBLEconstant
glut:VIDEO_RESIZE_WIDTHconstant
glut:VIDEO_RESIZE_WIDTH_DELTAconstant
glut:VIDEO_RESIZE_Xconstant
glut:VIDEO_RESIZE_X_DELTAconstant
glut:VIDEO_RESIZE_Yconstant
glut:VIDEO_RESIZE_Y_DELTAconstant
glut:VISIBLEconstant
glut:WINDOW_ACCUM_ALPHA_SIZEconstant
glut:WINDOW_ACCUM_BLUE_SIZEconstant
glut:WINDOW_ACCUM_GREEN_SIZEconstant
glut:WINDOW_ACCUM_RED_SIZEconstant
glut:WINDOW_ALPHA_SIZEconstant
glut:WINDOW_BLUE_SIZEconstant
glut:WINDOW_BUFFER_SIZEconstant
glut:WINDOW_COLORMAP_SIZEconstant
glut:WINDOW_CURSORconstant
glut:WINDOW_DEPTH_SIZEconstant
glut:WINDOW_DOUBLEBUFFERconstant
glut:WINDOW_FORMAT_IDconstant
glut:WINDOW_GREEN_SIZEconstant
glut:WINDOW_HEIGHTconstant
glut:WINDOW_NUM_CHILDRENconstant
glut:WINDOW_NUM_SAMPLESconstant
glut:WINDOW_PARENTconstant
glut:WINDOW_RED_SIZEconstant
glut:WINDOW_RGBAconstant
glut:WINDOW_STENCIL_SIZEconstant
glut:WINDOW_STEREOconstant
glut:WINDOW_WIDTHconstant
glut:WINDOW_Xconstant
glut:WINDOW_Yconstant
glut:AddMenuEntry C-STRING INTEGERprocedure
glut:AddSubMenu C-STRING INTEGERprocedure
glut:AttachMenu INTEGERprocedure
(glut:BitmapCharacter (POINTER VOID) CHAR)procedure
(glut:BitmapWidth (POINTER VOID) CHAR) -> INTEGERprocedure
glut:ChangeToMenuEntry INTEGER C-STRING INTEGERprocedure
glut:ChangeToSubMenu INTEGER C-STRING INTEGERprocedure
glut:CopyColormap INTEGERprocedure
glut:CreateMenu PROCEDUREprocedure
glut:CreateSubWindow INTEGER INTEGER INTEGER INTEGER INTEGERprocedure
glut:CreateWindow C-STRINGprocedure
glut:DestroyMenu INTEGERprocedure
glut:DestroyWindow INTEGERprocedure
glut:DetachMenu INTEGERprocedure
glut:DeviceGet INTEGERprocedure
glut:DisplayFunc PROCEDUREprocedure
glut:EnterGameModeprocedure
glut:EntryFunc PROCEDUREprocedure
glut:ForceJoystickFuncprocedure
glut:GameModeGet INTEGERprocedure
glut:GameModeString STRINGprocedure
glut:Get INTEGERprocedure
glut:GetColor INTEGER INTEGERprocedure
glut:GetMenuprocedure
glut:GetWindowprocedure
glut:HideWindowprocedure
glut:IconifyWindowprocedure
glut:IdleFunc PROCEDUREprocedure
glut:IgnoreKeyRepeat BOOLEANprocedure
glut:InitDisplayMode UNSIGNED-INTEGERprocedure
glut:InitDisplayString STRINGprocedure
glut:InitWindowPosition INTEGER INTEGERprocedure
glut:InitWindowSize INTEGER INTEGERprocedure
glut:JoystickFunc PROCEDUREprocedure
glut:KeyboardFunc PROCEDUREprocedure
glut:KeyboardUpFunc PROCEDUREprocedure
glut:LeaveGameModeprocedure
glut:MainLoopprocedure
glut:MenuStateFunc PROCEDUREprocedure
glut:MotionFunc PROCEDUREprocedure
glut:MouseFunc PROCEDUREprocedure
glut:PassiveMotionFunc PROCEDUREprocedure
glut:PopWindowprocedure
glut:PositionWindow INTEGER INTEGERprocedure
glut:PostRedisplayprocedure
glut:PostWindowOverlayRedisplay INTEGERprocedure
glut:PostWindowRedisplay INTEGERprocedure
glut:PushWindowprocedure
glut:RemoveMenuItem INTEGERprocedure
glut:ReportErrorsprocedure
glut:ReshapeFunc PROCEDUREprocedure
glut:ReshapeWindow INTEGER INTEGERprocedure
glut:SetColor INTEGER FLOAT FLOAT FLOATprocedure
glut:SetIconTitle C-STRINGprocedure
glut:SetKeyRepeat INTEGERprocedure
glut:SetMenu INTEGERprocedure
glut:SetWindow INTEGERprocedure
glut:SetWindowTitle C-STRINGprocedure
glut:SetupVideoResizingprocedure
glut:ShowWindowprocedure
glut:SolidCone DOUBLE DOUBLE INTEGER INTEGERprocedure
glut:SolidCube DOUBLEprocedure
glut:SolidDodecahedronprocedure
glut:SolidIcosahedronprocedure
glut:SolidOctahedronprocedure
glut:SolidSphere DOUBLE INTEGER INTEGERprocedure
glut:SolidTeapot DOUBLEprocedure
glut:SolidTetrahedronprocedure
glut:SolidTorus DOUBLE DOUBLE INTEGER INTEGERprocedure
glut:SpecialUpFunc PROCEDUREprocedure
glut:StopVideoResizingprocedure
(glut:StrokeCharacter (POINTER VOID) CHAR)procedure
(glut:StrokeWidth (POINTER VOID) CHAR) -> INTEGERprocedure
glut:SwapBuffersprocedure
glut:TimerFunc UNSIGNED-INTEGER PROCEDURE INTEGERprocedure
glut:VideoPan INTEGER INTEGER INTEGER INTEGERprocedure
glut:VideoResize INTEGER INTEGER INTEGER INTEGERprocedure
glut:VideoResizeGet INTEGERprocedure
glut:VisibilityFunc PROCEDUREprocedure
glut:WarpPointer INTEGER INTEGERprocedure
glut:WindowStatusFunc PROCEDUREprocedure
glut:WireCone DOUBLE DOUBLE INTEGER INTEGERprocedure
glut:WireCube DOUBLEprocedure
glut:WireDodecahedronprocedure
glut:WireIcosahedronprocedure
glut:WireOctahedronprocedure
glut:WireSphere DOUBLE INTEGER INTEGERprocedure
glut:WireTeapot DOUBLEprocedure
glut:WireTetrahedronprocedure
glut:WireTorus DOUBLE DOUBLE INTEGER INTEGERprocedure

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.

Contents »