Coder Social home page Coder Social logo

arthurknauer / raylib-go Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gen2brain/raylib-go

1.0 1.0 0.0 29.34 MB

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

License: zlib License

C 84.92% Go 15.08%

raylib-go's Introduction

logo

raylib-go

Build Status GoDoc Go Report Card Examples

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

Requirements

Ubuntu
X11
apt-get install libgl1-mesa-dev libxi-dev libxcursor-dev libxrandr-dev libxinerama-dev 
Wayland
apt-get install libgl1-mesa-dev libwayland-dev libxkbcommon-dev 
Fedora
X11
dnf install mesa-libGL-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel
Wayland
dnf install mesa-libGL-devel wayland-devel libxkbcommon-devel
macOS

On macOS you need Xcode or Command Line Tools for Xcode.

Windows

On Windows you need C compiler, like Mingw-w64 or TDM-GCC. You can also build binary in MSYS2 shell.

Android

Android example.

Raspberry Pi

RPi example.

Installation

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

Build tags

  • drm - build for Linux native mode, including Raspberry Pi 4 and other devices (PLATFORM_DRM)
  • rpi - build for Raspberry Pi platform (PLATFORM_RPI)
  • wayland - build against Wayland libraries
  • noaudio - disables audio functions
  • opengl43 - uses OpenGL 4.3 backend
  • opengl21 - uses OpenGL 2.1 backend (default is 3.3 on desktop)
  • opengl11 - uses OpenGL 1.1 backend (pseudo OpenGL 1.1 style)
  • angle - uses OpenGL ES 2.0 backend (can be used to link against Google's ANGLE)

Documentation

Documentation on GoDoc. Also check raylib cheatsheet.

Example

package main

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

func main() {
	rl.InitWindow(800, 450, "raylib [core] example - basic window")
	defer rl.CloseWindow()
	rl.SetTargetFPS(60)

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

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

		rl.EndDrawing()
	}
}

Check more examples organized by raylib modules.

License

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

raylib-go's People

Contributors

gen2brain avatar konstantin8105 avatar jupiterrider avatar kfsone avatar xzebra avatar justinclift avatar juan-medina avatar zykatious avatar antonskwr avatar r0l1 avatar chrisphp avatar egonelbre avatar weldeondotwav avatar fivemoreminix avatar iszla avatar alessandrojcm avatar nehpe avatar jotoh98 avatar jakecoffman avatar andygeiss avatar koteyur avatar stanim avatar solarlune avatar sciencemarc avatar kidawagh avatar polera avatar fholmqvist avatar jsh32 avatar chilicat avatar alireza-ta avatar

Stargazers

Hendrik Striepe avatar

Watchers

Hendrik Striepe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.