glut

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2021 License: Unlicense Imports: 4 Imported by: 1

README

GLUT

GoDoc

Abstract

This is GLUT (version 3.7) binding (published at https://github.com/vbsw/glut) for the programming language Go.

If you want the binding of freeglut visit https://github.com/vbsw/freeglut.

Copying

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to http://unlicense.org

Example

package main

import (
	"github.com/vbsw/glut"
)

func main() {
	glut.Init()
	glut.InitDisplayMode(glut.SINGLE | glut.RGBA)
	glut.InitWindowSize(640, 480)
	glut.CreateWindow("Testing GLUT binding for Go");
	glut.ReshapeFunc(reshape)
	glut.DisplayFunc(display)
	glut.KeyboardFunc(keyboard)
	glut.MainLoop()
}

func reshape(width, height int) {
	println("reshape")
}

func display() {
	println("display")
}

func keyboard(key uint8, x, y int) {
	if key==27 { // escape
		glut.DestroyWindow(glut.GetWindow())
	} else {
		if (glut.GetModifiers() & glut.ACTIVE_CTRL) > 0 {
			println("key pressed: ctrl +", key)
		} else {
			println("key pressed:", key)
		}
	}
}

Installation

Linux

Install the programming language Go and the source code management system Git. You also need GCC, the C standard library development package and the GLUT development package. Install them for example with

    $ sudo apt-get install git gcc libc6-dev freeglut3-dev

Get this project with

$ go get github.com/vbsw/glut

or update your local copy with

$ go get -u github.com/vbsw/glut

or compile it with

$ go install github.com/vbsw/glut
Windows

Install the programming language Go. Install Git.

Get this project with (run this preferably from the Git Bash)

$ go get github.com/vbsw/glut

or update your local copy with

$ go get -u github.com/vbsw/glut

Cgo needs another compiler to compile c files. On a 64 bit system a 64 bit compiler is needed. I tried it with the gcc. MinGW provides only 32 bit binaries. So go to http://tdm-gcc.tdragon.net to download 64 bit gcc binaries. Install it.

Then download freeglut from http://www.transmissionzero.co.uk/software/freeglut-devel/ and unpack it for example to

C:/Users/Alice/Downloads/freeglut

Then open the file github.com/vbsw/glut/glut.go and change the first line from

// #cgo LDFLAGS: -lGL -lGLU -lglut
// #include <stdlib.h>
// #include <GL/glut.h>
// #include "gofunctions.h"

to

// #cgo CFLAGS: -IC:/Users/Alice/Downloads/freeglut/include
// #cgo LDFLAGS: -LC:/Users/Alice/Downloads/freeglut/bin/x64 -l:freeglut.dll
// #include <stdlib.h>
// #include <GL/glut.h>
// #include "gofunctions.h"

To compile run

$ go install github.com/vbsw/glut

References

Documentation

Index

Constants

View Source
const (
	RGB         = C.GLUT_RGB
	RGBA        = C.GLUT_RGBA
	INDEX       = C.GLUT_INDEX
	SINGLE      = C.GLUT_SINGLE
	DOUBLE      = C.GLUT_DOUBLE
	ACCUM       = C.GLUT_ACCUM
	ALPHA       = C.GLUT_ALPHA
	DEPTH       = C.GLUT_DEPTH
	STENCIL     = C.GLUT_STENCIL
	MULTISAMPLE = C.GLUT_MULTISAMPLE
	STEREO      = C.GLUT_STEREO
	LUMINANCE   = C.GLUT_LUMINANCE
)

display modes for InitDisplayMode

View Source
const (
	LEFT_BUTTON   = C.GLUT_LEFT_BUTTON
	MIDDLE_BUTTON = C.GLUT_MIDDLE_BUTTON
	RIGHT_BUTTON  = C.GLUT_RIGHT_BUTTON
	DOWN          = C.GLUT_DOWN
	UP            = C.GLUT_UP
)

mouse states

View Source
const (
	KEY_F1        = C.GLUT_KEY_F1
	KEY_F2        = C.GLUT_KEY_F2
	KEY_F3        = C.GLUT_KEY_F3
	KEY_F4        = C.GLUT_KEY_F4
	KEY_F5        = C.GLUT_KEY_F5
	KEY_F6        = C.GLUT_KEY_F6
	KEY_F7        = C.GLUT_KEY_F7
	KEY_F8        = C.GLUT_KEY_F8
	KEY_F9        = C.GLUT_KEY_F9
	KEY_F10       = C.GLUT_KEY_F10
	KEY_F11       = C.GLUT_KEY_F11
	KEY_F12       = C.GLUT_KEY_F12
	KEY_LEFT      = C.GLUT_KEY_LEFT
	KEY_UP        = C.GLUT_KEY_UP
	KEY_RIGHT     = C.GLUT_KEY_RIGHT
	KEY_DOWN      = C.GLUT_KEY_DOWN
	KEY_PAGE_UP   = C.GLUT_KEY_PAGE_UP
	KEY_PAGE_DOWN = C.GLUT_KEY_PAGE_DOWN
	KEY_HOME      = C.GLUT_KEY_HOME
	KEY_END       = C.GLUT_KEY_END
	KEY_INSERT    = C.GLUT_KEY_INSERT
)

special key codes

View Source
const (
	LEFT    = C.GLUT_LEFT
	ENTERED = C.GLUT_ENTERED
)

entry/exit callback state

View Source
const (
	MENU_NOT_IN_USE    = C.GLUT_MENU_NOT_IN_USE
	MENU_IN_USE        = C.GLUT_MENU_IN_USE
	NOT_VISIBLE        = C.GLUT_NOT_VISIBLE
	VISIBLE            = C.GLUT_VISIBLE
	HIDDEN             = C.GLUT_HIDDEN
	FULLY_RETAINED     = C.GLUT_FULLY_RETAINED
	PARTIALLY_RETAINED = C.GLUT_PARTIALLY_RETAINED
	FULLY_COVERED      = C.GLUT_FULLY_COVERED
)

window and menu status

View Source
const (
	RED   = C.GLUT_RED
	GREEN = C.GLUT_GREEN
	BLUE  = C.GLUT_BLUE
)

RGB color component specification for GetColor

View Source
const (
	NORMAL  = C.GLUT_NORMAL
	OVERLAY = C.GLUT_OVERLAY
)

the UseLayer parameters

View Source
const (
	STROKE_ROMAN          = 0
	STROKE_MONO_ROMAN     = 1
	BITMAP_9_BY_15        = 2
	BITMAP_8_BY_13        = 3
	BITMAP_TIMES_ROMAN_10 = 4
	BITMAP_TIMES_ROMAN_24 = 5
	BITMAP_HELVETICA_10   = 6
	BITMAP_HELVETICA_12   = 7
	BITMAP_HELVETICA_18   = 8
)

fonts

View Source
const (
	WINDOW_X                = C.GLUT_WINDOW_X
	WINDOW_Y                = C.GLUT_WINDOW_Y
	WINDOW_WIDTH            = C.GLUT_WINDOW_WIDTH
	WINDOW_HEIGHT           = C.GLUT_WINDOW_HEIGHT
	WINDOW_BUFFER_SIZE      = C.GLUT_WINDOW_BUFFER_SIZE
	WINDOW_STENCIL_SIZE     = C.GLUT_WINDOW_STENCIL_SIZE
	WINDOW_DEPTH_SIZE       = C.GLUT_WINDOW_DEPTH_SIZE
	WINDOW_RED_SIZE         = C.GLUT_WINDOW_RED_SIZE
	WINDOW_GREEN_SIZE       = C.GLUT_WINDOW_GREEN_SIZE
	WINDOW_BLUE_SIZE        = C.GLUT_WINDOW_BLUE_SIZE
	WINDOW_ALPHA_SIZE       = C.GLUT_WINDOW_ALPHA_SIZE
	WINDOW_ACCUM_RED_SIZE   = C.GLUT_WINDOW_ACCUM_RED_SIZE
	WINDOW_ACCUM_GREEN_SIZE = C.GLUT_WINDOW_ACCUM_GREEN_SIZE
	WINDOW_ACCUM_BLUE_SIZE  = C.GLUT_WINDOW_ACCUM_BLUE_SIZE
	WINDOW_ACCUM_ALPHA_SIZE = C.GLUT_WINDOW_ACCUM_ALPHA_SIZE
	WINDOW_DOUBLEBUFFER     = C.GLUT_WINDOW_DOUBLEBUFFER
	WINDOW_RGBA             = C.GLUT_WINDOW_RGBA
	WINDOW_PARENT           = C.GLUT_WINDOW_PARENT
	WINDOW_NUM_CHILDREN     = C.GLUT_WINDOW_NUM_CHILDREN
	WINDOW_COLORMAP_SIZE    = C.GLUT_WINDOW_COLORMAP_SIZE
	WINDOW_NUM_SAMPLES      = C.GLUT_WINDOW_NUM_SAMPLES
	WINDOW_STEREO           = C.GLUT_WINDOW_STEREO
	WINDOW_CURSOR           = C.GLUT_WINDOW_CURSOR
	SCREEN_WIDTH            = C.GLUT_SCREEN_WIDTH
	SCREEN_HEIGHT           = C.GLUT_SCREEN_HEIGHT
	SCREEN_WIDTH_MM         = C.GLUT_SCREEN_WIDTH_MM
	SCREEN_HEIGHT_MM        = C.GLUT_SCREEN_HEIGHT_MM
	MENU_NUM_ITEMS          = C.GLUT_MENU_NUM_ITEMS
	DISPLAY_MODE_POSSIBLE   = C.GLUT_DISPLAY_MODE_POSSIBLE
	INIT_WINDOW_X           = C.GLUT_INIT_WINDOW_X
	INIT_WINDOW_Y           = C.GLUT_INIT_WINDOW_Y
	INIT_WINDOW_WIDTH       = C.GLUT_INIT_WINDOW_WIDTH
	INIT_WINDOW_HEIGHT      = C.GLUT_INIT_WINDOW_HEIGHT
	INIT_DISPLAY_MODE       = C.GLUT_INIT_DISPLAY_MODE
	ELAPSED_TIME            = C.GLUT_ELAPSED_TIME
	// glut api version >= 4 or xlib implementation >= 13
	WINDOW_FORMAT_ID = C.GLUT_WINDOW_FORMAT_ID
)

the Get parameters

View Source
const (
	HAS_KEYBOARD            = C.GLUT_HAS_KEYBOARD
	HAS_MOUSE               = C.GLUT_HAS_MOUSE
	HAS_SPACEBALL           = C.GLUT_HAS_SPACEBALL
	HAS_DIAL_AND_BUTTON_BOX = C.GLUT_HAS_DIAL_AND_BUTTON_BOX
	HAS_TABLET              = C.GLUT_HAS_TABLET
	NUM_MOUSE_BUTTONS       = C.GLUT_NUM_MOUSE_BUTTONS
	NUM_SPACEBALL_BUTTONS   = C.GLUT_NUM_SPACEBALL_BUTTONS
	NUM_BUTTON_BOX_BUTTONS  = C.GLUT_NUM_BUTTON_BOX_BUTTONS
	NUM_DIALS               = C.GLUT_NUM_DIALS
	NUM_TABLET_BUTTONS      = C.GLUT_NUM_TABLET_BUTTONS

	DEVICE_IGNORE_KEY_REPEAT = C.GLUT_DEVICE_IGNORE_KEY_REPEAT
	DEVICE_KEY_REPEAT        = C.GLUT_DEVICE_KEY_REPEAT
	HAS_JOYSTICK             = C.GLUT_HAS_JOYSTICK
	OWNS_JOYSTICK            = C.GLUT_OWNS_JOYSTICK
	JOYSTICK_BUTTONS         = C.GLUT_JOYSTICK_BUTTONS
	JOYSTICK_AXES            = C.GLUT_JOYSTICK_AXES
	JOYSTICK_POLL_RATE       = C.GLUT_JOYSTICK_POLL_RATE
)

the DeviceGet parameters

View Source
const (
	OVERLAY_POSSIBLE  = C.GLUT_OVERLAY_POSSIBLE
	LAYER_IN_USE      = C.GLUT_LAYER_IN_USE
	HAS_OVERLAY       = C.GLUT_HAS_OVERLAY
	TRANSPARENT_INDEX = C.GLUT_TRANSPARENT_INDEX
	NORMAL_DAMAGED    = C.GLUT_NORMAL_DAMAGED
	OVERLAY_DAMAGED   = C.GLUT_OVERLAY_DAMAGED
)

the LayerGet parameters

View Source
const (
	VIDEO_RESIZE_POSSIBLE     = C.GLUT_VIDEO_RESIZE_POSSIBLE
	VIDEO_RESIZE_IN_USE       = C.GLUT_VIDEO_RESIZE_IN_USE
	VIDEO_RESIZE_X_DELTA      = C.GLUT_VIDEO_RESIZE_X_DELTA
	VIDEO_RESIZE_Y_DELTA      = C.GLUT_VIDEO_RESIZE_Y_DELTA
	VIDEO_RESIZE_WIDTH_DELTA  = C.GLUT_VIDEO_RESIZE_WIDTH_DELTA
	VIDEO_RESIZE_HEIGHT_DELTA = C.GLUT_VIDEO_RESIZE_HEIGHT_DELTA
	VIDEO_RESIZE_X            = C.GLUT_VIDEO_RESIZE_X
	VIDEO_RESIZE_Y            = C.GLUT_VIDEO_RESIZE_Y
	VIDEO_RESIZE_WIDTH        = C.GLUT_VIDEO_RESIZE_WIDTH
	VIDEO_RESIZE_HEIGHT       = C.GLUT_VIDEO_RESIZE_HEIGHT
)

glutVideoResizeGet parameters glut api version >= 4 or xlib implementation >= 9

View Source
const (
	ACTIVE_SHIFT = C.GLUT_ACTIVE_SHIFT
	ACTIVE_CTRL  = C.GLUT_ACTIVE_CTRL
	ACTIVE_ALT   = C.GLUT_ACTIVE_ALT
)

the GetModifiers parameters

View Source
const (
	CURSOR_RIGHT_ARROW         = C.GLUT_CURSOR_RIGHT_ARROW
	CURSOR_LEFT_ARROW          = C.GLUT_CURSOR_LEFT_ARROW
	CURSOR_INFO                = C.GLUT_CURSOR_INFO
	CURSOR_DESTROY             = C.GLUT_CURSOR_DESTROY
	CURSOR_HELP                = C.GLUT_CURSOR_HELP
	CURSOR_CYCLE               = C.GLUT_CURSOR_CYCLE
	CURSOR_SPRAY               = C.GLUT_CURSOR_SPRAY
	CURSOR_WAIT                = C.GLUT_CURSOR_WAIT
	CURSOR_TEXT                = C.GLUT_CURSOR_TEXT
	CURSOR_CROSSHAIR           = C.GLUT_CURSOR_CROSSHAIR
	CURSOR_UP_DOWN             = C.GLUT_CURSOR_UP_DOWN
	CURSOR_LEFT_RIGHT          = C.GLUT_CURSOR_LEFT_RIGHT
	CURSOR_TOP_SIDE            = C.GLUT_CURSOR_TOP_SIDE
	CURSOR_BOTTOM_SIDE         = C.GLUT_CURSOR_BOTTOM_SIDE
	CURSOR_LEFT_SIDE           = C.GLUT_CURSOR_LEFT_SIDE
	CURSOR_RIGHT_SIDE          = C.GLUT_CURSOR_RIGHT_SIDE
	CURSOR_TOP_LEFT_CORNER     = C.GLUT_CURSOR_TOP_LEFT_CORNER
	CURSOR_TOP_RIGHT_CORNER    = C.GLUT_CURSOR_TOP_RIGHT_CORNER
	CURSOR_BOTTOM_RIGHT_CORNER = C.GLUT_CURSOR_BOTTOM_RIGHT_CORNER
	CURSOR_BOTTOM_LEFT_CORNER  = C.GLUT_CURSOR_BOTTOM_LEFT_CORNER
	CURSOR_INHERIT             = C.GLUT_CURSOR_INHERIT
	CURSOR_NONE                = C.GLUT_CURSOR_NONE
	CURSOR_FULL_CROSSHAIR      = C.GLUT_CURSOR_FULL_CROSSHAIR
)

the SetCursor parameters

View Source
const (
	KEY_REPEAT_OFF     = C.GLUT_KEY_REPEAT_OFF
	KEY_REPEAT_ON      = C.GLUT_KEY_REPEAT_ON
	KEY_REPEAT_DEFAULT = C.GLUT_KEY_REPEAT_DEFAULT
	JOYSTICK_BUTTON_A  = C.GLUT_JOYSTICK_BUTTON_A
	JOYSTICK_BUTTON_B  = C.GLUT_JOYSTICK_BUTTON_B
	JOYSTICK_BUTTON_C  = C.GLUT_JOYSTICK_BUTTON_C
	JOYSTICK_BUTTON_D  = C.GLUT_JOYSTICK_BUTTON_D
)

glut api version >= 4 or xlib implementation >= 13

View Source
const (
	GAME_MODE_ACTIVE          = C.GLUT_GAME_MODE_ACTIVE
	GAME_MODE_POSSIBLE        = C.GLUT_GAME_MODE_POSSIBLE
	GAME_MODE_WIDTH           = C.GLUT_GAME_MODE_WIDTH
	GAME_MODE_HEIGHT          = C.GLUT_GAME_MODE_HEIGHT
	GAME_MODE_PIXEL_DEPTH     = C.GLUT_GAME_MODE_PIXEL_DEPTH
	GAME_MODE_REFRESH_RATE    = C.GLUT_GAME_MODE_REFRESH_RATE
	GAME_MODE_DISPLAY_CHANGED = C.GLUT_GAME_MODE_DISPLAY_CHANGED
)

glut api version >= 4 or xlib implementation >= 13

Variables

This section is empty.

Functions

func AddMenuEntry

func AddMenuEntry(name string, value int)

func AddSubMenu

func AddSubMenu(name string, menuId int)

func AttachMenu

func AttachMenu(button int)

func BitmapCharacter

func BitmapCharacter(font int, character rune)

func BitmapLength

func BitmapLength(font int, s string) int

glut api version >= 4 or xlib implementation >= 11

func BitmapWidth

func BitmapWidth(font int, character rune) int

func ButtonBoxFunc

func ButtonBoxFunc(buttonBox func(button, state int))

func ChangeToMenuEntry

func ChangeToMenuEntry(entry int, name string, value int)

func ChangeToSubMenu

func ChangeToSubMenu(entry int, name string, menuId int)

func CopyColormap

func CopyColormap(windowId int)

func CreateMenu

func CreateMenu(menu func(value int)) (menuId int)

func CreateSubWindow

func CreateSubWindow(windowId, x, y, width, height int) (subWindowId int)

func CreateWindow

func CreateWindow(title string) (windowId int)

func DestroyMenu

func DestroyMenu(menuId int)

func DestroyWindow

func DestroyWindow(windowId int)

func DetachMenu

func DetachMenu(button int)

func DeviceGet

func DeviceGet(type_ int) int

func DialsFunc

func DialsFunc(dials func(dial, value int))

func DisplayFunc

func DisplayFunc(display func())

func EnterGameMode

func EnterGameMode() int

glut api version >= 4 or xlib implementation >= 13

func EntryFunc

func EntryFunc(entry func(state int))

func EstablishOverlay

func EstablishOverlay()

func ExtensionSupported

func ExtensionSupported(extension string) (supported bool)

func ForceJoystickFunc

func ForceJoystickFunc()

glut api version >= 4 or xlib implementation >= 13

func FullScreen

func FullScreen()

func GameModeGet

func GameModeGet(mode int) int

glut api version >= 4 or xlib implementation >= 13

func GameModeString

func GameModeString(s string)

glut api version >= 4 or xlib implementation >= 13

func Get

func Get(state int) int

func GetColor

func GetColor(cell, component int) float32

func GetMenu

func GetMenu() (menuId int)

func GetModifiers

func GetModifiers() int

func GetWindow

func GetWindow() (windowId int)

func HideOverlay

func HideOverlay()

func HideWindow

func HideWindow()

func IconifyWindow

func IconifyWindow()

func IdleFunc

func IdleFunc(idle func())

func IgnoreKeyRepeat

func IgnoreKeyRepeat(ignore int)

glut api version >= 4 or xlib implementation >= 13

func Init

func Init()

func InitDisplayMode

func InitDisplayMode(mode uint)

func InitWindowPosition

func InitWindowPosition(width, height int)

func InitWindowSize

func InitWindowSize(width, height int)

func JoystickFunc

func JoystickFunc(joystick func(buttonMask uint, x, y, z int), pollInterval int)

glut api version >= 4 or xlib implementation >= 13

func KeyboardFunc

func KeyboardFunc(keyboard func(key uint8, x, y int))

func KeyboardUpFunc

func KeyboardUpFunc(keyboardUp func(key uint8, x, y int))

glut api version >= 4 or xlib implementation >= 13

func LayerGet

func LayerGet(type_ int) int

func LeaveGameMode

func LeaveGameMode()

glut api version >= 4 or xlib implementation >= 13

func MainLoop

func MainLoop()
func MenuStateFunc(menuState func(status int))
func MenuStatusFunc(menuStatus func(status, x, y int))

func MotionFunc

func MotionFunc(motion func(x, y int))

func MouseFunc

func MouseFunc(mouse func(button, state, x, y int))

func OverlayDisplayFunc

func OverlayDisplayFunc(overlayDisplay func())

func PassiveMotionFunc

func PassiveMotionFunc(passiveMotion func(x, y int))

func PopWindow

func PopWindow()

func PositionWindow

func PositionWindow(x, y int)

func PostOverlayRedisplay

func PostOverlayRedisplay()

func PostRedisplay

func PostRedisplay()

func PostWindowOverlayRedisplay

func PostWindowOverlayRedisplay(windowId int)

glut api version >= 4 or xlib implementation >= 11

func PostWindowRedisplay

func PostWindowRedisplay(windowId int)

glut api version >= 4 or xlib implementation >= 11

func PushWindow

func PushWindow()

func RemoveMenuItem

func RemoveMenuItem(entry int, name string, menuId int)

func RemoveOverlay

func RemoveOverlay()

func ReportErrors

func ReportErrors()

glut api version >= 4 or xlib implementation >= 9

func ReshapeFunc

func ReshapeFunc(reshape func(width, height int))

func ReshapeWindow

func ReshapeWindow(width, height int)

func SetColor

func SetColor(cell int, red, green, blue float32)

func SetCursor

func SetCursor(cursor int)

func SetIconTitle

func SetIconTitle(title string)

func SetKeyRepeat

func SetKeyRepeat(repeatMode int)

glut api version >= 4 or xlib implementation >= 13

func SetMenu

func SetMenu(menuId int)

func SetWindow

func SetWindow(windowId int)

func SetWindowTitle

func SetWindowTitle(title string)

func SetupVideoResizing

func SetupVideoResizing()

glut api version >= 4 or xlib implementation >= 9

func ShowOverlay

func ShowOverlay()

func ShowWindow

func ShowWindow()

func SolidCone

func SolidCone(base, height float64, slices, stacks int)

func SolidCube

func SolidCube(size float64)

func SolidDodecahedron

func SolidDodecahedron()

func SolidIcosahedron

func SolidIcosahedron()

func SolidOctahedron

func SolidOctahedron()

func SolidSphere

func SolidSphere(radius float64, slices, stacks int)

func SolidTeapot

func SolidTeapot(size float64)

func SolidTetrahedron

func SolidTetrahedron()

func SolidTorus

func SolidTorus(innerRadius, outerRadius float64, nsides, rings int)

func SpaceballButtonFunc

func SpaceballButtonFunc(spaceballButton func(button, state int))

func SpaceballMotionFunc

func SpaceballMotionFunc(spaceballMotion func(x, y, z int))

func SpaceballRotateFunc

func SpaceballRotateFunc(spaceballRotate func(x, y, z int))

func SpecialFunc

func SpecialFunc(special func(key, x, y int))

func SpecialUpFunc

func SpecialUpFunc(specialUp func(key, x, y int))

glut api version >= 4 or xlib implementation >= 13

func StopVideoResizing

func StopVideoResizing()

glut api version >= 4 or xlib implementation >= 9

func StrokeCharacter

func StrokeCharacter(font int, character rune)

func StrokeLength

func StrokeLength(font int, s string) int

glut api version >= 4 or xlib implementation >= 11

func StrokeWidth

func StrokeWidth(font int, character rune) int

func SwapBuffers

func SwapBuffers()

func TabletButtonFunc

func TabletButtonFunc(tabletButton func(button, state, x, y int))

func TabletMotionFunc

func TabletMotionFunc(tabletMotion func(x, y int))

func TimerFunc

func TimerFunc(msecs int, timer func(timerId int), timerId int)

Do not register a second timer with the same id, before the first run out. timer should not be nil.

func UseLayer

func UseLayer(layer int)

Use glut.NORMAL or glut.OVERLAY as layer.

func VideoPan

func VideoPan(x, y, width, height int)

glut api version >= 4 or xlib implementation >= 9

func VideoResize

func VideoResize(x, y, width, height int)

glut api version >= 4 or xlib implementation >= 9

func VideoResizeGet

func VideoResizeGet(param int) int

glut api version >= 4 or xlib implementation >= 9

func VisibilityFunc

func VisibilityFunc(visibility func(state int))

func WarpPointer

func WarpPointer(x, y int)

glut api version >= 4 or xlib implementation >= 11

func WindowStatusFunc

func WindowStatusFunc(windowStatus func(state int))

glut api version >= 4 or xlib implementation >= 9

func WireCone

func WireCone(base, height float64, slices, stacks int)

func WireCube

func WireCube(size float64)

func WireDodecahedron

func WireDodecahedron()

func WireIcosahedron

func WireIcosahedron()

func WireOctahedron

func WireOctahedron()

func WireSphere

func WireSphere(radius float64, slices, stacks int)

func WireTeapot

func WireTeapot(size float64)

func WireTetrahedron

func WireTetrahedron()

func WireTorus

func WireTorus(innerRadius, outerRadius float64, nsides, rings int)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL