aboutsummaryrefslogtreecommitdiff
path: root/examples/render-bsp
diff options
context:
space:
mode:
authortcmal <me@aria.rip>2024-08-25 17:44:23 +0100
committertcmal <me@aria.rip>2024-08-25 17:44:23 +0100
commit47a0c0317cc774c19b78582bec9b5b09d56f569a (patch)
treed03471ea4e084ace9b95a2c5b7febb780b45bb63 /examples/render-bsp
parentfb996488aa651cb2e7f46abc083c4318b47e77cd (diff)
feat(render): draw passes
Diffstat (limited to 'examples/render-bsp')
-rw-r--r--examples/render-bsp/Cargo.toml20
-rw-r--r--examples/render-bsp/data/newtest.bspbin66488 -> 0 bytes
-rw-r--r--examples/render-bsp/data/newtest.map110
-rw-r--r--examples/render-bsp/data/test.bspbin63640 -> 0 bytes
-rw-r--r--examples/render-bsp/data/test.map116
-rw-r--r--examples/render-bsp/src/main.rs183
6 files changed, 0 insertions, 429 deletions
diff --git a/examples/render-bsp/Cargo.toml b/examples/render-bsp/Cargo.toml
deleted file mode 100644
index bdbab89..0000000
--- a/examples/render-bsp/Cargo.toml
+++ /dev/null
@@ -1,20 +0,0 @@
-[package]
-name = "render-bsp"
-version = "0.1.0"
-authors = ["Oscar <oscar.shrimpton.personal@gmail.com>"]
-edition = "2018"
-
-[dependencies]
-stockton-render = { path = "../../stockton-render", features = ["vulkan"] }
-stockton-input = { path = "../../stockton-input" }
-stockton-input-codegen = { path = "../../stockton-input-codegen" }
-stockton-types = { path = "../../stockton-types" }
-stockton-levels = { path = "../../stockton-levels" }
-stockton-contrib = { path = "../../stockton-contrib", features = ["delta_time", "flycam"] }
-winit = "^0.21"
-log = "0.4.0"
-simplelog = "^0.10"
-image = "0.23.2"
-egui = "^0.12"
-legion = { version = "^0.3" }
-anyhow = "1.0.40"
diff --git a/examples/render-bsp/data/newtest.bsp b/examples/render-bsp/data/newtest.bsp
deleted file mode 100644
index a89f408..0000000
--- a/examples/render-bsp/data/newtest.bsp
+++ /dev/null
Binary files differ
diff --git a/examples/render-bsp/data/newtest.map b/examples/render-bsp/data/newtest.map
deleted file mode 100644
index 8ad8889..0000000
--- a/examples/render-bsp/data/newtest.map
+++ /dev/null
@@ -1,110 +0,0 @@
-// entity 0
-{
-"classname" "worldspawn"
-"_q3map2_cmdline" "-meta; -vis -saveprt; -light -fast -filter"
-"_q3map2_version" "2.5.17n-git-7d2c6f1a"
-// brush 0
-{
-( -192 0 0 ) ( -192 256 0 ) ( -192 0 256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 192 0 0 ) ( 192 -256 0 ) ( 192 0 256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 0 -208 0 ) ( 0 -208 -256 ) ( -256 -208 0 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 0 176 0 ) ( 0 176 256 ) ( -256 176 0 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( -192 176 256 ) ( -192 -208 256 ) ( 192 -208 256 ) skies/toxicskydim 0 0 0 0.5 0.5 0 0 0
-( 0 0 320 ) ( 256 0 320 ) ( 0 -256 320 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-}
-// brush 1
-{
-( 192 -208 256 ) ( 192 -208 192 ) ( 192 176 192 ) base_floor/concrete 0 0 0 0.5 0.5 0 0 0
-( 256 0 0 ) ( 256 -256 0 ) ( 256 0 256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 0 -208 0 ) ( 0 -208 -256 ) ( -256 -208 0 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 0 176 0 ) ( 0 176 256 ) ( -256 176 0 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 192 176 192 ) ( 192 -208 192 ) ( 256 -208 192 ) base_floor/concrete 0 0 0 0.5 0.5 0 0 0
-( 0 0 256 ) ( 256 0 256 ) ( 0 -256 256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-}
-// brush 2
-{
-( -192 0 0 ) ( -192 256 0 ) ( -192 0 256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 256 0 0 ) ( 256 -256 0 ) ( 256 0 256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 0 -272 0 ) ( 0 -272 -256 ) ( -256 -272 0 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( -192 -208 256 ) ( -192 -208 192 ) ( 256 -208 192 ) base_floor/concrete 0 0 0 0.5 0.5 0 0 0
-( -192 -208 192 ) ( -192 -272 192 ) ( 256 -272 192 ) base_floor/concrete 0 0 0 0.5 0.5 0 0 0
-( 0 0 256 ) ( 256 0 256 ) ( 0 -256 256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-}
-// brush 3
-{
-( -256 0 0 ) ( -256 256 0 ) ( -256 0 256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( -192 176 256 ) ( -192 176 192 ) ( -192 -272 192 ) base_floor/concrete 0 0 -0 0.5 0.5 0 0 0
-( 0 -272 0 ) ( 0 -272 -256 ) ( -256 -272 0 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 0 176 0 ) ( 0 176 256 ) ( -256 176 0 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( -256 176 192 ) ( -256 -272 192 ) ( -192 -272 192 ) base_floor/concrete 0 0 0 0.5 0.5 0 0 0
-( 0 0 256 ) ( 256 0 256 ) ( 0 -256 256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-}
-// brush 4
-{
-( -256 0 0 ) ( -256 256 0 ) ( -256 0 256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 256 0 0 ) ( 256 -256 0 ) ( 256 0 256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 256 176 256 ) ( 256 176 192 ) ( -256 176 192 ) base_floor/concrete 0 0 -0 0.5 0.5 0 0 0
-( 0 240 0 ) ( 0 240 256 ) ( -256 240 0 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( -256 240 192 ) ( -256 176 192 ) ( 256 176 192 ) base_floor/concrete 0 0 0 0.5 0.5 0 0 0
-( 0 0 256 ) ( 256 0 256 ) ( 0 -256 256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-}
-// brush 5
-{
-( -256 0 0 ) ( -256 256 0 ) ( -256 0 256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 256 0 0 ) ( 256 -256 0 ) ( 256 0 256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 0 -336 0 ) ( 0 -336 -256 ) ( -256 -336 0 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( -256 -272 192 ) ( -256 -272 -256 ) ( 256 -272 -256 ) base_wall/bluemetal2 0 0 0 0.5 0.5 0 0 0
-( 0 0 -256 ) ( -256 0 -256 ) ( 0 -256 -256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 0 0 192 ) ( 256 0 192 ) ( 0 -256 192 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-}
-// brush 6
-{
-( -256 0 0 ) ( -256 256 0 ) ( -256 0 256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 256 0 0 ) ( 256 -256 0 ) ( 256 0 256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 256 240 192 ) ( 256 240 -256 ) ( -256 240 -256 ) base_wall/bluemetal2 0 0 -0 0.5 0.5 0 0 0
-( 0 304 0 ) ( 0 304 256 ) ( -256 304 0 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 0 0 -256 ) ( -256 0 -256 ) ( 0 -256 -256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 0 0 192 ) ( 256 0 192 ) ( 0 -256 192 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-}
-// brush 7
-{
-( -320 0 0 ) ( -320 256 0 ) ( -320 0 256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( -256 240 192 ) ( -256 240 -256 ) ( -256 -272 -256 ) base_wall/bluemetal2 0 0 -0 0.5 0.5 0 0 0
-( 0 -272 0 ) ( 0 -272 -256 ) ( -256 -272 0 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 0 240 0 ) ( 0 240 256 ) ( -256 240 0 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 0 0 -256 ) ( -256 0 -256 ) ( 0 -256 -256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 0 0 192 ) ( 256 0 192 ) ( 0 -256 192 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-}
-// brush 8
-{
-( 256 -272 192 ) ( 256 -272 -256 ) ( 256 240 -256 ) base_wall/bluemetal2 0 0 0 0.5 0.5 0 0 0
-( 320 0 0 ) ( 320 -256 0 ) ( 320 0 256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 0 -272 0 ) ( 0 -272 -256 ) ( -256 -272 0 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 0 240 0 ) ( 0 240 256 ) ( -256 240 0 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 0 0 -256 ) ( -256 0 -256 ) ( 0 -256 -256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 0 0 192 ) ( 256 0 192 ) ( 0 -256 192 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-}
-// brush 9
-{
-( -256 0 0 ) ( -256 256 0 ) ( -256 0 256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 256 0 0 ) ( 256 -256 0 ) ( 256 0 256 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 0 -272 0 ) ( 0 -272 -256 ) ( -256 -272 0 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 0 240 0 ) ( 0 240 256 ) ( -256 240 0 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( 0 0 -320 ) ( -256 0 -320 ) ( 0 -256 -320 ) common/caulk 0 0 0 0.25 0.25 0 0 0
-( -256 -272 -256 ) ( -256 240 -256 ) ( 256 240 -256 ) base_floor/clang_floor2 0 0 -0 0.5 0.5 0 0 0
-}
-// brush 10
-{
-( 192 64 64 ) ( 192 0 64 ) ( 128 64 64 ) gothic_trim/gothgrate2 0 0 0 0.5 0.5 0 0 0
-( 192 64 64 ) ( 128 64 64 ) ( 192 64 -576 ) gothic_trim/newskull 0 -0 0 0.5 0.5 0 0 0
-( 192 64 56 ) ( 192 64 -584 ) ( 192 0 56 ) gothic_trim/tower_top 0 496 0 0.5 0.5 0 0 0
-( 144 0 0 ) ( 208 0 0 ) ( 144 64 0 ) gothic_trim/pitted_rust3_dkred 480 0 0 0.5 0.5 0 0 0
-( 128 0 -576 ) ( 128 0 64 ) ( 192 0 -576 ) gothic_trim/metalsupport4b 0 -0 0 0.5 0.5 0 0 0
-( 128 0 -576 ) ( 128 64 -576 ) ( 128 0 64 ) gothic_trim/metalsupport4i_bit 0 -0 0 0.5 0.5 0 0 0
-}
-}
-// entity 1
-{
-"classname" "info_player_start"
-"origin" "-8.000000 -6.000000 15.000000"
-}
diff --git a/examples/render-bsp/data/test.bsp b/examples/render-bsp/data/test.bsp
deleted file mode 100644
index 2aa0334..0000000
--- a/examples/render-bsp/data/test.bsp
+++ /dev/null
Binary files differ
diff --git a/examples/render-bsp/data/test.map b/examples/render-bsp/data/test.map
deleted file mode 100644
index 9f4915f..0000000
--- a/examples/render-bsp/data/test.map
+++ /dev/null
@@ -1,116 +0,0 @@
-// Generated by Q3Map2 (ydnar) -convert -format map
-// entity 0
-{
- "classname" "worldspawn"
- "_q3map2_cmdline" "-meta; -vis -saveprt; -light -fast -filter"
- "_q3map2_version" "2.5.17n-git-7d2c6f1a"
-
- // brush 0
- {
- ( -192.000 0.000 0.000 ) ( -192.000 256.000 0.000 ) ( -192.000 0.000 256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 192.000 0.000 0.000 ) ( 192.000 -256.000 0.000 ) ( 192.000 0.000 256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 0.000 -208.000 0.000 ) ( 0.000 -208.000 -256.000 ) ( -256.000 -208.000 0.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 0.000 176.000 0.000 ) ( 0.000 176.000 256.000 ) ( -256.000 176.000 0.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( -192.000 176.000 256.000 ) ( -192.000 -208.000 256.000 ) ( 192.000 -208.000 256.000 ) skies/toxicskydim 0.00000000 0.00000000 0.00000000 0.50000000 0.50000000 0 0 0
- ( 0.000 0.000 320.000 ) ( 256.000 0.000 320.000 ) ( 0.000 -256.000 320.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- }
-
- // brush 1
- {
- ( 192.000 -208.000 256.000 ) ( 192.000 -208.000 192.000 ) ( 192.000 176.000 192.000 ) base_floor/concrete 0.00000000 0.00000000 0.00000000 0.50000000 0.50000000 0 0 0
- ( 256.000 0.000 0.000 ) ( 256.000 -256.000 0.000 ) ( 256.000 0.000 256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 0.000 -208.000 0.000 ) ( 0.000 -208.000 -256.000 ) ( -256.000 -208.000 0.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 0.000 176.000 0.000 ) ( 0.000 176.000 256.000 ) ( -256.000 176.000 0.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 192.000 176.000 192.000 ) ( 192.000 -208.000 192.000 ) ( 256.000 -208.000 192.000 ) base_floor/concrete 0.00000000 0.00000000 0.00000000 0.50000000 0.50000000 0 0 0
- ( 0.000 0.000 256.000 ) ( 256.000 0.000 256.000 ) ( 0.000 -256.000 256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- }
-
- // brush 2
- {
- ( -192.000 0.000 0.000 ) ( -192.000 256.000 0.000 ) ( -192.000 0.000 256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 256.000 0.000 0.000 ) ( 256.000 -256.000 0.000 ) ( 256.000 0.000 256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 0.000 -272.000 0.000 ) ( 0.000 -272.000 -256.000 ) ( -256.000 -272.000 0.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( -192.000 -208.000 256.000 ) ( -192.000 -208.000 192.000 ) ( 256.000 -208.000 192.000 ) base_floor/concrete 0.00000000 0.00000000 0.00000000 0.50000000 0.50000000 0 0 0
- ( -192.000 -208.000 192.000 ) ( -192.000 -272.000 192.000 ) ( 256.000 -272.000 192.000 ) base_floor/concrete 0.00000000 0.00000000 0.00000000 0.50000000 0.50000000 0 0 0
- ( 0.000 0.000 256.000 ) ( 256.000 0.000 256.000 ) ( 0.000 -256.000 256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- }
-
- // brush 3
- {
- ( -256.000 0.000 0.000 ) ( -256.000 256.000 0.000 ) ( -256.000 0.000 256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( -192.000 176.000 256.000 ) ( -192.000 176.000 192.000 ) ( -192.000 -272.000 192.000 ) base_floor/concrete 0.00000000 0.00000000 -0.00000000 0.50000000 0.50000000 0 0 0
- ( 0.000 -272.000 0.000 ) ( 0.000 -272.000 -256.000 ) ( -256.000 -272.000 0.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 0.000 176.000 0.000 ) ( 0.000 176.000 256.000 ) ( -256.000 176.000 0.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( -256.000 176.000 192.000 ) ( -256.000 -272.000 192.000 ) ( -192.000 -272.000 192.000 ) base_floor/concrete 0.00000000 0.00000000 0.00000000 0.50000000 0.50000000 0 0 0
- ( 0.000 0.000 256.000 ) ( 256.000 0.000 256.000 ) ( 0.000 -256.000 256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- }
-
- // brush 4
- {
- ( -256.000 0.000 0.000 ) ( -256.000 256.000 0.000 ) ( -256.000 0.000 256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 256.000 0.000 0.000 ) ( 256.000 -256.000 0.000 ) ( 256.000 0.000 256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 256.000 176.000 256.000 ) ( 256.000 176.000 192.000 ) ( -256.000 176.000 192.000 ) base_floor/concrete 0.00000000 0.00000000 -0.00000000 0.50000000 0.50000000 0 0 0
- ( 0.000 240.000 0.000 ) ( 0.000 240.000 256.000 ) ( -256.000 240.000 0.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( -256.000 240.000 192.000 ) ( -256.000 176.000 192.000 ) ( 256.000 176.000 192.000 ) base_floor/concrete 0.00000000 0.00000000 0.00000000 0.50000000 0.50000000 0 0 0
- ( 0.000 0.000 256.000 ) ( 256.000 0.000 256.000 ) ( 0.000 -256.000 256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- }
-
- // brush 5
- {
- ( -256.000 0.000 0.000 ) ( -256.000 256.000 0.000 ) ( -256.000 0.000 256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 256.000 0.000 0.000 ) ( 256.000 -256.000 0.000 ) ( 256.000 0.000 256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 0.000 -336.000 0.000 ) ( 0.000 -336.000 -256.000 ) ( -256.000 -336.000 0.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( -256.000 -272.000 192.000 ) ( -256.000 -272.000 -256.000 ) ( 256.000 -272.000 -256.000 ) base_wall/bluemetal2 0.00000000 0.00000000 0.00000000 0.50000000 0.50000000 0 0 0
- ( 0.000 0.000 -256.000 ) ( -256.000 0.000 -256.000 ) ( 0.000 -256.000 -256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 0.000 0.000 192.000 ) ( 256.000 0.000 192.000 ) ( 0.000 -256.000 192.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- }
-
- // brush 6
- {
- ( -256.000 0.000 0.000 ) ( -256.000 256.000 0.000 ) ( -256.000 0.000 256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 256.000 0.000 0.000 ) ( 256.000 -256.000 0.000 ) ( 256.000 0.000 256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 256.000 240.000 192.000 ) ( 256.000 240.000 -256.000 ) ( -256.000 240.000 -256.000 ) base_wall/bluemetal2 0.00000000 0.00000000 -0.00000000 0.50000000 0.50000000 0 0 0
- ( 0.000 304.000 0.000 ) ( 0.000 304.000 256.000 ) ( -256.000 304.000 0.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 0.000 0.000 -256.000 ) ( -256.000 0.000 -256.000 ) ( 0.000 -256.000 -256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 0.000 0.000 192.000 ) ( 256.000 0.000 192.000 ) ( 0.000 -256.000 192.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- }
-
- // brush 7
- {
- ( -320.000 0.000 0.000 ) ( -320.000 256.000 0.000 ) ( -320.000 0.000 256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( -256.000 240.000 192.000 ) ( -256.000 240.000 -256.000 ) ( -256.000 -272.000 -256.000 ) base_wall/bluemetal2 0.00000000 0.00000000 -0.00000000 0.50000000 0.50000000 0 0 0
- ( 0.000 -272.000 0.000 ) ( 0.000 -272.000 -256.000 ) ( -256.000 -272.000 0.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 0.000 240.000 0.000 ) ( 0.000 240.000 256.000 ) ( -256.000 240.000 0.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 0.000 0.000 -256.000 ) ( -256.000 0.000 -256.000 ) ( 0.000 -256.000 -256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 0.000 0.000 192.000 ) ( 256.000 0.000 192.000 ) ( 0.000 -256.000 192.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- }
-
- // brush 8
- {
- ( 256.000 -272.000 192.000 ) ( 256.000 -272.000 -256.000 ) ( 256.000 240.000 -256.000 ) base_wall/bluemetal2 0.00000000 0.00000000 0.00000000 0.50000000 0.50000000 0 0 0
- ( 320.000 0.000 0.000 ) ( 320.000 -256.000 0.000 ) ( 320.000 0.000 256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 0.000 -272.000 0.000 ) ( 0.000 -272.000 -256.000 ) ( -256.000 -272.000 0.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 0.000 240.000 0.000 ) ( 0.000 240.000 256.000 ) ( -256.000 240.000 0.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 0.000 0.000 -256.000 ) ( -256.000 0.000 -256.000 ) ( 0.000 -256.000 -256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 0.000 0.000 192.000 ) ( 256.000 0.000 192.000 ) ( 0.000 -256.000 192.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- }
-
- // brush 9
- {
- ( -256.000 0.000 0.000 ) ( -256.000 256.000 0.000 ) ( -256.000 0.000 256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 256.000 0.000 0.000 ) ( 256.000 -256.000 0.000 ) ( 256.000 0.000 256.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 0.000 -272.000 0.000 ) ( 0.000 -272.000 -256.000 ) ( -256.000 -272.000 0.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 0.000 240.000 0.000 ) ( 0.000 240.000 256.000 ) ( -256.000 240.000 0.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( 0.000 0.000 -320.000 ) ( -256.000 0.000 -320.000 ) ( 0.000 -256.000 -320.000 ) common/caulk 0.00000000 0.00000000 0.00000000 0.25000000 0.25000000 0 0 0
- ( -256.000 -272.000 -256.000 ) ( -256.000 240.000 -256.000 ) ( 256.000 240.000 -256.000 ) base_floor/clang_floor2 0.00000000 0.00000000 -0.00000000 0.50000000 0.50000000 0 0 0
- }
-
-}
-
-// entity 1
-{
- "classname" "info_player_start"
- "origin" "-8.000000 -6.000000 15.000000"
-
-}
-
diff --git a/examples/render-bsp/src/main.rs b/examples/render-bsp/src/main.rs
deleted file mode 100644
index 73475c0..0000000
--- a/examples/render-bsp/src/main.rs
+++ /dev/null
@@ -1,183 +0,0 @@
-//! Renders ./example.bsp
-
-#[macro_use]
-extern crate stockton_input_codegen;
-
-#[macro_use]
-extern crate legion;
-
-use anyhow::{Context, Result};
-use log::warn;
-use std::collections::BTreeMap;
-use std::fs::File;
-use std::io::Read;
-use std::path::Path;
-use winit::{event::Event, event_loop::EventLoop, window::WindowBuilder};
-
-use egui::{containers::CentralPanel, Frame};
-use stockton_contrib::delta_time::*;
-use stockton_contrib::flycam::*;
-
-use stockton_input::{Axis, InputManager, Mouse};
-use stockton_levels::prelude::*;
-
-use stockton_render::error::full_error_display;
-use stockton_render::systems::*;
-use stockton_render::{Renderer, UiState, WindowEvent};
-
-use stockton_types::components::{CameraSettings, Transform};
-use stockton_types::{Session, Vector3};
-
-type MapFile = ();
-
-#[derive(InputManager, Default, Clone, Debug)]
-struct MovementInputs {
- #[axis]
- x: Axis,
-
- #[axis]
- y: Axis,
-
- #[axis]
- z: Axis,
-}
-
-impl FlycamInput for MovementInputs {
- fn get_x_axis(&self) -> &Axis {
- &self.x
- }
- fn get_y_axis(&self) -> &Axis {
- &self.y
- }
- fn get_z_axis(&self) -> &Axis {
- &self.z
- }
-}
-
-#[system]
-fn hello_world(#[resource] ui: &mut UiState) {
- CentralPanel::default()
- .frame(Frame::none())
- .show(ui.ctx(), |ui| {
- ui.heading("Hello, World!");
- });
-}
-
-fn main() {
- if let Err(err) = try_main() {
- eprintln!("{}", full_error_display(err));
- }
-}
-
-fn try_main() -> Result<()> {
- // Initialise logger
- simplelog::TermLogger::init(
- log::LevelFilter::Debug,
- simplelog::ConfigBuilder::new()
- .set_max_level(log::LevelFilter::Debug)
- .set_thread_mode(simplelog::ThreadLogMode::Names)
- .build(),
- simplelog::TerminalMode::Stderr,
- simplelog::ColorChoice::Auto,
- )
- .context("Error initialising logger")?;
-
- // Make a window
- let event_loop = EventLoop::new();
- let window = WindowBuilder::new()
- .build(&event_loop)
- .context("Error creating window")?;
-
- if window.set_cursor_grab(true).is_err() {
- warn!("warning: cursor not grabbed");
- }
- window.set_cursor_visible(false);
-
- // TODO: Parse the map file
- let map = todo!();
-
- // Create the UI State
- let mut ui = UiState::new();
-
- // Create the renderer
- let (renderer, tx) = Renderer::new(&window)?;
- let new_control_flow = renderer.update_control_flow.clone();
-
- // Populate the initial UI state
- ui.populate_initial_state(&renderer);
-
- // Create the input manager
- let manager = {
- use stockton_input::InputMutation::*;
- use MovementInputsFields::*;
-
- let mut actions = BTreeMap::new();
-
- actions.insert(17, (Z, PositiveAxis)); // W
- actions.insert(30, (X, NegativeAxis)); // A
- actions.insert(31, (Z, NegativeAxis)); // S
- actions.insert(32, (X, PositiveAxis)); // D
- actions.insert(29, (Y, NegativeAxis)); // Ctrl
- actions.insert(57, (Y, PositiveAxis)); // Space
-
- MovementInputsManager::new(actions)
- };
-
- // Load everything into the session
- let mut session = Session::new(
- move |resources| {
- resources.insert(ui);
- resources.insert(map);
- resources.insert(manager);
- resources.insert(Timing::default());
- resources.insert(Mouse::default());
- },
- move |schedule| {
- schedule
- .add_system(update_deltatime_system())
- .add_system(process_window_events_system::<MovementInputsManager, MapFile>())
- .flush()
- .add_system(hello_world_system())
- .add_system(flycam_move_system::<MovementInputsManager>())
- .flush();
- },
- );
-
- // Add our player entity
- let _player = session.world.push((
- Transform {
- position: Vector3::new(0.0, 0.0, 0.0),
- rotation: Vector3::new(0.0, 0.0, 0.0),
- },
- CameraSettings {
- far: 1024.0,
- fov: 90.0,
- near: 0.1,
- },
- FlycamControlled::new(512.0, 400.0),
- ));
-
- // Done loading - This is our main loop.
- // It just communicates events to the session and continuously ticks
- event_loop.run(move |event, _, flow| {
- match event {
- Event::MainEventsCleared => {
- window.request_redraw();
- }
- Event::RedrawRequested(_) => session.do_update(),
- _ => {
- if let Some(we) = WindowEvent::from(&event) {
- tx.send(we).unwrap()
- }
- }
- }
-
- // Update the control flow if the session has requested it.
- {
- let new_control_flow = new_control_flow.read().unwrap();
- if *new_control_flow != *flow {
- *flow = *new_control_flow;
- }
- };
- });
-}