Commit Graph

158 Commits

Author SHA1 Message Date
Lucas Kent
64d67b5d0d
Fix and enforce line endings + stray whitespace (#1099) 2018-11-01 14:45:30 +11:00
Lucas Kent
3fe7fc4495
Move shaders back that were supposed to be defined in the middle of main() { } (#1097)
They were initially moved because rust currently doesnt support
function-like proc macros in a function, but now they are wrapped in a
mod anyway.
2018-10-28 18:29:41 +11:00
Lucas Kent
9d46e08cc7
Cleanup examples (#1096)
*   replaced `.expect()` that provided no useful information with `.unwrap()`
*   used `use` consistently (all types are `use`d all functions have the parent module `use`d)
*   other formatting consistencies
2018-10-28 14:02:29 +11:00
Lucas Kent
c57289f536
refine shaders proc macro api (#1091)
macro renamed from `vulkano_shader!` to `shader!`
leave it up to the user to put it in a module
2018-10-28 10:10:29 +11:00
Lucas Kent
2153177210
Fix wayland resize issue (#1089)
Some drivers dont enforce a swapchain extent, so you need to check for
resize events from the os and then recreate the swapchain.
I took this opportunity to refactor the examples a bunch.
I want to do some more refactoring to make things consistent but I'll
leave that for a follow up PR.
2018-10-28 08:16:30 +11:00
Lucas Kent
494a0c30c8
vulkano-shaders - proc macros 2.0 (#1062)
* vulkano_shaders_derive exposes a proc_macro instead of a proc_macro_derive
* move vulkano_shader out of vulkano_shaders_derive and deprecate vulkano_shaders_derive
* Update documentation
* Move vulkano_shader! to root of mod, so it works with rust 1.30
2018-10-26 11:15:33 +11:00
Lucas Kent
24f93feffd
Fix window resize on deferred example (#1074) 2018-10-12 19:41:19 +11:00
Lucas Kent
4633c72bab
Add push constants example (#1072) 2018-10-11 11:42:56 +11:00
Lucas Kent
50920f868b
Export features and device extensions from the device module instead of the instance module (#1015) 2018-10-06 17:11:57 +10:00
Lucas Kent
d779829cbd
vulkano-shaders cleanup (#1058)
Use syn to construct ast instead of raw strings
Move spirv searching methods from lib.rs into its own module
Improve formatting
2018-10-05 17:00:02 +10:00
Lucas Kent
448bc1d1ad
Update dependencies (#1048) 2018-09-23 22:10:37 +10:00
Lucas Kent
f4f91f7ee1
Run LANG=en_us aspell --mode ccpp check $filename on every rust file (#1034) 2018-09-02 14:18:22 +10:00
Lucas Kent
e5d501fb5e
Copy examples from example repo (#1023)
*   Update PR template
*   Rename queue to queue_family
*   Add examples readme
*   Use the same image output filename
*   Move existing examples with multiple files into their own folder
*   Improve error message when running runtime-shader in the wrong directory
2018-08-30 11:37:51 +10:00
Lucas Kent
c720da66cd
Implement tessellation example (#1025) 2018-08-25 02:32:39 +10:00
Lucas Kent
7dc5de217b
Add trivial tessellation example and fix building a pipeline that uses tessellation shaders (#1024) 2018-08-24 20:01:00 +10:00
Gabriel Majeri
d80d5a6791 Fix Instance example (#872) 2018-08-11 16:48:03 +10:00
Lucas Kent
44e8207a27 Upgrade dependencies (#1012) 2018-08-10 14:50:38 +02:00
Lucas Kent
257994c7e8 Remove remaining std::mem::replace usages in examples (#1006) 2018-08-04 14:38:57 +02:00
Andrew Hickman
b0832072fc Avoid allocating a DynamicState every frame (#1008)
* Avoid allocating a DynamicState every frame

* Don't mutate the DynamicState

* Undo DynamicState::dynamic_state doc change
2018-08-04 14:38:33 +02:00
Jim Blandy
175763a953 Avoid gratuitous use of std::mem::replace. (#1005)
Either these calls to `replace` are unnecessary, or I'm going to learn something
I really need to know.

The only way difference I can see between `replace` and a simple assignment is
that `replace` returns ownership of the value to the caller, so the old value is
dropped after the new value has been put in place. But if Rust lets us assign to
or move from a variable, that means that no other alias can observe that
happening --- which I think means that the drop can't possibly care whether it
occurs before or after the move.
2018-07-30 12:07:35 +02:00
Lucas Kent
71d90e562a Upgrade deps + fix warnings in examples (#982)
* Upgrade dependencies

* Fix warnings in examples
2018-06-30 19:15:33 +02:00
Branan Riley
44530af81c Update winit to 0.13.1 (#953) 2018-06-05 12:58:59 +02:00
Cldfire
e515ffd846 Add overview of generated macro code to vulkano-shader-derive (#958) 2018-06-05 12:22:22 +02:00
Lucas Kent
bb3e6d616c Fix clear values in runtime-shader example (#968) 2018-06-05 12:21:36 +02:00
Gabriel Majeri
77c76b77ed Update dependencies (#903)
* Update dependencies

* Update winit to 0.11

* Update CHANGELOG.md
2018-03-13 12:34:30 +01:00
Casey Rodarmor
c11208521b Remove unused use std::iter; in triangle example (#935) 2018-03-13 11:36:09 +01:00
John Doneth
3231e92715 Fixed resizing bug in examples (#303) (#919)
Fixed the OutOfDate error in the examples by conditionally unwrapping futures
2018-02-14 08:51:52 +01:00
Branan Riley
e9104208c4 Allow Surface to reference an external window object (#848)
* Allow Surface to reference an external window object

This makes the Surface struct generic across a Window
type, so that a surface can own (or reference, if W is
an Arc) an external window object.

This also updates vulkano-win to take advantage of this.
There is no longer a dedicated Window struct in vulkano-win.
Instead, the Surface is simply passed ownership of the
winit::Window.

This fixes #844

* Update examples for new surface API

* Update Changelog

* Remove unnecessary send/sync bounds

* Update swapchain docs for new Surface behavior
2018-02-13 14:29:36 +01:00
thelearnerofcode
80e1ed6dc3 Updated Dependencies. (#876)
* Updated Dependencies

* Complied with changes mentioned in pull request.
2017-12-11 10:23:40 +01:00
tomaka
c16e4d81b2
Fix triangle example panicking on wayland (#873) 2017-11-11 11:23:53 +01:00
Pyry Kontio
ddb66a5513 Fixed the layer scaling issue on macOS. (#830)
* Fixed the layer scaling issue on macOS. Changed the triangle example to use the surface extents instead of window dimensions, as that seems to be a more robust source of correct information.

* Updated changelog. Fixed other examples' window extent problem.
2017-09-26 10:29:26 +02:00
tomaka
bdf026a78b Propagate allocation errors to CpuBufferPool::next() and chunk() (#809)
* Propagate allocation errors to CpuBufferPool::next() and chunk()

* Add entry in CHANGELOG
2017-09-09 08:55:20 +02:00
tomaka
9bf5e7f252 Remove the guide examples (#784) 2017-08-28 20:31:10 +02:00
tomaka
4208814e74 Fix #760 (#761) 2017-08-23 15:45:37 +02:00
tomaka
f02e021158 Remove the list of queue families in most places when creating a buffer or image (#746)
* Add Device::active_queue_families()

* Remove queue families parameter for ImmutableImage

* Remove queue families param from ImmutableBuffer

* Remove queue_families parameter from CpuBufferPool

* Remove queue families parameter from CpuAccessibleBuffer

* Fix examples
2017-08-17 11:59:59 +02:00
tomaka
3bfd84544e Add the triangle guide example (#720) 2017-08-05 10:32:14 +02:00
tomaka
6abeba4f3d Remove PipelineLayoutDescNames (#712) 2017-08-03 12:01:25 +02:00
tomaka
bf82214ec1 Rework shader entry points (#708) 2017-08-02 10:42:30 +02:00
Philip Woods
572554dbc1 Added window resizing to examples (#671)
* Added Swapchain recreation to triangle example

* Triangle example no longer panics when manually resizing window

* Triangle example now correctly resizes viewport

* Added window resizing support to image example

* Removed unused code from image example

* Moved dimension definition earlier in triangle and image example

* Replaced width and height variables in examples with dimensions

* Added window resizing support to teapot example

* Removed unused code from teapot example

* Removed duplicate code creating framebuffers
2017-07-26 17:58:40 +02:00
Benjamin Saunders
c085e193d9 Omit rarely-needed parameters from ImmutableImage convenience ctors 2017-07-24 01:09:45 -07:00
Benjamin Saunders
8a3bf4d191 Refactor ImmutableImage for convenient, safe initialization 2017-07-23 14:40:53 -07:00
tomaka
ef9a5f98e3 Merge pull request #667 from fst3a/spv-examples
Example showing how to manually load SPIR-V shaders from disk
2017-07-23 10:12:37 +02:00
Constantine
af0bb0ce9e Accomodate requested changes 2017-07-22 22:47:53 +03:00
tomaka
5f9b6dcaf2 Fix the examples not working on Android 2017-07-22 16:44:52 +02:00
Constantine
72b17b8e9d Add spv-1 example 2017-07-20 16:58:26 +03:00
Pierre Krieger
3fe108336c Fixes to the CpuBufferPool 2017-07-19 19:19:40 +02:00
Jason Davies
b06f45736d Use supports_compute() in compute example. 2017-07-19 01:10:38 +01:00
tomaka
139a13de62 Merge pull request #632 from tomaka/cb-builder-builders
Add other constructors for AutoCommandBufferBuilder
2017-07-11 12:33:39 +02:00
Pierre Krieger
437b046539 Fix examples 2017-07-11 11:33:35 +02:00
Pierre Krieger
c34491ed57 Add the example for the mandelbrot fractal 2017-07-11 11:09:01 +02:00