Compare commits
No commits in common. "master" and "raylib/v0.55.1" have entirely different histories.
master
...
raylib/v0.
210 changed files with 23826 additions and 15987 deletions
143
.github/workflows/build.yml
vendored
Normal file
143
.github/workflows/build.yml
vendored
Normal file
|
@ -0,0 +1,143 @@
|
|||
on: [push, pull_request]
|
||||
name: Build
|
||||
jobs:
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
go-version: [1.21.x]
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Install package
|
||||
run: |
|
||||
sudo apt-get update -y; sudo apt-get -y install libxi-dev libxinerama-dev libxcursor-dev libxrandr-dev libgl1-mesa-dev libwayland-dev libxkbcommon-dev
|
||||
if: runner.os == 'Linux'
|
||||
- name: Build
|
||||
run: go build ./...
|
||||
working-directory: raylib
|
||||
- name: Verify dependencies
|
||||
run: go mod verify
|
||||
working-directory: raylib
|
||||
- name: Build
|
||||
run: go build -v ./...
|
||||
working-directory: raylib
|
||||
- name: Run go vet
|
||||
run: go vet ./...
|
||||
working-directory: raylib
|
||||
- name: Install staticcheck
|
||||
run: go install honnef.co/go/tools/cmd/staticcheck@latest
|
||||
working-directory: raylib
|
||||
- name: Run staticcheck
|
||||
run: staticcheck ./...
|
||||
working-directory: raylib
|
||||
- name: Run tests
|
||||
run: go test -race -vet=off ./...
|
||||
working-directory: raylib
|
||||
|
||||
test-drm:
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.21.x]
|
||||
os: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Install package
|
||||
run: |
|
||||
sudo apt-get update -y; sudo apt-get -y install libegl1-mesa-dev libdrm-dev libgbm-dev
|
||||
- name: Build
|
||||
run: go build -tags drm
|
||||
working-directory: raylib
|
||||
|
||||
test-sdl:
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.21.x]
|
||||
os: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Install package
|
||||
run: |
|
||||
sudo apt-get update -y; sudo apt-get -y install libgl1-mesa-dev libsdl2-dev
|
||||
- name: Build
|
||||
run: go build -tags sdl
|
||||
working-directory: raylib
|
||||
|
||||
test-rgfw:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
go-version: [1.21.x]
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Install package
|
||||
run: |
|
||||
sudo apt-get update -y; sudo apt-get -y install libxi-dev libxinerama-dev libxcursor-dev libxrandr-dev libgl1-mesa-dev libxkbcommon-dev
|
||||
if: runner.os == 'Linux'
|
||||
- name: Build
|
||||
run: go build -tags rgfw
|
||||
working-directory: raylib
|
||||
|
||||
test-purego:
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.21.x]
|
||||
os: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Build
|
||||
run: go build
|
||||
working-directory: raylib
|
||||
env:
|
||||
GOOS: windows
|
||||
|
||||
test-examples:
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.21.x]
|
||||
os: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Install package
|
||||
run: |
|
||||
sudo apt-get update -y; sudo apt-get -y install libxi-dev libxinerama-dev libxcursor-dev libxrandr-dev libgl1-mesa-dev libwayland-dev libxkbcommon-dev
|
||||
- name: Build
|
||||
run: go build ./...
|
||||
working-directory: examples
|
31
README.md
31
README.md
|
@ -1,14 +1,12 @@
|
|||

|
||||

