Commit Graph

89 Commits

Author SHA1 Message Date
Dzmitry Malyshau
71b0a7c217 Update to the new swapchain model 2019-09-09 21:39:55 -04:00
bors[bot]
472fa2934a Merge #77
77: Modify examples to use PowerPreference::Default r=kvark a=danaugrs



Co-authored-by: Daniel Salvadori <danaugrs@gmail.com>
2019-09-06 00:07:19 +00:00
Daniel Salvadori
8f8cccd97e Modify examples to use PowerPreference::Default 2019-09-05 19:14:53 -03:00
Dzmitry Malyshau
433ab156ea wgpu-native update to 40fb3fcdfd 2019-09-02 21:12:22 -04:00
bors[bot]
1b401871ca Merge #73
73: Update wgpu-native to the commit that has no backend features. r=grovesNL a=kvark

This change removes the dependency on gfx-rs backends, refactors
Adapter and Surface creation to be done from nothing.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2019-08-30 02:05:14 +00: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
bors[bot]
b7d8d8fa99 Merge #71
71: Use `HasRawWindowHandle` in `create_surface` r=kvark a=hecrj

This change lets users use `wgpu` without listing `raw-window-handle` as a direct dependency themselves.

Co-authored-by: Héctor Ramón Jiménez <hector0193@gmail.com>
2019-08-23 15:35:30 +00:00
Héctor Ramón Jiménez
ad11bf071b Use HasRawWindowHandle in create_surface 2019-08-22 22:26:07 +02:00
bors[bot]
0641ef6aa3 Merge #70
70: Wholesome update for wgpu-0.3 r=everyone a=kvark

~~This update is a little more opinionated, i.e. the BGL creation just accepts a slice of things instead of a descriptor. I believe the reason for descriptors in the upstream API is mostly techincal - it's more convenient to generate bindings in Googles giant codegen. Following it verbatim doesn't appear to be strictly necessary, especially if we can extract better usability from Rust features.~~

The change also disables "gl" feature for the release. We'll re-enable it once we can provide it nicely, it will not be a breaking change.

I also noticed that barriers are not working correctly on the mipmap example. Will investigate separately - the native part is already published anyway. Edit: fixed by https://github.com/gfx-rs/wgpu/pull/302

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
wgpu-v0.3.0
2019-08-22 03:53:37 +00:00
Dzmitry Malyshau
c2743c279e Wholesome update for wgpu-0.3 2019-08-21 23:51:09 -04:00
bors[bot]
925e526e70 Merge #69
69: Prevent possible double panic in Drop impls r=kvark a=yanchith

Drop impls for `SwapChainOutput`, `RenderPass` and `ComputePass` now only
call out to `wgn` if not `thread::panicking()`.

Fixes #50 

Co-authored-by: yanchith <yanchi.toth@gmail.com>
2019-08-20 15:26:32 +00:00
yanchith
a63bb3f745 Prevent possible double panic in Drop impls
Drop impls for SwapChainOutput, RenderPass and ComputePass now only
call out to wgn if not thread::panicking().
2019-08-20 17:00:19 +02:00
bors[bot]
da6377acc7 Merge #68
68: remove usages of wgn in examples r=kvark a=rukai

This slipped through in https://github.com/gfx-rs/wgpu-rs/pull/67

Co-authored-by: Rukai <rubickent@gmail.com>
2019-08-18 04:27:31 +00:00
Rukai
88965efbbf remove usages of wgn in examples 2019-08-18 13:36:48 +10:00
bors[bot]
e2b6727eb0 Merge #67
67: Update to latest wgpu-native commit r=kvark a=rukai

closes https://github.com/gfx-rs/wgpu-rs/issues/66

Make sure my documentation for sample_mask and alpha_to_coverage_enabled is correct, I am not familiar with these fields.

Co-authored-by: Rukai <rubickent@gmail.com>
2019-08-18 02:38:15 +00:00
Rukai
69a894e91a Update to latest wgpu-native commit 2019-08-18 12:19:49 +10:00
bors[bot]
79b5342ee2 Merge #62
62: Fix missing lifetime r=kvark a=danaugrs



Co-authored-by: Daniel Salvadori <danaugrs@gmail.com>
2019-08-14 21:23:31 +00:00
Daniel Salvadori
bce324528e Fix missing lifetime 2019-08-14 18:20:52 -03:00
bors[bot]
d332eade8a Merge #61
61: Cleanup examples by using wgpu::read_spirv instead of manually creating a Vec<u32> r=kvark a=rukai

Wait for me to update the git reference once https://github.com/gfx-rs/wgpu/pull/280 is merged.

Co-authored-by: Rukai <rubickent@gmail.com>
2019-08-12 20:57:53 +00: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
bors[bot]
32d126b0a2 Merge #60
60: build: update version to 0.3.0 to unconfuse cargo patches r=kvark a=m4b



Co-authored-by: m4b <m4b.github.io@gmail.com>
2019-08-12 15:48:00 +00:00
m4b
ece00afc34 build: update version to 0.3.0 to unconfuse cargo patches 2019-08-11 21:24:55 -07:00
bors[bot]
e515a59309 Merge #58
58: Update to latest wgpu native r=kvark a=rukai

This PR is waiting on https://github.com/gfx-rs/wgpu/pull/276 but also allows us to test 276

