Compare commits
No commits in common. "d8ae2ca4c6685eb7f7dcdd2162de9be13f1d5d4f" and "9187e8acd642b65284ab8190c999f72dc899700f" have entirely different histories.
d8ae2ca4c6
...
9187e8acd6
7 changed files with 19369 additions and 27 deletions
|
@ -26,21 +26,20 @@ jobs:
|
||||||
cargo-tools-
|
cargo-tools-
|
||||||
|
|
||||||
- name: 🦀 Install Rust toolchain
|
- name: 🦀 Install Rust toolchain
|
||||||
if: steps.cache-tools.outputs.cache-hit != 'true'
|
|
||||||
uses: https://github.com/actions-rs/toolchain@v1
|
uses: https://github.com/actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
components: rust-src
|
components: rust-src
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
- name: 📦 Install Build Tools
|
- name: 📦 Install Zig and cargo-zigbuild
|
||||||
if: steps.cache-tools.outputs.cache-hit != 'true'
|
if: steps.cache-tools.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
mkdir -p /tmp/zig
|
mkdir -p /tmp/zig
|
||||||
cd /tmp/zig
|
cd /tmp/zig
|
||||||
curl -Lo zig-linux-x86_64.tar.xz https://ziglang.org/builds/zig-linux-x86_64-0.15.0-dev.377+f01833e03.tar.xz
|
curl -Lo zig-linux-x86_64.tar.xz https://ziglang.org/builds/zig-linux-x86_64-0.15.0-dev.377+f01833e03.tar.xz
|
||||||
tar -Jxf zig-linux-x86_64.tar.xz -C /tmp/zig --strip-components=1
|
tar -Jxf zig-linux-x86_64.tar.xz -C /tmp/zig --strip-components=1
|
||||||
cargo install cargo-zigbuild cargo-xwin --force
|
cargo install cargo-zigbuild
|
||||||
|
|
||||||
cargo-test:
|
cargo-test:
|
||||||
name: 🧪 Run Cargo Tests
|
name: 🧪 Run Cargo Tests
|
||||||
|
@ -69,7 +68,7 @@ jobs:
|
||||||
components: rust-src
|
components: rust-src
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
- name: 🌋 Install Vulkan tools
|
- name: 🦀 Install Vulkan tools
|
||||||
run: |
|
run: |
|
||||||
apt update
|
apt update
|
||||||
apt install -y vulkan-tools glslc
|
apt install -y vulkan-tools glslc
|
||||||
|
@ -91,23 +90,17 @@ jobs:
|
||||||
target:
|
target:
|
||||||
- x86_64-unknown-linux-gnu
|
- x86_64-unknown-linux-gnu
|
||||||
- aarch64-unknown-linux-gnu
|
- aarch64-unknown-linux-gnu
|
||||||
- x86_64-pc-windows-msvc
|
# - x86_64-pc-windows-msvc
|
||||||
include:
|
include:
|
||||||
- target: x86_64-unknown-linux-gnu
|
- target: x86_64-unknown-linux-gnu
|
||||||
binary_name: zenyx-x86_64-linux
|
binary_name: zenyx-x86_64-linux
|
||||||
ext: ""
|
ext: ""
|
||||||
command: zigbuild
|
|
||||||
args: --target x86_64-unknown-linux-gnu --release
|
|
||||||
- target: aarch64-unknown-linux-gnu
|
- target: aarch64-unknown-linux-gnu
|
||||||
binary_name: zenyx-aarch64-linux
|
binary_name: zenyx-aarch64-linux
|
||||||
ext: ""
|
ext: ""
|
||||||
command: zigbuild
|
# - target: x86_64-pc-windows-msvc
|
||||||
args: --target aarch64-unknown-linux-gnu --release
|
# binary_name: zenyx-x86_64-windows-msvc.exe
|
||||||
- target: x86_64-pc-windows-msvc
|
# ext: ".exe"
|
||||||
binary_name: zenyx-x86_64-windows-msvc
|
|
||||||
ext: ".exe"
|
|
||||||
command: xwin
|
|
||||||
args: build --target x86_64-pc-windows-msvc --release
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 📥 Checkout source
|
- name: 📥 Checkout source
|
||||||
|
@ -144,7 +137,7 @@ jobs:
|
||||||
key: cargo-${{ hashFiles('**/Cargo.lock') }}
|
key: cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
cargo-
|
cargo-
|
||||||
- name: 🌋 Install Vulkan tools
|
- name: 🦀 Install Vulkan tools
|
||||||
run: |
|
run: |
|
||||||
apt update
|
apt update
|
||||||
apt install -y vulkan-tools glslc
|
apt install -y vulkan-tools glslc
|
||||||
|
@ -152,13 +145,17 @@ jobs:
|
||||||
- name: 🚀 Build release binary
|
- name: 🚀 Build release binary
|
||||||
uses: https://github.com/actions-rs/cargo@v1
|
uses: https://github.com/actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: ${{ matrix.command }}
|
command: zigbuild
|
||||||
args: ${{ matrix.args }}
|
args: --target ${{ matrix.target }} --release
|
||||||
|
|
||||||
- name: 📦 Package artifact
|
- name: 📦 Package artifact
|
||||||
run: |
|
run: |
|
||||||
mkdir -p artifacts
|
mkdir -p artifacts
|
||||||
cp target/${{ matrix.target }}/release/zenyx${{ matrix.ext }} artifacts/${{ matrix.binary_name }}
|
cp target/${{ matrix.target }}/release/zenyx${{ matrix.ext }} artifacts/${{ matrix.binary_name }}
|
||||||
|
ls
|
||||||
|
du -sh artifacts
|
||||||
|
ls -lah artifacts
|
||||||
|
ls -lah target/${{ matrix.target }}/release
|
||||||
|
|
||||||
- name: ⬆️ Upload artifact
|
- name: ⬆️ Upload artifact
|
||||||
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
||||||
|
|
2
.gitattributes
vendored
2
.gitattributes
vendored
|
@ -1,2 +0,0 @@
|
||||||
*.obj filter=lfs diff=lfs merge=lfs -text
|
|
||||||
*.mtl filter=lfs diff=lfs merge=lfs -text
|
|
22
Pumpkin.mtl
Normal file
22
Pumpkin.mtl
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# Blender 4.2.3 LTS MTL File: 'None'
|
||||||
|
# www.blender.org
|
||||||
|
|
||||||
|
newmtl Material.001
|
||||||
|
Ns 0.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Kd 0.800000 0.800000 0.800000
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.500000
|
||||||
|
d 1.000000
|
||||||
|
illum 1
|
||||||
|
|
||||||
|
newmtl Material.003
|
||||||
|
Ns 0.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Kd 0.800000 0.800000 0.800000
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.500000
|
||||||
|
d 1.000000
|
||||||
|
illum 1
|
19331
Pumpkin.obj
Normal file
19331
Pumpkin.obj
Normal file
File diff suppressed because it is too large
Load diff
BIN
assets/Pumpkin.mtl
(Stored with Git LFS)
BIN
assets/Pumpkin.mtl
(Stored with Git LFS)
Binary file not shown.
BIN
assets/Pumpkin.obj
(Stored with Git LFS)
BIN
assets/Pumpkin.obj
(Stored with Git LFS)
Binary file not shown.
|
@ -142,7 +142,7 @@ struct WgpuState {
|
||||||
}
|
}
|
||||||
|
|
||||||
static _ICON: &[u8] = include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/assets/Badge.png"));
|
static _ICON: &[u8] = include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/assets/Badge.png"));
|
||||||
static _PUMPKIN: &[u8] = include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/assets/Pumpkin.obj"));
|
static _PUMPKIN: &[u8] = include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/Pumpkin.obj"));
|
||||||
|
|
||||||
impl WgpuState {
|
impl WgpuState {
|
||||||
fn new() -> Self {
|
fn new() -> Self {
|
||||||
|
@ -305,7 +305,7 @@ impl WgpuState {
|
||||||
|
|
||||||
surface.configure(&device, &surface_config);
|
surface.configure(&device, &surface_config);
|
||||||
let pumpkin = model::Model::load_obj(
|
let pumpkin = model::Model::load_obj(
|
||||||
&mut BufReader::new(std::fs::File::open("assets/Pumpkin.obj").unwrap()),
|
&mut BufReader::new(std::fs::File::open("Pumpkin.obj").unwrap()),
|
||||||
&device,
|
&device,
|
||||||
&queue,
|
&queue,
|
||||||
&texture_bind_group_layout,
|
&texture_bind_group_layout,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue