raylib-go

module
v0.0.0-...-2c0b272 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2018 License: Zlib

README

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.

Directories

Path Synopsis
Package easings - Useful easing functions for values animation A port of Robert Penner's easing equations (http://robertpenner.com/easing/)
Package easings - Useful easing functions for values animation A port of Robert Penner's easing equations (http://robertpenner.com/easing/)
examples
Package physics - 2D Physics library for videogames A port of Victor Fisac's physac engine (https://github.com/raysan5/raylib/blob/master/src/physac.h)
Package physics - 2D Physics library for videogames A port of Victor Fisac's physac engine (https://github.com/raysan5/raylib/blob/master/src/physac.h)
Package raygui - Simple and easy-to-use IMGUI (immediate mode GUI API) library
Package raygui - Simple and easy-to-use IMGUI (immediate mode GUI API) library
Package raylib - Go bindings for raylib, a simple and easy-to-use library to learn videogames programming
Package raylib - Go bindings for raylib, a simple and easy-to-use library to learn videogames programming
Package raymath - Some useful functions to work with Vector2, Vector3, Matrix and Quaternions
Package raymath - Some useful functions to work with Vector2, Vector3, Matrix and Quaternions

Jump to

Keyboard shortcuts

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