Co-authored-by: Rukai <rubickent@gmail.com>
2019-08-12 01:40:25 +00:00
Rukai
b17e85d063 Update to latest wgpu native 2019-08-11 11:44:09 +10:00
bors[bot]
5614eca46d Merge #48
48: Exposing `set_viewport_rect()` on `RenderPass`. r=kvark a=seivan

Noticed that while viewport work with floats, scissors only work with unsigned integers. 
Not sure if relevant but [`width & height`](https://www.khronos.org/registry/OpenGL-Refpages/es2.0/xhtml/glViewport.xml) might not be able to be negative.

Co-authored-by: Seivan Heidari <seivan.heidari@icloud.com>
2019-08-10 13:52:26 +00: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
Dzmitry Malyshau
d4f4e13501 Update README with some development instructions 2019-07-29 17:13:31 -04:00
Seivan Heidari
cfa1d4bc38 Exposing set_viewport() on RenderPass. 2019-07-29 22:52:08 +02:00
bors[bot]
3b336ef75b Merge #46
46: Replace Pod using zerocopy crate r=kvark a=paulkernfeld

See https://github.com/gfx-rs/wgpu/pull/256#issuecomment-515277497

Co-authored-by: Paul Kernfeld <paulkernfeld@gmail.com>
2019-07-29 16:54:24 +00:00
Paul Kernfeld
5138c488c6 Replace Pod using zerocopy crate
See https://github.com/gfx-rs/wgpu/pull/256#issuecomment-515277497
2019-07-27 13:58:31 -04:00
bors[bot]
2bca2b891a Merge #45
45: Update to latest wgpu commit r=kvark a=rukai

Nothing really interesting in between these commits.

Co-authored-by: Lucas Kent <rubickent@gmail.com>
2019-07-26 16:00:45 +00:00
Lucas Kent
d6347923ac Update to latest wgpu commit 2019-07-26 18:17:50 +10:00
bors[bot]
21e725857d Merge #43
43: Remove unneeded TextureUsage r=kvark a=rukai

Just a small issue that was missed in review.

Co-authored-by: Rukai <rubickent@gmail.com>
2019-07-24 15:37:34 +00:00
Rukai
57aa4e3415 Remove unneeded TextureUsage 2019-07-24 21:37:15 +10:00
bors[bot]
0ec9f184aa Merge #38
38: Add an example showing how to capture a render r=kvark a=paulkernfeld

I had wanted to use wgpu-rs to generate `.png` images rather than displaying to the screen, so I coded up this prototype as an example to others who might want to do something similar.

Possible changes:
- Create an actual `.png` or other image
- Convert this into a unit test

I'm happy to make other modifications to this as well.

Co-authored-by: Paul Kernfeld <paulkernfeld@gmail.com>
2019-07-24 02:18:27 +00:00
Paul Kernfeld
790b79a936 Add an example showing how to capture a render 2019-07-23 22:14:27 -04:00
bors[bot]
d12c7329cc Merge #40
40: Update running an example documentation r=kvark a=Napokue

- Removed link to gfx getting started
- Created our own getting started (with examples)
- Updated syntax

Motivation: I always forget how to run the examples, gfx getting started is not the same as the wgpu-rs one. So I found the correct usage of the syntax to run examples. I am noticing in the Gitter channel that many people are struggling with running the examples, maybe this will clear it up a little. 

This is the beginning, I will continue to expand the documentation in the future.

Co-authored-by: Timo de Kort <dekort.timo@gmail.com>
2019-07-22 20:29:00 +00:00
Timo de Kort
495c9b3c40 update running an example 2019-07-22 22:22:37 +02:00
bors[bot]
5dd361fc63 Merge #33
33: Make `PresentMode` configurable. r=kvark a=Yatekii

See: https://github.com/gfx-rs/wgpu/pull/245

Co-authored-by: Noah Hüsser <yatekii@yatekii.ch>
2019-07-17 19:31:28 +00: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
bors[bot]
a05eab15a1 Merge #35
35: Add the possibility to set a stencil on a renderpass. r=kvark a=Yatekii



Co-authored-by: Noah Huesser <yatekii@yatekii.ch>
2019-07-11 13:42:21 +00:00
Noah Huesser
2e277bd02b Add the possibility to set a stencil on a renderpass. 2019-07-11 10:37:05 +02:00
bors[bot]
a8a1990303 Merge #32
32: Add conversion matrix from OpenGL to wgpu r=kvark a=dragly

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.

Co-authored-by: Svenn-Arne Dragly <dragly@cognite.com>
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2019-07-08 13:11:07 +00: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
bors[bot]
d836a4f041 Merge #30
30: Add Pod trait bound for all BufferMapAsyncResult data r=kvark a=paulkernfeld



Co-authored-by: Paul Kernfeld <paulkernfeld@gmail.com>
2019-06-24 14:59:18 +00:00
bors[bot]
1a8f468d99 Merge #28
28: msaa-line example fixes r=kvark a=rukai

This PR fixes the msaa-line example in addition to the fixes in https://github.com/gfx-rs/wgpu/pull/235

If https://github.com/gfx-rs/gfx/pull/2853 is merged first we can remove the crates.io patch.

Co-authored-by: Rukai <rubickent@gmail.com>
2019-06-24 14:34:19 +00:00
Rukai
b235c9647f msaa-line example fixes 2019-06-24 21:59:42 +10:00