|
||||
## raylib-go
|
||||
[](https://git.terah.dev/UnrealXR/raylib-go/actions)
|
||||
[](https://godoc.org/git.terah.dev/UnrealXR/raylib-go/raylib)
|
||||
[](https://goreportcard.com/report/git.terah.dev/UnrealXR/raylib-go/raylib)
|
||||
[](https://git.terah.dev/UnrealXR/raylib-go/src/branch/master/examples)
|
||||
[](https://github.com/gen2brain/raylib-go/actions)
|
||||
[](https://godoc.org/github.com/gen2brain/raylib-go/raylib)
|
||||
[](https://goreportcard.com/report/github.com/gen2brain/raylib-go/raylib)
|
||||
[](https://github.com/gen2brain/raylib-go/tree/master/examples)
|
||||
|
||||
Golang bindings for [raylib](http://www.raylib.com/), a simple and easy-to-use library to enjoy videogames programming.
|
||||
|
||||
This is a fork of [gen2brain's `raylib-go` bindings](https://github.com/gen2brain/raylib-go) to add [DRM leasing](https://wayland.app/protocols/drm-lease-v1) support.
|
||||
|
||||
raylib C source code is included and compiled together with bindings. Note that the first build can take a few minutes.
|
||||
|
||||
It is also possible to use raylib-go without cgo (Windows only; see requirements below).
|
||||
|
@ -45,22 +43,15 @@ It is also possible to build the DLL yourself. You can find more info at [raylib
|
|||
|
||||
##### Android
|
||||
|
||||
[Android example](https://git.terah.dev/UnrealXR/raylib-go/tree/master/examples/others/android/example).
|
||||
|
||||
##### Wasm
|
||||
|
||||
For web bindings, refer to [Raylib-Go-Wasm](https://github.com/BrownNPC/Raylib-Go-Wasm); it should be largely compatible with this repository.
|
||||
|
||||
[Android example](https://github.com/gen2brain/raylib-go/tree/master/examples/others/android/example).
|
||||
|
||||
### Installation
|
||||
|
||||
go get -v -u git.terah.dev/UnrealXR/raylib-go/raylib
|
||||
go get -v -u github.com/gen2brain/raylib-go/raylib
|
||||
|
||||
### Build tags
|
||||
|
||||
* `drm` - build for Linux native [DRM](https://en.wikipedia.org/wiki/Direct_Rendering_Manager) mode, including Raspberry Pi 4 and other devices (PLATFORM_DRM)
|
||||
* `drm_disable_input` - disables keyboard input capabilities for the DRM backend. Requires the `drm` build tag as a prerequisite
|
||||
* `drm_leasing` - enables Wayland DRM leasing capabilties. Requires the `drm` build tag as a prerequisite
|
||||
* `sdl` - build for [SDL](https://github.com/libsdl-org/SDL) backend (PLATFORM_DESKTOP_SDL)
|
||||
* `sdl3` - build for [SDL3](https://github.com/libsdl-org/SDL) backend (PLATFORM_DESKTOP_SDL3)
|
||||
* `rgfw` - build for [RGFW](https://github.com/ColleagueRiley/RGFW) backend (PLATFORM_DESKTOP_RGFW)
|
||||
|
@ -75,14 +66,14 @@ For web bindings, refer to [Raylib-Go-Wasm](https://github.com/BrownNPC/Raylib-G
|
|||
|
||||
### Documentation
|
||||
|
||||
Documentation on [GoDoc](https://godoc.org/git.terah.dev/UnrealXR/raylib-go/raylib). Also check raylib [cheatsheet](http://www.raylib.com/cheatsheet/cheatsheet.html). If you have problems or need assistance there is an active community in the #raylib-go channel of the [Raylib Discord Server](https://discord.gg/raylib) that can help.
|
||||
Documentation on [GoDoc](https://godoc.org/github.com/gen2brain/raylib-go/raylib). Also check raylib [cheatsheet](http://www.raylib.com/cheatsheet/cheatsheet.html). If you have problems or need assistance there is an active community in the #raylib-go channel of the [Raylib Discord Server](https://discord.gg/raylib) that can help.
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
import rl "github.com/gen2brain/raylib-go/raylib"
|
||||
|
||||
func main() {
|
||||
rl.InitWindow(800, 450, "raylib [core] example - basic window")
|
||||
|
@ -101,7 +92,7 @@ func main() {
|
|||
}
|
||||
```
|
||||
|
||||
Check more [examples](https://git.terah.dev/UnrealXR/raylib-go/tree/master/examples) organized by raylib modules.
|
||||
Check more [examples](https://github.com/gen2brain/raylib-go/tree/master/examples) organized by raylib modules.
|
||||
|
||||
### Cross-compile (Linux)
|
||||
|
||||
|
@ -131,4 +122,4 @@ basic_window: Mach-O 64-bit arm64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|
|
|||
|
||||
### License
|
||||
|
||||
raylib-go is licensed under an unmodified zlib/libpng license. View [LICENSE](https://git.terah.dev/UnrealXR/raylib-go/blob/master/LICENSE).
|
||||
raylib-go is licensed under an unmodified zlib/libpng license. View [LICENSE](https://github.com/gen2brain/raylib-go/blob/master/LICENSE).
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1 KiB |
|
@ -1,4 +1,4 @@
|
|||
## easings [](https://godoc.org/git.terah.dev/UnrealXR/raylib-go/easings)
|
||||
## easings [](https://godoc.org/github.com/gen2brain/raylib-go/easings)
|
||||
|
||||
Useful easing functions for values animation.
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
module git.terah.dev/UnrealXR/raylib-go/easings
|
||||
module github.com/gen2brain/raylib-go/easings
|
||||
|
||||
go 1.21
|
||||
|
|
|
@ -18,7 +18,7 @@ import (
|
|||
"fmt"
|
||||
"math"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const maxCircles = 64
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
rl.InitWindow(800, 450, "raylib [audio] example - music playing (streaming)")
|
||||
rl.InitAudioDevice()
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"math"
|
||||
"time"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
********************************************************************************************/
|
||||
package main
|
||||
|
||||
import rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
import rl "github.com/gen2brain/raylib-go/raylib"
|
||||
|
||||
const (
|
||||
screenWidth = 800
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [core] example - 2d camera mouse zoom
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package main
|
||||
|
||||
import rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
import rl "github.com/gen2brain/raylib-go/raylib"
|
||||
|
||||
const (
|
||||
screenWidth = 800
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const colorCount = 23
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package main
|
||||
|
||||
import "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
import "github.com/gen2brain/raylib-go/raylib"
|
||||
|
||||
func main() {
|
||||
rl.SetConfigFlags(rl.FlagVsyncHint)
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const screenW = int32(1280)
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
rl.InitWindow(800, 450, "raylib [core] example - color selection (collision detection)")
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
/*******************************************************************************************
|
||||
|
|
|
@ -31,7 +31,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
screenWidth := int32(800)
|
||||
screenHeight := int32(450)
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
var (
|
||||
maxGestureStrings int = 20
|
||||
)
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
screenWidth := int32(800)
|
||||
screenHeight := int32(450)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"math"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const screenW = int32(1280)
|
||||
|
|
|
@ -17,7 +17,7 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -15,7 +15,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -16,7 +16,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"image/color"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package main
|
||||
|
||||
import rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
import rl "github.com/gen2brain/raylib-go/raylib"
|
||||
|
||||
const (
|
||||
screenWidth = 850
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -3,9 +3,9 @@ package main
|
|||
import (
|
||||
"strings"
|
||||
|
||||
"git.terah.dev/UnrealXR/raylib-go/easings"
|
||||
"git.terah.dev/UnrealXR/raylib-go/raygui"
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
"github.com/gen2brain/raylib-go/easings"
|
||||
"github.com/gen2brain/raylib-go/raygui"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -18,7 +18,7 @@ package main
|
|||
import (
|
||||
"math"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -4,6 +4,8 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
"runtime"
|
||||
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"math/rand"
|
||||
"time"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -2,8 +2,7 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
// Game settings
|
||||
|
@ -61,6 +60,7 @@ func CheckCollisionSide(ball Ball, paddle Paddle) string {
|
|||
return "none"
|
||||
}
|
||||
|
||||
|
||||
// Initialize the game state
|
||||
func (g *Game) Init() {
|
||||
g.paddle1 = Paddle{
|
||||
|
@ -127,6 +127,7 @@ func (g *Game) Update() {
|
|||
g.ball.Pos.X = g.paddle2.Pos.X - g.ball.Radius
|
||||
}
|
||||
|
||||
|
||||
// Scoring
|
||||
if g.ball.Pos.X < 0 {
|
||||
g.player2Score++
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
snakeLength = 256
|
||||
squareSize = 31
|
||||
|
|
|
@ -2,19 +2,19 @@ module examples
|
|||
|
||||
go 1.21
|
||||
|
||||
replace git.terah.dev/UnrealXR/raylib-go/raylib => ../raylib
|
||||
replace github.com/gen2brain/raylib-go/raylib => ../raylib
|
||||
|
||||
replace git.terah.dev/UnrealXR/raylib-go/raygui => ../raygui
|
||||
replace github.com/gen2brain/raylib-go/raygui => ../raygui
|
||||
|
||||
replace git.terah.dev/UnrealXR/raylib-go/easings => ../easings
|
||||
replace github.com/gen2brain/raylib-go/easings => ../easings
|
||||
|
||||
replace git.terah.dev/UnrealXR/raylib-go/physics => ../physics
|
||||
replace github.com/gen2brain/raylib-go/physics => ../physics
|
||||
|
||||
require (
|
||||
git.terah.dev/UnrealXR/raylib-go/easings v0.0.0-00010101000000-000000000000
|
||||
git.terah.dev/UnrealXR/raylib-go/physics v0.0.0-00010101000000-000000000000
|
||||
git.terah.dev/UnrealXR/raylib-go/raygui v0.0.0-00010101000000-000000000000
|
||||
git.terah.dev/UnrealXR/raylib-go/raylib v0.0.0-20241202103652-5d50abe7c65b
|
||||
github.com/gen2brain/raylib-go/easings v0.0.0-00010101000000-000000000000
|
||||
github.com/gen2brain/raylib-go/physics v0.0.0-00010101000000-000000000000
|
||||
github.com/gen2brain/raylib-go/raygui v0.0.0-00010101000000-000000000000
|
||||
github.com/gen2brain/raylib-go/raylib v0.0.0-20241202103652-5d50abe7c65b
|
||||
github.com/jakecoffman/cp v1.2.1
|
||||
github.com/neguse/go-box2d-lite v0.0.0-20170921151050-5d8ed9b7272b
|
||||
)
|
||||
|
|
|
@ -3,8 +3,8 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
gui "git.terah.dev/UnrealXR/raylib-go/raygui"
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
gui "github.com/gen2brain/raylib-go/raygui"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -3,8 +3,8 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
gui "git.terah.dev/UnrealXR/raylib-go/raygui"
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
gui "github.com/gen2brain/raylib-go/raygui"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
/*******************************************************************************************
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"git.terah.dev/UnrealXR/raylib-go/raygui"
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
"github.com/gen2brain/raylib-go/raygui"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -3,8 +3,8 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
gui "git.terah.dev/UnrealXR/raylib-go/raygui"
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
gui "github.com/gen2brain/raylib-go/raygui"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
/*******************************************************************************************
|
||||
|
|
|
@ -3,8 +3,8 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
gui "git.terah.dev/UnrealXR/raylib-go/raygui"
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
gui "github.com/gen2brain/raylib-go/raygui"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
/*******************************************************************************************
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
********************************************************************************************/package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
********************************************************************************************/
|
||||
package main
|
||||
|
||||
import rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
import rl "github.com/gen2brain/raylib-go/raylib"
|
||||
|
||||
const (
|
||||
screenWidth = 800
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
*
|
||||
* raylib [models] example - first person maze
|
||||
*
|
||||
* This example has been created using raylib-go v0.0.0-20220104071325-2f072dc2d259 (https://git.terah.dev/UnrealXR/raylib-go)
|
||||
* raylib-go is licensed under an unmodified zlib/libpng license (https://git.terah.dev/UnrealXR/raylib-go/blob/master/LICENSE)
|
||||
* This example has been created using raylib-go v0.0.0-20220104071325-2f072dc2d259 (https://github.com/gen2brain/raylib-go)
|
||||
* raylib-go is licensed under an unmodified zlib/libpng license (https://github.com/gen2brain/raylib-go/blob/master/LICENSE)
|
||||
*
|
||||
* Original C version for Raylib 2.5 Copyright (c) 2019 Ramon Santamaria (@raysan5)
|
||||
* Converted to Go by Michael Redman January 4, 2022
|
||||
|
@ -13,7 +13,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
screenWidth := int32(800)
|
||||
screenHeight := int32(450)
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
//"fmt"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"unsafe"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -19,7 +19,7 @@ import (
|
|||
"math"
|
||||
"unsafe"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -122,7 +122,7 @@ func main() {
|
|||
cursorColor := rl.White
|
||||
|
||||
// Get ray and test against objects
|
||||
// See issue : https://git.terah.dev/UnrealXR/raylib-go/issues/457
|
||||
// See issue : https://github.com/gen2brain/raylib-go/issues/457
|
||||
//ray = rl.GetScreenToWorldRay(rl.GetMousePosition(), camera)
|
||||
ray = rl.GetMouseRay(rl.GetMousePosition(), camera)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"slices"
|
||||
"unsafe"
|
||||
|
||||
"git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
var supportedFileTypes = []string{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -17,7 +17,7 @@ package main
|
|||
import (
|
||||
"math"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"path/filepath"
|
||||
"unsafe"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"math"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
package main
|
||||
|
||||
import rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
import rl "github.com/gen2brain/raylib-go/raylib"
|
||||
|
||||
const (
|
||||
screenWidth = 800
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"os"
|
||||
"runtime"
|
||||
|
||||
"git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
// Game states
|
||||
|
|
|
@ -3,13 +3,9 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
// This is the maximum amount of elements (quads) per batch
|
||||
// NOTE: This value is defined in [rlgl] module and can be changed there
|
||||
const maxBatchElements = 8192
|
||||
|
||||
// Bunny type
|
||||
type Bunny struct {
|
||||
Position rl.Vector2
|
||||
|
@ -18,14 +14,15 @@ type Bunny struct {
|
|||
}
|
||||
|
||||
func main() {
|
||||
screenWidth := int32(800)
|
||||
screenHeight := int32(450)
|
||||
screenWidth := int32(1280)
|
||||
screenHeight := int32(960)
|
||||
|
||||
rl.InitWindow(screenWidth, screenHeight, "raylib [others] example - bunnymark")
|
||||
rl.InitWindow(screenWidth, screenHeight, "raylib [core] example - Bunnymark")
|
||||
|
||||
texture := rl.LoadTexture("wabbit_alpha.png")
|
||||
|
||||
bunnies := make([]*Bunny, 0)
|
||||
bunniesCount := 0
|
||||
|
||||
rl.SetTargetFPS(60)
|
||||
|
||||
|
@ -36,11 +33,11 @@ func main() {
|
|||
for i := 0; i < 100; i++ {
|
||||
b := &Bunny{}
|
||||
b.Position = rl.GetMousePosition()
|
||||
b.Speed.X = float32(rl.GetRandomValue(-250, 250)) / 60.0
|
||||
b.Speed.Y = float32(rl.GetRandomValue(-250, 250)) / 60.0
|
||||
b.Color = rl.NewColor(uint8(rl.GetRandomValue(50, 240)), uint8(rl.GetRandomValue(80, 240)), uint8(rl.GetRandomValue(100, 240)), 255)
|
||||
b.Speed.X = float32(rl.GetRandomValue(250, 500)) / 60.0
|
||||
b.Speed.Y = float32(rl.GetRandomValue(250, 500)-500) / 60.0
|
||||
|
||||
bunnies = append(bunnies, b)
|
||||
bunniesCount++
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -49,11 +46,11 @@ func main() {
|
|||
b.Position.X += b.Speed.X
|
||||
b.Position.Y += b.Speed.Y
|
||||
|
||||
if ((b.Position.X + float32(texture.Width/2)) > float32(screenWidth)) || ((b.Position.X + float32(texture.Width/2)) < 0) {
|
||||
if (b.Position.X > float32(screenWidth)) || (b.Position.X < 0) {
|
||||
b.Speed.X *= -1
|
||||
}
|
||||
|
||||
if ((b.Position.Y + float32(texture.Height/2)) > float32(screenHeight)) || ((b.Position.Y + float32(texture.Height/2-40)) < 0) {
|
||||
if (b.Position.Y > float32(screenHeight)) || (b.Position.Y < 0) {
|
||||
b.Speed.Y *= -1
|
||||
}
|
||||
}
|
||||
|
@ -63,20 +60,18 @@ func main() {
|
|||
rl.ClearBackground(rl.RayWhite)
|
||||
|
||||
for _, b := range bunnies {
|
||||
// NOTE: When internal batch buffer limit is reached (MAX_BATCH_ELEMENTS),
|
||||
// a draw call is launched and buffer starts being filled again;
|
||||
// before issuing a draw call, updated vertex data from internal CPU buffer is send to GPU...
|
||||
// Process of sending data is costly and it could happen that GPU data has not been completely
|
||||
// processed for drawing while new data is tried to be sent (updating current in-use buffers)
|
||||
// it could generates a stall and consequently a frame drop, limiting the number of drawn bunnies
|
||||
rl.DrawTexture(texture, int32(b.Position.X), int32(b.Position.Y), b.Color)
|
||||
// NOTE: When internal QUADS batch limit is reached, a draw call is launched and
|
||||
// batching buffer starts being filled again; before launching the draw call,
|
||||
// updated vertex data from internal buffer is send to GPU... it seems it generates
|
||||
// a stall and consequently a frame drop, limiting number of bunnies drawn at 60 fps
|
||||
rl.DrawTexture(texture, int32(b.Position.X), int32(b.Position.Y), rl.RayWhite)
|
||||
}
|
||||
|
||||
rl.DrawRectangle(0, 0, screenWidth, 40, rl.Black)
|
||||
rl.DrawText(fmt.Sprintf("bunnies: %d", len(bunnies)), 120, 10, 20, rl.Green)
|
||||
rl.DrawText(fmt.Sprintf("batched draw calls: %d", 1+len(bunnies)/maxBatchElements), 320, 10, 20, rl.Maroon)
|
||||
rl.DrawRectangle(0, 0, screenWidth, 40, rl.LightGray)
|
||||
rl.DrawText("raylib bunnymark", 10, 10, 20, rl.DarkGray)
|
||||
rl.DrawText(fmt.Sprintf("bunnies: %d", bunniesCount), 400, 10, 20, rl.Red)
|
||||
|
||||
rl.DrawFPS(10, 10)
|
||||
rl.DrawFPS(260, 10)
|
||||
|
||||
rl.EndDrawing()
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"log"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -4,6 +4,8 @@ import (
|
|||
"math"
|
||||
"math/rand"
|
||||
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
|
||||
box2d "github.com/neguse/go-box2d-lite/box2dlite"
|
||||
)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"math"
|
||||
"math/rand"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
"github.com/jakecoffman/cp"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"git.terah.dev/UnrealXR/raylib-go/physics"
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
"github.com/gen2brain/raylib-go/physics"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"git.terah.dev/UnrealXR/raylib-go/physics"
|
||||
"git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
"github.com/gen2brain/raylib-go/physics"
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"git.terah.dev/UnrealXR/raylib-go/physics"
|
||||
"github.com/gen2brain/raylib-go/physics"
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"git.terah.dev/UnrealXR/raylib-go/physics"
|
||||
"git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
"github.com/gen2brain/raylib-go/physics"
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"git.terah.dev/UnrealXR/raylib-go/physics"
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
"github.com/gen2brain/raylib-go/physics"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"unsafe"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
type LightType int32
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"unsafe"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
type LightType int32
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"math"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const MAX_INSTANCES = 100000
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -2,9 +2,8 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
"unsafe"
|
||||
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
)
|
||||
|
||||
type LightType int32
|
||||
|
@ -199,7 +198,7 @@ func (lt *Light) UpdateReflect(cameraPos rl.Vector3) {
|
|||
}
|
||||
|
||||
func (lt *Light) configShader() {
|
||||
lt.Shader = rl.LoadShader("pbr.vs", "./pbr.fs")
|
||||
lt.Shader = rl.LoadShader("pbr.vs","./pbr.fs")
|
||||
}
|
||||
|
||||
// exce before init or set manually
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"reflect"
|
||||
"unsafe"
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
const MaxPostproShaders = 12
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
screenWidth := int32(800)
|
||||
screenHeight := int32(450)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
rl "git.terah.dev/UnrealXR/raylib-go/raylib"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue