Skip to content

WIP: 4.5.0 + various redesign #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 32 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9861415
Started on raylib 4.0, builds and runs most samples in both windows a…
Rover656 Jan 25, 2022
864c0c0
Fix non-async build for samples, allows audio to work
Rover656 Jan 26, 2022
0765bda
Read desc
Rover656 Jan 26, 2022
d6455cd
Fixed a couple of things
Rover656 Jan 29, 2022
6b0d5d8
Merge pull request #114 from Rover656/port-4.0
Dacode45 Feb 5, 2022
e73346e
Merge
Dacode45 Nov 13, 2022
b20d463
building raylib-sys
Dacode45 Nov 13, 2022
74aae17
Raylib building
Dacode45 Nov 13, 2022
eb2d40f
adding ci
Dacode45 Nov 13, 2022
5464ae2
just windows right now
Dacode45 Nov 13, 2022
241d6bf
WIP 4.5.0+redesign
TSnake41 Jan 28, 2023
ee35237
Replace renderloop with frame(), no longer expect mutable handles
TSnake41 Mar 11, 2023
04c925d
Fix some demos
TSnake41 Mar 18, 2023
931999f
WIP 4.5.0 redesign
TSnake41 Mar 25, 2023
9e3dbdc
Work in progress complete overhaul.
TSnake41 Mar 25, 2023
a54e4b8
Some cleanup/reorganization, blocklist math stuff into mint (less pai…
TSnake41 Mar 25, 2023
fc5236d
Formating changes and implement some missing functions.
TSnake41 Mar 26, 2023
187ddc2
Rework Begin*Mode in a similar way than for BeginDrawing.
TSnake41 Mar 30, 2023
361e613
Add myself to contributors.
TSnake41 Mar 30, 2023
d826b68
Working PR
Dacode45 Apr 1, 2023
9ca4c64
Adding Contribution
Dacode45 Apr 1, 2023
6c32d31
Update Camera for 4.5, fix 3d_camera_first_person and drawing for 3D
TSnake41 Apr 2, 2023
cca849d
Merge remote-tracking branch 'origin/4-5-minor-changes' into 4.5.0-re…
TSnake41 Apr 2, 2023
1633d87
Rename frame/mode functions to begin_*.
TSnake41 Apr 5, 2023
e7dd01d
Make Font functions actually public.
TSnake41 Apr 5, 2023
98c8def
Update raylib-test/Cargo.toml version
TSnake41 Apr 5, 2023
278940c
Update raylib-test/Cargo.toml version
TSnake41 Apr 5, 2023
7c9fe91
Make "bounded wrapper" lifetime a bit more consistent
TSnake41 Apr 6, 2023
c1695a8
Added and reviewed raygui, add some missing impl Into and other small…
TSnake41 Apr 15, 2023
76169e7
Add Image::get_pixel
TSnake41 Jun 10, 2023
76f6f06
Add RaylibDraw::draw_texture_pro.
TSnake41 Jun 24, 2023
1de83d4
Add basic example, update README.
TSnake41 Oct 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: CI

on:
pull_request:
push:

jobs:
test:
strategy:
matrix:
# os: [windows-latest, ubuntu-latest, macos-latest]
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-build-stable-${{ hashFiles('**/Cargo.toml') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
if: runner.os == 'linux'
- name: Build & run tests
run: cargo test
all-doc-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ubuntu-latest-cargo-build-stable-${{ hashFiles('**/Cargo.toml') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: Run doc tests with all features (this also compiles README examples)
run: cargo test --doc --all-features
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ubuntu-latest-cargo-build-stable-${{ hashFiles('**/Cargo.toml') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
override: true
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: Run clippy
run: cargo clippy --workspace --all-targets --all-features
- name: Check format
run: cargo fmt --all -- --check
15 changes: 0 additions & 15 deletions .github/workflows/rust.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[submodule "raylib-sys/raylib"]
path = raylib-sys/raylib
url = https://github.com/raysan5/raylib
branch = "4.5.0"

[submodule "raylib-sys/raygui"]
path = raylib-sys/raygui
url = https://github.com/raysan5/raygui
branch = "master"
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[workspace]
members = ["raylib", "raylib-sys", "raylib-test", "samples", "showcase"]
members = ["raylib", "raylib-sys", "samples"]
1 change: 1 addition & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# License

Copyright (c) 2018-2019 Paul Clement (@deltaphc)
Copyright (c) 2023 Teddy Astie (@tsnake41)

This software is provided "as-is", without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,21 @@ fn main() {
- In C, `LoadFontData` returns a pointer to a heap-allocated array of `CharInfo` structs. In this Rust binding, said array is copied into an owned `Vec<CharInfo>`, the original data is freed, and the owned Vec is returned.
- In C, `GetDroppedFiles` returns a pointer to an array of strings owned by raylib. Again, for safety and also ease of use, this binding copies said array into a `Vec<String>` which is returned to the caller.
- I've tried to make linking automatic, though I've only tested on Windows 10, Ubuntu, and MacOS 15. Other platforms may have other considerations.
- OpenGL 3.3, 2.1, and ES 2.0 may be forced via adding `["opengl_33"]`, `["opengl_21"]` or `["opengl_es_20]` to the `features` array in your Cargo.toml dependency definition.

## Building from source

1. Clone repository: `git clone --recurse-submodules`
2. `cargo build`

### If building for Wayland on Linux

3. Install these packages:
`libglfw3-dev wayland-devel libxkbcommon-devel wayland-protocols wayland-protocols-devel libecm-dev`
###### Note that this may not be a comprehensive list, please add details for your distribution or expand on these packages if you believe this to be incomplete.

4. Enable wayland by adding `features=["wayland"]` to your dependency definition

## Cross-compiling using `cross`

The [@rust-embedded](https://github.com/rust-embedded) project provides a handy tool called [`cross`](https://github.com/rust-embedded/cross) that uses docker to cross-compile any cargo project to one of their many [supported platforms](https://github.com/rust-embedded/cross#supported-targets). This tool makes it easy to cross-compile `raylib-rs` for binary distribution (in cases where you are producing a pre-compiled game for example).
Expand Down
Loading