Skip to content

aimlabmu/raylib-go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

raylib-go Build Status GoDoc Go Report Card

Golang bindings for raylib, a simple and easy-to-use library to learn videogames programming.

screenshot

Modified cgo file to work on Raspberry Pi 3 Model B with Raspbian Stretch

Requirements

Ubuntu
apt-get install libopenal-dev libxi-dev libxinerama-dev libxcursor-dev libxxf86vm-dev
Fedora
dnf install openal-soft-devel mesa-libGL-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel
OS X

On OS X system OpenAL framework is used.

Windows (MSYS2)
pacman -S mingw-w64-x86_64-openal mingw-w64-x86_64-gcc mingw-w64-x86_64-go git
Android

Android example.

Raspberry Pi

RPi example.

Installation

go get -v github.com/gen2brain/raylib-go/raylib

Example

package main

import "github.com/gen2brain/raylib-go/raylib"

func main() {
	raylib.InitWindow(800, 450, "raylib [core] example - basic window")

	raylib.SetTargetFPS(60)

	for !raylib.WindowShouldClose() {
		raylib.BeginDrawing()

		raylib.ClearBackground(raylib.RayWhite)

		raylib.DrawText("Congrats! You created your first window!", 190, 200, 20, raylib.LightGray)

		raylib.EndDrawing()
	}

	raylib.CloseWindow()
}

Check more examples organized by raylib modules.

License

raylib-go is licensed under an unmodified zlib/libpng license. View LICENSE.

About

Go bindings for raylib, a simple and easy-to-use library to learn videogames programming.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 76.5%
  • Go 23.0%
  • Other 0.5%