Commit Graph

56 Commits

Author SHA1 Message Date
Dzmitry Malyshau
d842432d17 Update for the latest spec changes 2020-03-15 11:25:06 -04:00
Aaron Loucks
d93293f58e Explicitly declare vertex attribute descriptors in cube example 2020-03-07 23:37:32 -05:00
Brian Frazho
3899fdb214 added test to hello-compute example 2020-02-28 20:50:28 -05:00
Diggory Hardy
dca51ce676 Add vertex_attr_array macro 2020-02-20 09:32:38 +00:00
Dzmitry Malyshau
b588345568 Disable no_redirection_bitmap on Windows 2020-02-09 19:25:34 -05:00
Dzmitry Malyshau
3a9113c962 Disable window bitmap redirection 2020-02-02 00:21:51 -05:00
Dzmitry Malyshau
37094051b5 Update wgpu and winit 2020-01-13 13:20:13 -05:00
bors[bot]
f9026595c0 Merge #157
157: Handle resizing in hello-triangle r=kvark a=quadrupleslap

Nothing gets drawn on my computer unless the swap chain is resized along with the window.

```
$ uname -a
Linux red 5.3.7-arch1-1-ARCH #1 SMP PREEMPT Fri Oct 18 00:17:03 UTC 2019 x86_64 GNU/Linux
$ wmctrl -m
Name: bspwm
Class: wm
PID: 665
Window manager's "showing the desktop" mode: N/A
```

Co-authored-by: Ram Kaniyur <quadrupleslap@gmail.com>
2020-01-12 20:04:25 +00:00
Ram Kaniyur
d75a1c5588 Accept DOS line endings in examples/boids 2020-01-11 12:55:51 +11:00
Ram Kaniyur
68b94ab3a3 Handle resizing in hello-triangle 2020-01-11 11:53:31 +11:00
Joshua Groves
a216c2bfca Update to latest winit (0.20.0-alpha6)
- `RedrawRequested` is now used for rendering
- `EventsCleared` replaced by `MainEventsCleared` which requests redraw
- Removed capture from hello-triangle to simplify it slightly
2020-01-04 18:33:33 -03:30
Dzmitry Malyshau
8f083e54c5 Update to latest wgpu c293d6dcea 2020-01-02 01:21:08 -05:00
bors[bot]
1529a88fd9 Merge #148
148: Change Queue::submit to take &self r=kvark a=LaylConway

This small change allows multiple threads to submit buffers slightly more efficiently, by being able to do it concurrently without a lock on Queue.

In practice currently `Queue::submit` does a lot of locking internally for most of the function's duration, so it's only a small performance win right now, but it opens up the road for more improvements.

Co-authored-by: Layl <2385329-layl@users.noreply.gitlab.com>
2019-12-31 16:32:52 +00:00
Layl
45426eef9c Change Queue::submit to take &self 2019-12-31 16:24:49 +01:00
Mason
76076d31cf Adds compute-boids example from gpuweb demos
Updates for boids example

Rename example folder
Use chunks_muts when creating initial_particles data
No need for depth
Syntax and minor changes

calculate multiple particles in single compute unit

updates boids example to use framework impl

removed code

