{"id":19511647,"url":"https://github.com/thecodetherapy/graylib","last_synced_at":"2025-02-25T23:15:35.187Z","repository":{"id":253672871,"uuid":"844177592","full_name":"TheCodeTherapy/graylib","owner":"TheCodeTherapy","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-26T11:03:02.000Z","size":12473,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-08T11:49:21.690Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheCodeTherapy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-18T16:05:24.000Z","updated_at":"2024-08-26T11:03:05.000Z","dependencies_parsed_at":"2024-11-10T23:35:35.734Z","dependency_job_id":null,"html_url":"https://github.com/TheCodeTherapy/graylib","commit_stats":null,"previous_names":["thecodetherapy/graylib"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCodeTherapy%2Fgraylib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCodeTherapy%2Fgraylib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCodeTherapy%2Fgraylib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCodeTherapy%2Fgraylib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheCodeTherapy","download_url":"https://codeload.github.com/TheCodeTherapy/graylib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240761143,"owners_count":19853256,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T23:22:04.945Z","updated_at":"2025-02-25T23:15:35.054Z","avatar_url":"https://github.com/TheCodeTherapy.png","language":"C","readme":"## graylib\n\n[![Build Status](https://github.com/TheCodeTherapy/graylib/actions/workflows/build.yml/badge.svg)](https://github.com/TheCodeTherapy/graylib/actions)\n[![GoDoc](https://godoc.org/github.com/TheCodeTherapy/graylib/raylib?status.svg)](https://godoc.org/github.com/TheCodeTherapy/graylib/raylib)\n[![Examples](https://img.shields.io/badge/learn%20by-examples-0077b3.svg?style=flat-square)](https://github.com/TheCodeTherapy/graylib/tree/master/examples)\n\nGolang bindings for [raylib](http://www.raylib.com/), a simple and easy-to-use library to enjoy videogames programming.\n\n\u003e This repository is a fork of [raylib-go](https://github.com/gen2brain/raylib-go), that I want to maintain myself to be able to customize the bindings to my needs without ever worrying about upstream changes.\n\nraylib C source code is included and compiled together with bindings. Note that the first build can take a few minutes.\n\nIt is also possible to use graylib without cgo (Windows only; see requirements below).\n\n### Requirements\n\n##### Ubuntu\n\n    apt-get install libgl1-mesa-dev libxi-dev libxcursor-dev libxrandr-dev libxinerama-dev libwayland-dev libxkbcommon-dev\n\n##### Fedora\n\n    dnf install mesa-libGL-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel wayland-devel libxkbcommon-devel\n\n##### macOS\n\nOn macOS you need Xcode or Command Line Tools for Xcode.\n\n##### Windows\n\n###### cgo\n\nOn Windows you need C compiler, like [Mingw-w64](https://mingw-w64.org) or [TDM-GCC](http://tdm-gcc.tdragon.net/).\nYou can also build binary in [MSYS2](https://msys2.github.io/) shell.\n\nTo remove console window, build with `-ldflags \"-H=windowsgui\"`.\n\n###### purego (without cgo, i.e. CGO_ENABLED=0)\n\nDownload the raylib.dll from the assets on the [releases page](https://github.com/raysan5/raylib/releases). It is contained in the `raylib-*_win64_msvc*.zip`.\nPut the raylib.dll into the root folder of your project or copy it into `C:\\Windows\\System32` for a system-wide installation.\n\nAs of November 15, 2023, raylib 5.0 is the required version.\n\nIt is also possible to build the DLL yourself. You can find more info at [raylib's wiki](https://github.com/raysan5/raylib/wiki/Working-on-Windows).\n\n##### Android\n\n[Android example](https://github.com/TheCodeTherapy/graylib/tree/master/examples/others/android/example).\n\n### Installation\n\n    go get -v -u github.com/TheCodeTherapy/graylib/raylib\n\n### Build tags\n\n* `drm` - build for Linux native [DRM](https://en.wikipedia.org/wiki/Direct_Rendering_Manager) mode, including Raspberry Pi 4 and other devices (PLATFORM_DRM)\n* `sdl` - build for [SDL](https://github.com/libsdl-org/SDL) backend (PLATFORM_DESKTOP_SDL)\n* `rgfw` - build for [RGFW](https://github.com/ColleagueRiley/RGFW) backend (PLATFORM_DESKTOP_RGFW)\n* `noaudio` - disables audio functions\n* `opengl43` - uses OpenGL 4.3 backend\n* `opengl21` - uses OpenGL 2.1 backend (default is 3.3 on desktop)\n* `opengl11` - uses OpenGL 1.1 backend (pseudo OpenGL 1.1 style)\n* `es2` - uses OpenGL ES 2.0 backend (can be used to link against [Google's ANGLE](https://github.com/google/angle))\n* `es3` - experimental support for OpenGL ES 3.0\n* `x11` - force X11 compatibility mode on Wayland (PLATFORM_DESKTOP/GLFW)\n\n### Example\n\n```go\npackage main\n\nimport rl \"github.com/TheCodeTherapy/graylib/raylib\"\n\nfunc main() {\n\trl.InitWindow(800, 450, \"raylib [core] example - basic window\")\n\tdefer rl.CloseWindow()\n\n\trl.SetTargetFPS(60)\n\n\tfor !rl.WindowShouldClose() {\n\t\trl.BeginDrawing()\n\n\t\trl.ClearBackground(rl.RayWhite)\n\t\trl.DrawText(\"Congrats! You created your first window!\", 190, 200, 20, rl.LightGray)\n\n\t\trl.EndDrawing()\n\t}\n}\n```\n\nCheck more [examples](https://github.com/TheCodeTherapy/graylib/tree/master/examples) organized by raylib modules.\n\n### Cross-compile (Linux)\n\nTo cross-compile for Windows install [MinGW](https://www.mingw-w64.org/) toolchain.\n\n```\n$ CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 go build -ldflags \"-s -w\"\n$ file basic_window.exe\nbasic_window.exe: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows, 11 sections\n\n$ CGO_ENABLED=1 CC=i686-w64-mingw32-gcc GOOS=windows GOARCH=386 go build -ldflags \"-s -w\"\n$ file basic_window.exe\nbasic_window.exe: PE32 executable (console) Intel 80386 (stripped to external PDB), for MS Windows, 9 sections\n```\n\nTo cross-compile for macOS install [OSXCross](https://github.com/tpoechtrager/osxcross) toolchain.\n\n```\n$ CGO_ENABLED=1 CC=x86_64-apple-darwin21.1-clang GOOS=darwin GOARCH=amd64 go build -ldflags \"-linkmode external -s -w '-extldflags=-mmacosx-version-min=10.15'\"\n$ file basic_window\nbasic_window: Mach-O 64-bit x86_64 executable, flags:\u003cNOUNDEFS|DYLDLINK|TWOLEVEL\u003e\n\n$ CGO_ENABLED=1 CC=aarch64-apple-darwin21.1-clang GOOS=darwin GOARCH=arm64 go build -ldflags \"-linkmode external -s -w '-extldflags=-mmacosx-version-min=12.0.0'\"\n$ file basic_window\nbasic_window: Mach-O 64-bit arm64 executable, flags:\u003cNOUNDEFS|DYLDLINK|TWOLEVEL|PIE\u003e\n```\n\n### License\n\ngraylib is licensed under an unmodified zlib/libpng license. View [LICENSE](https://github.com/TheCodeTherapy/graylib/blob/main/LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodetherapy%2Fgraylib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecodetherapy%2Fgraylib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodetherapy%2Fgraylib/lists"}