Versions in this module Expand all Collapse all v1 v1.3.1 Oct 16, 2024 v1.3.0 Nov 15, 2023 v1.1.2 Oct 10, 2020 Changes in this version + var ColorOpaque = Color type Color + A uint8 + B uint8 + G uint8 + R uint8 + func NewColor3(r uint8, g uint8, b uint8) Color + func NewColor4(r uint8, g uint8, b uint8, a uint8) Color + func (c *Color) GetAsInt() int type Font + func (f *Font) Drawv(str string, v Vec2, c Color) type Region + H int + W int + X int + Y int + func (r *Region) IsInside(v Vec2) bool type SpriteSheet + func NewSpriteSheetFromSurface(s *Surface, tileWidth, tileHeight int) (*SpriteSheet, error) type Surface + func (s *Surface) Clear(c Color) + func (s *Surface) DrawRegionv(v Vec2, r Region) + func (s *Surface) Drawv(v Vec2) + func (s *Surface) GetPixelv(v Vec2) Color + func (s *Surface) IsInside(x, y int) bool + func (s *Surface) IsInsidev(v Vec2) bool + func (s *Surface) SetPixelv(v Vec2, c Color) + type Vec2 struct + X int + Y int + func NewVec2(x int, y int) Vec2 + func (v *Vec2) Abs() Vec2 + func (v *Vec2) ClipInside2(a Vec2, b Vec2) + func (v *Vec2) Clone() Vec2 + func (v *Vec2) Distance(v2 Vec2) float64 + func (v *Vec2) IsInside(a Vec2) bool + func (v *Vec2) IsInside2(a Vec2, b Vec2) bool + func (v *Vec2) Lerp(t float64, target Vec2) Vec2 + func (v *Vec2) Sub(v2 *Vec2) *Vec2 + func (v *Vec2) Subi(i int) *Vec2 + type Vec2f struct + X float64 + Y float64 + func NewVec2f(x, y float64) Vec2f type Window + func (w *Window) ResetKeyCallback() + func (w *Window) SetKeyCallback(cbfun glfw.KeyCallback) v1.1.1 Sep 24, 2020 v1.1.0 Sep 21, 2020 v1.0.3 Sep 20, 2020 v1.0.2 May 10, 2020 v1.0.0 Apr 18, 2020 v0 v0.1.0 Sep 21, 2020 Changes in this version + const InputUnknown + const Key0 + const Key1 + const Key2 + const Key3 + const Key4 + const Key5 + const Key6 + const Key7 + const Key8 + const Key9 + const KeyA + const KeyAlt + const KeyApostrophe + const KeyB + const KeyBackslash + const KeyBackspace + const KeyC + const KeyCapsLock + const KeyComma + const KeyControl + const KeyD + const KeyDelete + const KeyDown + const KeyE + const KeyEnd + const KeyEnter + const KeyEqual + const KeyEscape + const KeyF + const KeyF1 + const KeyF10 + const KeyF11 + const KeyF12 + const KeyF13 + const KeyF14 + const KeyF15 + const KeyF16 + const KeyF17 + const KeyF18 + const KeyF19 + const KeyF2 + const KeyF20 + const KeyF21 + const KeyF22 + const KeyF23 + const KeyF24 + const KeyF25 + const KeyF3 + const KeyF4 + const KeyF5 + const KeyF6 + const KeyF7 + const KeyF8 + const KeyF9 + const KeyG + const KeyGraveAccent + const KeyH + const KeyHome + const KeyI + const KeyInsert + const KeyJ + const KeyK + const KeyKp0 + const KeyKp1 + const KeyKp2 + const KeyKp3 + const KeyKp4 + const KeyKp5 + const KeyKp6 + const KeyKp7 + const KeyKp8 + const KeyKp9 + const KeyKpAdd + const KeyKpDecimal + const KeyKpDivide + const KeyKpEnter + const KeyKpEqual + const KeyKpMultiply + const KeyKpSubtract + const KeyL + const KeyLast + const KeyLeft + const KeyLeftAlt + const KeyLeftBracket + const KeyLeftControl + const KeyLeftShift + const KeyLeftSuper + const KeyM + const KeyMenu + const KeyMinus + const KeyN + const KeyNumLock + const KeyO + const KeyP + const KeyPageDown + const KeyPageUp + const KeyPause + const KeyPeriod + const KeyPrintScreen + const KeyQ + const KeyR + const KeyRight + const KeyRightAlt + const KeyRightBracket + const KeyRightControl + const KeyRightShift + const KeyRightSuper + const KeyS + const KeyScrollLock + const KeySemicolon + const KeyShift + const KeySlash + const KeySpace + const KeySuper + const KeyT + const KeyTab + const KeyU + const KeyUp + const KeyV + const KeyW + const KeyWorld1 + const KeyWorld2 + const KeyX + const KeyY + const KeyZ + const MouseButtonLeft + const MouseButtonMiddle + const MouseButtonRight + var ColorBlack = Color + var ColorWhite = Color + type Color struct + func NewColor(r uint8, g uint8, b uint8, a uint8) Color + func (c *Color) GL() + func (c *Color) GLClear() + type Font struct + Handle *gltext.Font + func NewFont(filename string, size int32) (*Font, error) + func (f *Font) Draw(str string, x int, y int, c Color) + type Point2 struct + X float32 + Y float32 + func NewPoint2(x float32, y float32) Point2 + func (p *Point2) GL() + type Region struct + func NewRegion(x int, y int, w int, h int) Region + type SpriteSheet struct + func NewSpriteSheetFromFile(file string) (*SpriteSheet, error) + func (s *SpriteSheet) DrawTile(x int, y int, tileX int, tileY int) + func (s *SpriteSheet) Release() + func (s *SpriteSheet) SetTileSize(width int, height int) + func (s *SpriteSheet) Surface() *Surface + type Surface struct + FlipHorizontal bool + FlipVertical bool + Height int + Rotation float32 + Scale int + Width int + func NewSurface(width int, height int) *Surface + func NewSurfaceFromBytes(width int, height int, bytes *[]byte) *Surface + func NewSurfaceFromFile(file string) (*Surface, error) + func (s *Surface) Draw(x int, y int) + func (s *Surface) DrawRegion(x int, y int, r Region) + func (s *Surface) GetPixel(x int, y int) Color + func (s *Surface) Release() + func (s *Surface) SetPixel(x int, y int, c Color) + type Texture struct + Handle uint32 + Height int + Name string + Width int + func NewTextureFromBytes(width int, height int, pixels *[]byte) *Texture + func (t *Texture) Bind() + func (t *Texture) Release() + func (t *Texture) Update(width int, height int, pixels *[]byte) + type Window struct + Fullscreen bool + Height int + Width int + func NewWindow(name string, width int, height int, fullscreen bool) *Window + func (w *Window) Clear(c Color) + func (w *Window) Destroy() + func (w *Window) FinalizeFrame() + func (w *Window) GetCursorPos() Point2 + func (w *Window) GetDeltaTimeMs() int64 + func (w *Window) GetFPS() float32 + func (w *Window) GetTotalElapsedMs() int64 + func (w *Window) IsInput(inputCode int) bool + func (w *Window) IsRunning() bool + func (w *Window) StartFrame() + func (w *Window) Stop()