mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 23:05:43 +00:00
Merge pull request #571 from tomaka/rm-www
Remove the website prototype
This commit is contained in:
commit
a1d8c93ded
14
.travis.yml
14
.travis.yml
@ -6,10 +6,6 @@ rust:
|
||||
cache:
|
||||
cargo
|
||||
|
||||
before_install:
|
||||
- openssl aes-256-cbc -K $encrypted_68b8d7c1b5be_key -iv $encrypted_68b8d7c1b5be_iv
|
||||
-in ./www/deploy.enc -out www-deploy-key -d
|
||||
|
||||
install:
|
||||
- export CXX="g++-4.8"
|
||||
|
||||
@ -35,7 +31,6 @@ script:
|
||||
- cargo test --no-run -j 1 -v --manifest-path vulkano/Cargo.toml
|
||||
- cargo test --doc -j 1 -v --manifest-path vulkano/Cargo.toml
|
||||
- cargo build -j 1 --manifest-path examples/Cargo.toml
|
||||
- cargo test --manifest-path www/Cargo.toml
|
||||
|
||||
after_success:
|
||||
- |
|
||||
@ -62,12 +57,3 @@ after_success:
|
||||
[ $TRAVIS_BRANCH = master ] &&
|
||||
[ $TRAVIS_PULL_REQUEST = false ] &&
|
||||
cargo publish --token ${CRATESIO_TOKEN} --manifest-path vulkano-shader-derive/Cargo.toml
|
||||
#- |
|
||||
#[ $TRAVIS_BRANCH = master ] &&
|
||||
#[ $TRAVIS_PULL_REQUEST = false ] &&
|
||||
#[ $TRAVIS_RUST_VERSION = stable ] &&
|
||||
#chmod 600 www-deploy-key &&
|
||||
#mv www-deploy-key ~/.ssh/id_rsa &&
|
||||
#ssh -o "StrictHostKeyChecking no" git@push-par-clevercloud-customers.services.clever-cloud.com &&
|
||||
#git remote add deploy git+ssh://git@push-par-clevercloud-customers.services.clever-cloud.com/app_1817cab1-3b09-4501-9c04-85ee2f6b3d76.git &&
|
||||
#git push -f deploy `git subtree split --prefix www`:master
|
||||
|
1
www/.gitignore
vendored
1
www/.gitignore
vendored
@ -1 +0,0 @@
|
||||
target
|
585
www/Cargo.lock
generated
585
www/Cargo.lock
generated
@ -1,585 +0,0 @@
|
||||
[root]
|
||||
name = "vulkano-www"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"markdown 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mustache 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rouille 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ascii"
|
||||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "brotli-sys"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "brotli2"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"brotli-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "buf_redux"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "chrono"
|
||||
version = "0.2.25"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"num 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "chunked_transfer"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "encoding"
|
||||
version = "0.2.33"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding-index-simpchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "encoding-index-japanese"
|
||||
version = "1.20141219.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "encoding-index-korean"
|
||||
version = "1.20141219.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "encoding-index-simpchinese"
|
||||
version = "1.20141219.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "encoding-index-singlebyte"
|
||||
version = "1.20141219.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "encoding-index-tradchinese"
|
||||
version = "1.20141219.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "encoding_index_tests"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "env_logger"
|
||||
version = "0.3.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "filetime"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "flate2"
|
||||
version = "0.2.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gcc"
|
||||
version = "0.3.51"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "idna"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-bidi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "kernel32-sys"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "0.2.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.3.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "markdown"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"pipeline 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "matches"
|
||||
version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "0.1.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mime"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mime_guess"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"mime 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "miniz-sys"
|
||||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "multipart"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"buf_redux 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mime 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mime_guess 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mustache"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num"
|
||||
version = "0.1.39"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"num-integer 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-integer"
|
||||
version = "0.1.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"num-traits 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-iter"
|
||||
version = "0.1.33"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"num-integer 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-traits"
|
||||
version = "0.1.39"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "percent-encoding"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "phf"
|
||||
version = "0.7.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf_codegen"
|
||||
version = "0.7.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf_generator"
|
||||
version = "0.7.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf_shared"
|
||||
version = "0.7.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pipeline"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.3.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.1.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "0.1.80"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "rouille"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"brotli2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"multipart 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"term 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tiny_http 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc-serialize"
|
||||
version = "0.3.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "0.6.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"num 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha1"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "siphasher"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "tempdir"
|
||||
version = "0.3.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "term"
|
||||
version = "0.2.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thread-id"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thread_local"
|
||||
version = "0.2.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "time"
|
||||
version = "0.1.37"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tiny_http"
|
||||
version = "0.5.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"ascii 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"chunked_transfer 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-bidi"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-normalization"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "url"
|
||||
version = "0.2.38"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "url"
|
||||
version = "1.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"idna 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"percent-encoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "utf8-ranges"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "uuid"
|
||||
version = "0.1.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.2.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "winapi-build"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[metadata]
|
||||
"checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66"
|
||||
"checksum ascii 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ae7d751998c189c1d4468cf0a39bb2eae052a9c58d50ebb3b9591ee3813ad50"
|
||||
"checksum brotli-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cb50f54b2e0c671b7ef1637a76237ebacbb293be179440d5d65ca288e42116bb"
|
||||
"checksum brotli2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8c7fec7e6a9ab96d7a91e8b2171606d1a2abce4f804d813dcea0297bc5b07ab7"
|
||||
"checksum buf_redux 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b115bd9935c68b58f80ff867e1c46942c4aed79e78bcc8c2bc22d50f52bb9099"
|
||||
"checksum chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)" = "9213f7cd7c27e95c2b57c49f0e69b1ea65b27138da84a170133fd21b07659c00"
|
||||
"checksum chunked_transfer 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "498d20a7aaf62625b9bf26e637cf7736417cde1d0c99f1d04d1170229a85cf87"
|
||||
"checksum encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec"
|
||||
"checksum encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91"
|
||||
"checksum encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81"
|
||||
"checksum encoding-index-simpchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7"
|
||||
"checksum encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a"
|
||||
"checksum encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18"
|
||||
"checksum encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569"
|
||||
"checksum env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "15abd780e45b3ea4f76b4e9a26ff4843258dd8a3eed2775a0e7368c2e7936c2f"
|
||||
"checksum filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "5363ab8e4139b8568a6237db5248646e5a8a2f89bd5ccb02092182b11fd3e922"
|
||||
"checksum flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)" = "36df0166e856739905cd3d7e0b210fe818592211a008862599845e012d8d304c"
|
||||
"checksum gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)" = "120d07f202dcc3f72859422563522b66fe6463a4c513df062874daad05f85f0a"
|
||||
"checksum idna 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2233d4940b1f19f0418c158509cd7396b8d70a5db5705ce410914dc8fa603b37"
|
||||
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
|
||||
"checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf"
|
||||
"checksum libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)" = "38f5c2b18a287cf78b4097db62e20f43cace381dc76ae5c0a3073067f78b7ddc"
|
||||
"checksum log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b"
|
||||
"checksum markdown 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bdb7e864aa1dccbebb05751e899bc84c639df47490c0c24caf4b1a77770b6566"
|
||||
"checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376"
|
||||
"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20"
|
||||
"checksum mime 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ec0c2f4d901bf1d4a2192a40b4b570ae3b19c51243e549defc1de741940aa787"
|
||||
"checksum mime_guess 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "422acd80644209a8c8c66a20514840d8c092eb1eab2898ca7c548cc1d64c8998"
|
||||
"checksum miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "28eaee17666671fa872e567547e8428e83308ebe5808cdf6a0e28397dbe2c726"
|
||||
"checksum multipart 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b68c9a0c757bd65893af529f7af6e7a71442e57ca6d9db1fa69b79e2f05f6b49"
|
||||
"checksum mustache 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5fa298dfe58b1f1192e0ee455aadb3369e298434652ad99b665439a40265fabd"
|
||||
"checksum num 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "2c3a3dc9f30bf824141521b30c908a859ab190b76e20435fcd89f35eb6583887"
|
||||
"checksum num-integer 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)" = "ef1a4bf6f9174aa5783a9b4cc892cacd11aebad6c69ad027a0b65c6ca5f8aa37"
|
||||
"checksum num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d1891bd7b936f12349b7d1403761c8a0b85a18b148e9da4429d5d102c1a41e"
|
||||
"checksum num-traits 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "1708c0628602a98b52fad936cf3edb9a107af06e52e49fdf0707e884456a6af6"
|
||||
"checksum percent-encoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de154f638187706bde41d9b4738748933d64e6b37bdbffc0b47a97d16a6ae356"
|
||||
"checksum phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "cb325642290f28ee14d8c6201159949a872f220c62af6e110a56ea914fbe42fc"
|
||||
"checksum phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d62594c0bb54c464f633175d502038177e90309daf2e0158be42ed5f023ce88f"
|
||||
"checksum phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "6b07ffcc532ccc85e3afc45865469bf5d9e4ef5bfcf9622e3cfe80c2d275ec03"
|
||||
"checksum phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "07e24b0ca9643bdecd0632f2b3da6b1b89bbb0030e0b992afc1113b23a7bc2f2"
|
||||
"checksum pipeline 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d15b6607fa632996eb8a17c9041cb6071cb75ac057abd45dece578723ea8c7c0"
|
||||
"checksum rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "022e0636ec2519ddae48154b028864bdce4eaf7d35226ab8e65c611be97b189d"
|
||||
"checksum redox_syscall 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "3041aeb6000db123d2c9c751433f526e1f404b23213bd733167ab770c3989b4d"
|
||||
"checksum regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f"
|
||||
"checksum regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957"
|
||||
"checksum rouille 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89740b620f42b14a17a63ee577161da786aa15d08500d331cfb477bbacc8b5ab"
|
||||
"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"
|
||||
"checksum serde 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)" = "c97b18e9e53de541f11e497357d6c5eaeb39f0cb9c8734e274abe4935f6991fa"
|
||||
"checksum sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc30b1e1e8c40c121ca33b86c23308a090d19974ef001b4bf6e61fd1a0fb095c"
|
||||
"checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537"
|
||||
"checksum tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "87974a6f5c1dfb344d733055601650059a3363de2a6104819293baff662132d6"
|
||||
"checksum term 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "f2077e54d38055cf1ca0fd7933a2e00cd3ec8f6fed352b2a377f06dcdaaf3281"
|
||||
"checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03"
|
||||
"checksum thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5"
|
||||
"checksum time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "ffd7ccbf969a892bf83f1e441126968a07a3941c24ff522a26af9f9f4585d1a3"
|
||||
"checksum tiny_http 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)" = "016f040cfc9b5be610de3619eaaa57017fa0b0b678187327bde75fc146e2a41f"
|
||||
"checksum unicode-bidi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a6a2c4e3710edd365cd7e78383153ed739fa31af19f9172f72d3575060f5a43a"
|
||||
"checksum unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "51ccda9ef9efa3f7ef5d91e8f9b83bbe6955f9bf86aec89d5cce2c874625920f"
|
||||
"checksum url 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)" = "cbaa8377a162d88e7d15db0cf110c8523453edcbc5bc66d2b6fffccffa34a068"
|
||||
"checksum url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eeb819346883532a271eb626deb43c4a1bb4c4dd47c519bd78137c3e72a4fe27"
|
||||
"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f"
|
||||
"checksum uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "78c590b5bd79ed10aad8fb75f078a59d8db445af6c743e55c4a53227fc01c13f"
|
||||
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
|
||||
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
|
@ -1,11 +0,0 @@
|
||||
[package]
|
||||
name = "vulkano-www"
|
||||
version = "0.1.0"
|
||||
authors = ["Pierre Krieger <pierre.krieger1708@gmail.com>"]
|
||||
publish = false
|
||||
|
||||
[dependencies]
|
||||
lazy_static = "0.2"
|
||||
markdown = "0.2.0"
|
||||
mustache = "0.8"
|
||||
rouille = "1.0"
|
@ -1,12 +0,0 @@
|
||||
# Source code of the vulkano website
|
||||
|
||||
To run the website, just do:
|
||||
|
||||
```rust
|
||||
ADDR=0.0.0.0:8000 cargo run
|
||||
```
|
||||
|
||||
The `deploy.pub` and `deploy.enc` files are the public and private keys used by travis to deploy
|
||||
the website.
|
||||
|
||||
Note that this subdirectory is not part of the root workspace so that we can commit a `Cargo.lock`.
|
@ -1 +0,0 @@
|
||||
<h3>404 - Not found</h3>
|
@ -1,3 +0,0 @@
|
||||
# Creating a buffer
|
||||
|
||||
|
@ -1,5 +0,0 @@
|
||||
# Introduction to compute operations
|
||||
|
||||
Before going further, let's understand the difference between a CPU and a GPU.
|
||||
|
||||
|
@ -1,30 +0,0 @@
|
||||
# Creating a device
|
||||
|
||||
Now that we have chosen a physical device, it is time to ask it to do something.
|
||||
|
||||
But before we start, a few things need to be explained. Just like it is possible to use multiple
|
||||
threads in your program running on the CPU, it is also possible to run multiple operations in
|
||||
parallel on the physical device. The Vulkan equivalent of a CPU core is a *queue*.
|
||||
|
||||
When we ask the device to perform an operation, we have to submit the command to a specific queue.
|
||||
Some queues support only graphical operations, some others support only compute operations, and
|
||||
some others support both.
|
||||
|
||||
The reason why this is important is that at initialization we need to tell the device which queues
|
||||
we are going to use.
|
||||
|
||||
## Creating a device
|
||||
|
||||
A `Device` object is an open channel of communication with a physical device. It is probably the
|
||||
most important object of the Vulkan API.
|
||||
|
||||
let (device, mut queues) = {
|
||||
Device::new(&physical, physical.supported_features(), &DeviceExtensions::none(), None,
|
||||
[(queue, 0.5)].iter().cloned()).expect("failed to create device")
|
||||
};
|
||||
|
||||
We now have an open channel of communication with a Vulkan device!
|
||||
|
||||
In the rest of this article, we are going to ask the device to copy data from a buffer to
|
||||
another. Copying data is an operation that you do very often in Vulkan, so let's get used
|
||||
to it early.
|
@ -1,53 +0,0 @@
|
||||
# Initialization
|
||||
|
||||
## Creating an instance
|
||||
|
||||
Before you can start using any function from Vulkan and vulkano, the first thing to do is to create
|
||||
an *instance*. Creating an instance tries to load Vulkan from the system and reads the list of
|
||||
available implementations.
|
||||
|
||||
Creating an instance takes three optional parameters which aren't going to cover for now. You can
|
||||
check [the documentation of `Instance`](https://docs.rs/vulkano/0.4/vulkano/instance/struct.Instance.html)
|
||||
for more information.
|
||||
|
||||
use vulkano::instance::Instance;
|
||||
use vulkano::instance::InstanceExtensions;
|
||||
|
||||
let instance = Instance::new(None, &InstanceExtensions::none(), None)
|
||||
.expect("failed to create instance");
|
||||
|
||||
Like many other functions in vulkano, creating an instance returns a `Result`. If Vulkan is not
|
||||
available on the system, this result will contain an error. For the sake of this example we call
|
||||
`expect` on the `Result`, which prints a message to stderr and terminates the application if it
|
||||
contains an error. In a real game or application you should handle that situation in a nicer way,
|
||||
for example by opening a dialog box with an explanation. This is out of scope of this guide.
|
||||
|
||||
Before going further you should try your code by running:
|
||||
|
||||
cargo run
|
||||
|
||||
## Enumerating physical devices
|
||||
|
||||
The machine you run your program on may have multiple devices that support Vulkan. Before we can
|
||||
ask a video card to perform some operations, we have to enumerate all the *physical device*s that
|
||||
support Vulkan and choose which one we are going to use.
|
||||
|
||||
A physical device can be a dedicated graphics card, but also an integrated graphics processor
|
||||
or a software implementation. It can be basically anything that allows running Vulkan operations.
|
||||
|
||||
As of the writing of this guide, it is not yet possible to use multiple devices simultaneously
|
||||
in an efficient way (eg. SLI/Crossfire). You *can* use multiple devices simultaneously in the same
|
||||
program, but there is not much point in doing so because you cannot share anything between them.
|
||||
Consequently the best thing to do is to chose one physical device which is going to run everything:
|
||||
|
||||
use vulkano::instance::PhysicalDevice;
|
||||
|
||||
let physical = PhysicalDevice::enumerate(&instance).next().expect("no device available");
|
||||
|
||||
The `enumerate` function returns an iterator to the list of available physical devices.
|
||||
We call `next` on it to return the first device, if any. Note that the first device is not
|
||||
necessarily the best device. In a real program you probably want to leave the choice to the user.
|
||||
|
||||
Keep in mind that the list of physical devices can be empty. This happens if Vulkan is installed
|
||||
on the system, but none of the physical devices are capable of supporting Vulkan. In a real-world
|
||||
application you are encouraged to handle this situation properly.
|
@ -1,15 +0,0 @@
|
||||
# Introduction
|
||||
|
||||
Welcome to the vulkano guide!
|
||||
|
||||
This guide is going to cover the basics of Vulkan and vulkano. It won't cover graphics programming.
|
||||
This guide also assumes that you are familiar with the Rust programming language.
|
||||
|
||||
As with all Rust libraries, add this entry in your Cargo.toml:
|
||||
|
||||
vulkano = "0.4"
|
||||
|
||||
And this at your crate root:
|
||||
|
||||
#[macro_use]
|
||||
extern crate vulkano;
|
@ -1,100 +0,0 @@
|
||||
# Render passes
|
||||
|
||||
In the previous section, we created a window and asked the GPU to fill its surface with a color.
|
||||
However our ultimate goal is to draw some shapes on that surface, not just clear it.
|
||||
|
||||
In order to fully optimize and parallelize commands execution, we can't just add ask the GPU
|
||||
to draw a shape whenever we want. Instead we first have to enter "rendering mode" by entering
|
||||
what is called a *render pass*, then draw, and then leave the render pass.
|
||||
|
||||
In this section we are just going to enter a render pass and leave it immediately. This is not
|
||||
very useful per se, but it will serve as a foundation for the next tutorial, which is about
|
||||
drawing a triangle.
|
||||
|
||||
## What is a render pass?
|
||||
|
||||
The term "render pass" describes two things:
|
||||
|
||||
- It designates the "rendering mode" we have to enter before we can add drawing commands to
|
||||
a command buffer.
|
||||
|
||||
- It also designates a kind of object that describes this rendering mode.
|
||||
|
||||
Entering a render pass (as in "the rendering mode") requires passing a render pass object.
|
||||
|
||||
## Creating a render pass
|
||||
|
||||
For the moment, the only thing we want to do is draw some color to an image that corresponds to
|
||||
our window. This is the most simple case possible, and we only need to provide two informations
|
||||
to a render pass: the format of the images of our swapchain, and the fact that we don't use
|
||||
multisampling (which is an advanced anti-aliasing technique).
|
||||
|
||||
However complex games can use render passes in very complex ways, with multiple subpasses and
|
||||
multiple attachments, and with various micro-optimizations. In order to accomodate for these
|
||||
complex usages, vulkano's API to create a render pass is a bit particular.
|
||||
|
||||
TODO: provide a simpler way in vulkano to do that?
|
||||
|
||||
mod render_pass {
|
||||
use vulkano::format::Format;
|
||||
|
||||
single_pass_renderpass!{
|
||||
attachments: {
|
||||
color: {
|
||||
load: Clear,
|
||||
store: Store,
|
||||
format: Format,
|
||||
}
|
||||
},
|
||||
pass: {
|
||||
color: [color],
|
||||
depth_stencil: {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let render_pass = render_pass::CustomRenderPass::new(&device, &render_pass::Formats {
|
||||
color: (images[0].format(), 1)
|
||||
}).unwrap();
|
||||
|
||||
## Entering the render pass
|
||||
|
||||
A render pass only describes the format and the way we load and store the image we are going to
|
||||
draw upon. It is enough to initialize all the objects we need.
|
||||
|
||||
But before we can draw, we also need to indicate the actual list of attachments. This is done
|
||||
by creating a *framebuffer*.
|
||||
|
||||
Creating a framebuffer is typically done as part of the rendering process. Although it is not a
|
||||
bad idea to keep the framebuffer objects alive between frames, but it won't kill your
|
||||
performances to create and destroy a few framebuffer objects during each frame.
|
||||
|
||||
let framebuffer = {
|
||||
let image = &images[image_num];
|
||||
let dimensions = [image.dimensions()[0], image.dimensions()[1], 1];
|
||||
Framebuffer::new(&render_pass, dimensions, render_pass::AList {
|
||||
color: image
|
||||
}).unwrap()
|
||||
};
|
||||
|
||||
We are now ready the enter drawing mode!
|
||||
|
||||
This is done by calling the `draw_inline` function on the primary command buffer builder.
|
||||
This function takes as parameter the render pass object, the framebuffer, and a struct that
|
||||
contains the colors to fill the attachments with.
|
||||
|
||||
This struct is created by the `single_pass_renderpass!` macro and contains one field for
|
||||
each attachment that was defined with `load: Clear`.
|
||||
|
||||
Clearing our attachment has exactly the same effect as `clear_color_foo`, except that this
|
||||
time it is done by the rendering engine.
|
||||
|
||||
let command_buffer = PrimaryCommandBufferBuilder::new(&cb_pool)
|
||||
.draw_inline(&render_pass, &framebuffer, render_pass::ClearValues {
|
||||
color: [0.0, 0.0, 1.0, 1.0]
|
||||
})
|
||||
.draw_end()
|
||||
.build();
|
||||
|
||||
We enter the render pass and immediately leave it afterward. In the next section, we are going
|
||||
to insert a function call between `draw_inline` and `draw_end`.
|
@ -1,64 +0,0 @@
|
||||
# Windows and swapchains
|
||||
|
||||
Vulkan can be used to perform calculations (like OpenCL for example), but its main usage is to
|
||||
draw graphics. And before we can draw graphics, we have to create a window where to display
|
||||
the result.
|
||||
|
||||
## Creating a window
|
||||
|
||||
Creating a window is out of the scope of Vulkan. Instead, just like for OpenGL and other
|
||||
graphical APIs we have to use platform-specific functionnalities dedicated to opening a window.
|
||||
|
||||
For the purpose of this tutorial, we are going to use the `winit` and the `vulkano-win` crates.
|
||||
The former will be used to open a window and handle keyboard and mouse input, and the latter
|
||||
is used as a glue between `winit` and `vulkano`. It is possible to manipulate windows in vulkano
|
||||
without using any third-party crate, but doing so would require unsafe code.
|
||||
|
||||
Let's add these dependencies to our Cargo.toml:
|
||||
|
||||
winit = "0.5"
|
||||
vulkano-win = "0.1"
|
||||
|
||||
... and to our Rust code:
|
||||
|
||||
extern crate winit;
|
||||
extern crate vulkano_win;
|
||||
|
||||
Creating a window is as easy as this:
|
||||
|
||||
use vulkano_win::VkSurfaceBuild;
|
||||
|
||||
let window = winit::WindowBuilder::new().build_vk_surface(&instance).unwrap();
|
||||
|
||||
This code creates a window with the default parameters, and also builds a Vulkan *surface* object
|
||||
that represents the surface of that window whenever the Vulkan API is concerned.
|
||||
Calling `window.window()` will return an object that allows you to manipulate the window, and
|
||||
calling `window.surface()` will return a `Surface` object of `vulkano`.
|
||||
|
||||
However, if you try to run this code you will notice that the `build_vk_surface` returns an error.
|
||||
The reason is that surfaces are actually not part of Vulkan itself, but of several *extension*s
|
||||
to the Vulkan API. These extensions are disabled by default and need to be manually enabled when
|
||||
creating the instance before one can use their capabilities.
|
||||
|
||||
To make this task easier, the `vulkano_win` provides a function named `required_extensions()` that
|
||||
will return a list of the extensions that are needed on the current platform.
|
||||
|
||||
In order to make this work, we need to modify the way the instance is created:
|
||||
|
||||
let instance = {
|
||||
let extensions = vulkano_win::required_extensions();
|
||||
Instance::new(None, &extensions, None).expect("failed to create Vulkan instance")
|
||||
};
|
||||
|
||||
After you made the change, running the program should now work and open then immediately close
|
||||
a window.
|
||||
|
||||
## Events handling
|
||||
|
||||
## Creating a swapchain
|
||||
|
||||
Since the window is ultimately on the screen, things are a bit special.
|
||||
|
||||
## Clearing the image
|
||||
|
||||
let cmd = PrimaryCommandBuffer::new().copy(&source, &destination).build();
|
@ -1 +0,0 @@
|
||||
test
|
@ -1,55 +0,0 @@
|
||||
|
||||
<div id="guides">
|
||||
<nav>
|
||||
<h2>Guides</h2>
|
||||
|
||||
<h3>Introduction</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="/guide/introduction">Introduction</a></li>
|
||||
</ul>
|
||||
|
||||
<h3>Initialization</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="/guide/initialization">Initialization</a></li>
|
||||
<li><a href="/guide/device-creation">Device creation</a></li>
|
||||
<li><a href="/guide/buffer-creation">Creating a buffer</a></li>
|
||||
<li><a href="/guide/example-operation">Example operation</a></li>
|
||||
</ul>
|
||||
|
||||
<h3>A first operation</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="/guide/compute-intro">Introduction to compute operations</a></li>
|
||||
<li><a href="/guide/compute-pipeline">Compute pipeline</a></li>
|
||||
<li><a href="/guide/descriptor-sets">Descriptor sets</a></li>
|
||||
<li><a href="/guide/dispatch">Dispatch</a></li>
|
||||
</ul>
|
||||
|
||||
<h3>Clearing an image</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="/guide/image">Image creation</a></li>
|
||||
<li><a href="/guide/render-pass-framebuffer">Render passes and framebuffers</a></li>
|
||||
</ul>
|
||||
|
||||
<h3>Windowing</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="/guide/window">Window creation</a></li>
|
||||
<li><a href="/guide/swapchain-creation">Swapchain creation</a></li>
|
||||
<li><a href="/guide/acquire-present">Acquiring and presenting</a></li>
|
||||
</ul>
|
||||
|
||||
<h3>Graphics pipeline</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="/guide/window">Window creation</a></li>
|
||||
<li><a href="/guide/swapchain-creation">Swapchain creation</a></li>
|
||||
<li><a href="/guide/acquire-present">Acquiring and presenting</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<div>{{{body}}}</div>
|
||||
</div>
|
@ -1,25 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Vulkano</title>
|
||||
<link rel="stylesheet" type="text/css" href="/style.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a href="https://github.com/tomaka/vulkano"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/52760788cde945287fbb584134c4cbc2bc36f904/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f77686974655f6666666666662e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png"></a>
|
||||
|
||||
<header>
|
||||
<h1>Vulkano</h1>
|
||||
<h2>Safe <a href="https://www.rust-lang.org/">Rust</a> wrapper around
|
||||
the <a href="https://www.khronos.org/vulkan/">Vulkan</a> API</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="/">Overview</a></li>
|
||||
<li><a href="/guide/introduction">Guide</a></li>
|
||||
<li><a href="https://docs.rs/vulkano">API</a></li>
|
||||
<li><a href="https://github.com/tomaka/vulkano">Contribute</a></li>
|
||||
</ul>
|
||||
</header>
|
||||
|
||||
<section>{{{body}}}</section>
|
||||
</body>
|
||||
</html>
|
BIN
www/deploy.enc
BIN
www/deploy.enc
Binary file not shown.
@ -1 +0,0 @@
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDrZ6NpkiRc3VHnTDSOve9AjzBYRzmcX/CcqKSkN/6npPu+r6CI97k95OnKDWImwaW+OFTmuhGHEtYfFA+hLnHvwWFjELoaxDImV7/uW2i6uTtwPcLoRMSqujCdhrym/j2Ai68ZZR9hFZEc4ogGKz2au1QaZapHVKBi5S9zrOH76dAE5G1OQM49K72bI2hD/sqzyuYYuL4JSbTs3I4u7BkbwLUY0+PUKY8XCj1zdBuL570JD7UEuFaLcw9pY6shjcHXAPvRxQ123z6MuyB83rO4kK4FpG1ITJjO1mO4bLJAR/14pjmWCeIc3O65lBf0Sl5fdCJEGV7sm+zQM7TDYgvx pierre.krieger1708@gmail.com
|
@ -1,18 +0,0 @@
|
||||
// Copyright (c) 2017 The vulkano developers
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT
|
||||
// license <LICENSE-MIT or http://opensource.org/licenses/MIT>,
|
||||
// at your option. All files in the project carrying such
|
||||
// notice may not be copied, modified, or distributed except
|
||||
// according to those terms.
|
||||
|
||||
extern crate vulkano_www;
|
||||
|
||||
use std::env;
|
||||
|
||||
fn main() {
|
||||
let addr = env::var("ADDR").unwrap_or("0.0.0.0:8000".to_owned());
|
||||
println!("Listening on {}", addr);
|
||||
vulkano_www::start(&addr)
|
||||
}
|
158
www/src/lib.rs
158
www/src/lib.rs
@ -1,158 +0,0 @@
|
||||
// Copyright (c) 2017 The vulkano developers
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT
|
||||
// license <LICENSE-MIT or http://opensource.org/licenses/MIT>,
|
||||
// at your option. All files in the project carrying such
|
||||
// notice may not be copied, modified, or distributed except
|
||||
// according to those terms.
|
||||
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
extern crate markdown;
|
||||
extern crate mustache;
|
||||
#[macro_use]
|
||||
extern crate rouille;
|
||||
|
||||
use rouille::Response;
|
||||
use std::collections::HashMap;
|
||||
use std::collections::hash_map::Entry;
|
||||
use std::io;
|
||||
use std::net::ToSocketAddrs;
|
||||
use std::sync::Mutex;
|
||||
|
||||
pub fn start<A>(addr: A)
|
||||
where A: ToSocketAddrs
|
||||
{
|
||||
rouille::start_server(addr, move |request| {
|
||||
rouille::content_encoding::apply(
|
||||
&request,
|
||||
rouille::log(request, io::stdout(), || {
|
||||
{
|
||||
let mut r = rouille::match_assets(request, "./static");
|
||||
if r.is_success() {
|
||||
r.headers.push(("Cache-Control".into(),
|
||||
format!("max-age={}", 2 * 60 * 60).into()));
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
router!(request,
|
||||
(GET) (/) => {
|
||||
main_template(include_str!("../content/home.html"))
|
||||
},
|
||||
(GET) (/guide/introduction) => {
|
||||
guide_template_markdown(include_str!("../content/guide-introduction.md"))
|
||||
},
|
||||
(GET) (/guide/initialization) => {
|
||||
guide_template_markdown(include_str!("../content/guide-initialization.md"))
|
||||
},
|
||||
(GET) (/guide/device-creation) => {
|
||||
guide_template_markdown(include_str!("../content/guide-device-creation.md"))
|
||||
},
|
||||
(GET) (/guide/buffer-creation) => {
|
||||
guide_template_markdown(include_str!("../content/guide-buffer-creation.md"))
|
||||
},
|
||||
(GET) (/guide/compute-intro) => {
|
||||
guide_template_markdown(include_str!("../content/guide-compute-intro.md"))
|
||||
},
|
||||
(GET) (/guide/render-pass-framebuffer) => {
|
||||
guide_template_markdown({
|
||||
include_str!("../content/guide-render-pass-framebuffer.md")
|
||||
})
|
||||
},
|
||||
(GET) (/guide/swapchain-creation) => {
|
||||
guide_template_markdown({
|
||||
include_str!("../content/guide-swapchain-creation.md")
|
||||
})
|
||||
},
|
||||
_ => {
|
||||
main_template(include_str!("../content/404.html"))
|
||||
.with_status_code(404)
|
||||
}
|
||||
)
|
||||
}),
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
fn main_template<S>(body: S) -> Response
|
||||
where S: Into<String>
|
||||
{
|
||||
lazy_static! {
|
||||
static ref MAIN_TEMPLATE: mustache::Template = {
|
||||
mustache::compile_str(&include_str!("../content/template_main.html")).unwrap()
|
||||
};
|
||||
|
||||
static ref CACHE: Mutex<HashMap<String, String>> = Mutex::new(HashMap::new());
|
||||
}
|
||||
|
||||
let body = body.into();
|
||||
|
||||
let mut compil_cache = CACHE.lock().unwrap();
|
||||
let html = match compil_cache.entry(body) {
|
||||
Entry::Occupied(e) => e.into_mut(),
|
||||
Entry::Vacant(e) => {
|
||||
let data = mustache::MapBuilder::new()
|
||||
.insert_str("body", e.key())
|
||||
.build();
|
||||
|
||||
let mut out = Vec::new();
|
||||
MAIN_TEMPLATE.render_data(&mut out, &data).unwrap();
|
||||
e.insert(String::from_utf8(out).unwrap())
|
||||
},
|
||||
};
|
||||
|
||||
Response::html(html.clone())
|
||||
}
|
||||
|
||||
fn guide_template<S>(body: S) -> Response
|
||||
where S: Into<String>
|
||||
{
|
||||
lazy_static! {
|
||||
static ref GUIDE_TEMPLATE: mustache::Template = {
|
||||
mustache::compile_str(&include_str!("../content/template_guide.html")).unwrap()
|
||||
};
|
||||
|
||||
static ref CACHE: Mutex<HashMap<String, String>> = Mutex::new(HashMap::new());
|
||||
}
|
||||
|
||||
let body = body.into();
|
||||
|
||||
let mut compil_cache = CACHE.lock().unwrap();
|
||||
let html = match compil_cache.entry(body) {
|
||||
Entry::Occupied(e) => e.into_mut(),
|
||||
Entry::Vacant(e) => {
|
||||
let data = mustache::MapBuilder::new()
|
||||
.insert_str("body", e.key())
|
||||
.build();
|
||||
|
||||
let mut out = Vec::new();
|
||||
GUIDE_TEMPLATE.render_data(&mut out, &data).unwrap();
|
||||
e.insert(String::from_utf8(out).unwrap())
|
||||
},
|
||||
};
|
||||
|
||||
main_template(html.clone())
|
||||
}
|
||||
|
||||
fn guide_template_markdown<S>(body: S) -> Response
|
||||
where S: Into<String>
|
||||
{
|
||||
lazy_static! {
|
||||
static ref CACHE: Mutex<HashMap<String, String>> = Mutex::new(HashMap::new());
|
||||
}
|
||||
|
||||
let body = body.into();
|
||||
|
||||
let mut compil_cache = CACHE.lock().unwrap();
|
||||
let html = match compil_cache.entry(body) {
|
||||
Entry::Occupied(e) => e.into_mut(),
|
||||
Entry::Vacant(e) => {
|
||||
let val = markdown::to_html(e.key());
|
||||
e.insert(val)
|
||||
},
|
||||
};
|
||||
|
||||
guide_template(html.clone())
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 44 KiB |
@ -1,131 +0,0 @@
|
||||
/*
|
||||
* General
|
||||
*/
|
||||
@import url('https://fonts.googleapis.com/css?family=Muli');
|
||||
|
||||
body {
|
||||
background-color: #222;
|
||||
color: white;
|
||||
font-family: 'Muli', Verdana, Geneva, Tahoma, sans-serif;
|
||||
font-size: 1.1em;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
pre {
|
||||
background-color: #111;
|
||||
border: 1px dashed #888;
|
||||
border-radius: 2px;
|
||||
box-shadow: 2px 2px 1px black;
|
||||
padding: 0.9em 1.5em;
|
||||
}
|
||||
|
||||
/*
|
||||
* Header
|
||||
*/
|
||||
header {
|
||||
background-color: #6a8500;
|
||||
background-image: url(/header_bg.png), linear-gradient(to bottom, #6a8500 0%,#647d00 100%);
|
||||
background-repeat: no-repeat, repeat;
|
||||
background-size: auto 80%, cover;
|
||||
background-position: 5% 70%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
font-size: 3em;
|
||||
margin: 0;
|
||||
padding: 1em 0 0.4em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
header h2 {
|
||||
font-size: 1.4em;
|
||||
margin: 0;
|
||||
margin-bottom: 1em;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
header ul {
|
||||
display: block;
|
||||
margin: 0;
|
||||
padding: 0.9em 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
header ul li {
|
||||
display: inline;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
text-transform: lowercase;
|
||||
}
|
||||
|
||||
header ul li:first-child::before {
|
||||
content: "";
|
||||
}
|
||||
|
||||
header ul li::before {
|
||||
content: " - ";
|
||||
}
|
||||
|
||||
header ul li a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
header ul li a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/*
|
||||
* Guides
|
||||
*/
|
||||
#guides {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
#guides > nav {
|
||||
background-color: #444;
|
||||
font-size: 0.95em;
|
||||
padding: 1em 5em 1em 3em;
|
||||
flex: 0.2;
|
||||
min-width: 10vw;
|
||||
}
|
||||
|
||||
#guides > nav a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#guides > nav a:hover {
|
||||
color: #ddd;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#guides > nav h2:first-child {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
|
||||
#guides > nav ul {
|
||||
list-style-type: none;
|
||||
margin: 1.7em 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#guides > nav ul li {
|
||||
border-left: 2px solid rgba(255, 255, 255, 0.1);
|
||||
margin: 0;
|
||||
padding: 0.1em 0;
|
||||
padding-left: 0.7em;
|
||||
}
|
||||
|
||||
#guides > div {
|
||||
flex: 1;
|
||||
padding: 1em 2em;
|
||||
}
|
Loading…
Reference in New Issue
Block a user