fix gpu invocations constants
2019-12-29 12:17:14 -08:00
Tristam MacDonald
cc32408fa2 prototype of async/await for buffer mapping 2019-11-21 21:42:22 -08:00
Jacob Greenfield
68c81df381 Update examples and tests 2019-11-21 20:35:16 -05:00
Jacob Greenfield
88e8269182 cargo fmt 2019-11-21 00:20:28 -05:00
Dzmitry Malyshau
3609e52bfd Fix generic bounds on buffer mapping 2019-11-20 21:25:46 -05:00
Cormac O'Brien
05e697831a Use count rather than size in map_read/write_async
Fixes #124
2019-11-20 04:29:09 -06:00
Dzmitry Malyshau
b40bb71679 Wholesome update for the git master of wgpu-native 2019-11-19 20:58:32 -05:00
Anton Lazarev
dd23e8f015 Handle error case for SwapChain::get_next_texture 2019-11-05 14:46:25 -08:00
m4b
547c5eddda skybox: log::debug and make rotation slower 2019-11-03 16:19:43 -08:00
m4b
3972daf1fb examples: add skybox example, fixes #93
* Adds new skybox example for demonstrating cubemap uses
* Adds .png files for skybox
* Adds skybox vert and frag shaders
2019-11-02 19:42:25 -07:00
Dzmitry Malyshau
5123a5b800 Fix shadow sampling outside of the positive hemisphere 2019-10-24 12:28:37 -04:00
Dzmitry Malyshau
239885401c Refactor log crate usage 2019-10-24 12:26:58 -04:00
Paul Kernfeld
9f221584d6 Adapter describe example 2019-09-21 21:10:58 -04:00
Dzmitry Malyshau
00c6d97dce Return Queue separately 2019-09-10 09:26:18 -04:00
Daniel Salvadori
8f8cccd97e Modify examples to use PowerPreference::Default 2019-09-05 19:14:53 -03:00
Dzmitry Malyshau
c6522fa60b Update wgpu-native to the commit that has no backend features.
This change removes the dependency on gfx-rs backends, refactors
Adapter and Surface creation to be done from nothing.
2019-08-29 22:04:43 -04:00
Héctor Ramón Jiménez
ad11bf071b Use HasRawWindowHandle in create_surface 2019-08-22 22:26:07 +02:00
Dzmitry Malyshau
c2743c279e Wholesome update for wgpu-0.3 2019-08-21 23:51:09 -04:00
Rukai
88965efbbf remove usages of wgn in examples 2019-08-18 13:36:48 +10:00
Rukai
69a894e91a Update to latest wgpu-native commit 2019-08-18 12:19:49 +10:00
Rukai
53b5297bdc Cleanup examples by using wgpu::read_spirv instead of manually creating a Vec<u32> 2019-08-13 06:39:24 +10:00
Rukai
b17e85d063 Update to latest wgpu native 2019-08-11 11:44:09 +10:00
Layl
82469e13b2 Fix sampling in mipmap generation example (#57)
* Change min_filter in mipmap example to Nearest
2019-08-08 10:58:25 -04:00
Dzmitry Malyshau
5522c912f7 Switch msaa example samples to 4 2019-07-29 19:59:39 -04:00
Rukai
57aa4e3415 Remove unneeded TextureUsage 2019-07-24 21:37:15 +10:00
Paul Kernfeld
790b79a936 Add an example showing how to capture a render 2019-07-23 22:14:27 -04:00
Noah Hüsser
ce382f3735 Adapt to changes in wgpu for a configurable PresentMode.
Gl fixes.

Try fix this mess ..

GL fixess

Revert intermediate wgpu branch

Set proper wgpu-native commit ref

Adapt examples to the new features.
2019-07-17 21:27:32 +02:00
Svenn-Arne Dragly
00e0996e8d Make opengl_to_wgpu_matrix into a constant 2019-07-08 10:36:25 +02:00
Dzmitry Malyshau
11e2e37ec3 Use the correction matrix in shadow baking 2019-07-05 13:43:57 -04:00
Svenn-Arne Dragly
a113e5b78a Add conversion matrix from OpenGL to wgpu
The matrices in the examples are given in an OpenGL-like coordinate system,
while a Vulkan-like coordinate system is used by wgpu. This was previously
partially corrected in the shader and by flipping the up axis of the camera,
but left the x-axis mirrored in the final result.

This change adds a conversion matrix to framework.rs that can be used
to convert from OpenGL to wgpu. This also allows us to set the
winding-order to counter-clockwise, which matches the ordering in the data.
2019-07-05 17:47:37 +02:00
Rukai
b235c9647f msaa-line example fixes 2019-06-24 21:59:42 +10:00
Rukai
60488d7b87 Rename msaa-linelist to msaa-line 2019-06-20 16:20:01 +10:00
Rukai
b15fcf11b1 Add MSAA + LineList example 2019-06-20 12:06:57 +10:00
Dzmitry Malyshau
84434103c0 Mipmap screenshot 2019-06-16 21:15:22 -07:00
Dzmitry Malyshau
3f29a6d957 Mipmap example shader and code fixes 2019-06-16 21:15:16 -07:00
Dzmitry Malyshau
e9f687014b Mipmapping example 2019-06-16 21:15:15 -07:00