Commit Graph

84 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
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
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
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
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
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
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
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
Pierre Krieger
437b046539 Fix examples 2017-07-11 11:33:35 +02:00
Pierre Krieger
d06e2abf3c Add other constructors for AutoCommandBufferBuilder 2017-07-10 21:27:42 +02:00
Pierre Krieger
9e83984278 Publish 0.5.0 2017-07-04 14:26:41 +02:00
tomaka
d293c6cbcf Pass the device by value when loading a shader 2017-07-03 16:53:44 +02:00
Rukai
eb9ccd44e8 pass PhysicalDevice by value 2017-07-02 14:12:48 +10:00
Pierre Krieger
4df639a834 The timeout of acquire_next_image is now optional 2017-06-25 10:28:22 +02:00
Pierre Krieger
d372724054 Rework command buffers 2017-06-23 07:34:04 +02:00
Gabriel Majeri
9d2c028699 Fix unused code / imports in the examples 2017-06-20 06:53:53 +03:00
tomaka
4d96d9a912 Merge pull request #513 from tomaka/g-pipeline-builder
Add a GraphicsPipelineBuilder
2017-06-14 10:22:54 +02:00
Pierre Krieger
7723ba55e4 Add dummy for specialization constants in builder 2017-06-13 15:21:19 +02:00
Pierre Krieger
53fb62c6b1 Use FIFO present mode in exemples 2017-06-11 19:01:00 +02:00
tomaka
29096fc53f Minor warning fixes and comment restore 2017-06-10 18:58:25 +02:00
tomaka
64b8db24ea Make triangle example work 2017-06-10 18:36:01 +02:00
Pierre Krieger
ad3307d252 Use vulkano-shader-derive in the examples 2017-06-03 12:49:50 +02:00
Pierre Krieger
db3e128143 Rework framebuffer creation 2017-06-02 20:36:43 +02:00
Pierre Krieger
953b89f52e Architectural rework in swapchain 2017-05-26 13:12:21 +02:00
Pierre Krieger
a3c30dc183 Creating a Surface now takes the Arc<Instance> by value 2017-05-26 10:51:28 +02:00
Pierre Krieger
0d918e3779 Rework Surface::is_supported() and update examples 2017-05-26 10:42:03 +02:00
Pierre Krieger
6d106565d3 Turn all the constructor that take a &Arc<Device> to Arc<Device> 2017-05-25 21:44:54 +02:00
Pierre Krieger
3c51a3eb0b Update the examples to use the new system 2017-05-21 19:04:14 +02:00
Pierre Krieger
6f32b7d1c0 Fix examples 2017-05-20 14:06:19 +02:00
Pierre Krieger
1e62e4fc78 Take BufferUsage by value and never by ref 2017-05-19 15:26:57 +02:00
Pierre Krieger
c8fc08738e Fix examples 2017-05-15 11:02:00 +02:00
Benjamin Saunders
f3d7ca4b0d Update vulkano-win and examples to winit 0.6 2017-05-07 19:08:18 -07:00
Pierre Krieger
3213c9fef3 Add documentation and usability methods to GpuFuture 2017-05-06 20:10:16 +02:00
Pierre Krieger
5de743221b Adding a command to a builder can now return an error 2017-04-20 09:43:57 +02:00
Pierre Krieger
99388714c3 Building a command buffer can now return an OomError 2017-04-04 17:41:51 +02:00
Pierre Krieger
8ed20f933c Change GpuFuture::is_finished to cleanup_finished 2017-03-04 20:05:36 +01:00
Pierre Krieger
dd13c015cb Implement #385 2017-02-17 14:19:11 +01:00
Pierre Krieger
372a6f7d14 Rework command buffers again 2017-01-24 14:24:13 +01:00
Pierre Krieger
1216461211 Merge branch 'custom-derives' into incoming 2017-01-21 16:35:58 +01:00