Commit Graph
59 Commits
Author SHA1 Message Date
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]andLucas Kent 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]andRukai 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]andPaul Kernfeld 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]andTimo de Kort 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]andNoah Hüsser 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]andNoah Huesser 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
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]andPaul Kernfeld 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]andRukai 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
Paul Kernfeld 6c8f3bc08c Add Pod trait bound for all BufferMapAsyncResult data 2019-06-23 20:55:30 -04:00
bors[bot]andRukai 76c49275cb Merge #26
26: Rename msaa-linelist to msaa-line r=kvark a=rukai

As requested on gitter by @kvark 

Co-authored-by: Rukai <rubickent@gmail.com>
2019-06-20 17:31:06 +00:00
Rukai 60488d7b87 Rename msaa-linelist to msaa-line 2019-06-20 16:20:01 +10:00
bors[bot]andRukai dcd28b42f6 Merge #25
25: Add MSAA example r=kvark a=rukai

This example is the same as the triangle example except:
*    The render pipeline is created with a sample_count of 4
*    A new texture with a sample_count of 4 is created and set as the color_attachment instead of the swapchain
*    The swapchain is now specified as a resolve_target

It doesn't work yet as wgpu-native doesn't handle MSAA yet.

Co-authored-by: Rukai <rubickent@gmail.com>
2019-06-20 03:51:14 +00:00
Rukai b15fcf11b1 Add MSAA + LineList example 2019-06-20 12:06:57 +10:00
bors[bot]andDzmitry Malyshau 05df2dff18 Merge #23
23: Mipmapping example r=grovesNL a=kvark

Depends on https://github.com/gfx-rs/wgpu/pull/226

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2019-06-18 00:18:47 +00: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
bors[bot]andJoshua Groves a4ad7ae6ff Merge #21
21: Add native surface creation r=kvark a=grovesNL

- (API change) Rename `create_surface_with_metal_layer` to `create_surface_from_macos_layer` to match wgpu-native
- Expose `create_surface_from_xlib` and `create_surface_from_windows_hwnd`

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2019-06-12 03:48:56 +00:00
Joshua Groves 774dbcd99a Run cargo fmt 2019-06-11 21:02:30 -04:00
Joshua Groves d4ef083dbb Add native surface creation 2019-06-11 21:02:06 -04:00
bors[bot]andkyren ee40f4c574 Merge #10
10: Update API for new wgpu gl backend support r=kvark a=kyren

This won't work until [this pr](https://github.com/gfx-rs/wgpu/pull/183) is merged in wgpu, but at least this way we can discuss it.

Co-authored-by: kyren <kerriganw@gmail.com>
2019-06-08 02:37:20 +00:00
bors[bot]andRukai 05e9dfd2e9 Merge #20
20: Update to latest wgpu-native r=kvark a=rukai



Co-authored-by: Rukai <rubickent@gmail.com>
2019-06-07 15:51:37 +00:00
Rukai 3512aeacb3 Update to latest wgpu-native 2019-06-07 20:36:17 +10:00
kyren 9faa01adb2 Fix merge snafu 2019-06-06 15:50:12 -04:00
kyren 8c53667572 Update for new wgpu PR, keep API slightly closer to vanilla 2019-06-06 15:46:02 -04:00
kyren ae48fe07e0 Update API for in-progress wgpu-gl PR to wgpu / gfx 2019-06-06 15:46:02 -04:00
bors[bot]andLucas Kent 230e2abf36 Merge #16
16: Fix tests and run in CI r=grovesNL a=rukai

Fixes tests and enables running tests with vulkan on windows and linux.
If there are other platforms + backends I should add let me know.

Co-authored-by: Lucas Kent <rubickent@gmail.com>
2019-06-05 02:31:56 +00:00
bors[bot]andPaul Kernfeld 173d31899d Merge #17
17: Add GLX map PNG r=grovesNL a=paulkernfeld

Not sure if you're looking for more examples but if so, here is a 2D map

Co-authored-by: Paul Kernfeld <paulkernfeld@gmail.com>
2019-06-05 01:58:27 +00:00
Paul Kernfeld 44f251f006 Add GLX map PNG 2019-06-02 19:52:57 -04:00
Dzmitry Malyshau 44ce0875f1 Native update to 803c607794 2019-05-31 15:00:12 -04:00
Dzmitry Malyshau 5a1c5c269a Native update to 9276cd51c0 2019-05-31 10:32:05 -04:00
Lucas Kent cf33acf5dc Fix tests and run in CI 2019-05-29 17:20:33 +10:00
bors[bot]andLucas Kent 84a9f0b8f4 Merge #15
15: Upgdate to latest wgpu-native r=kvark a=rukai



Co-authored-by: Lucas Kent <rubickent@gmail.com>
2019-05-28 11:56:17 +00:00
Lucas Kent 0161b0867f Upgdate to latest wgpu-native 2019-05-28 14:44:52 +10:00
bors[bot]andMac O'Brien 91bb4c8f53 Merge #11
11: Add docs to most items r=kvark a=cormac-obrien

This does not include items re-exported from wgpu-native. We also still need examples, comprehensive panic documentation, etc.

Co-authored-by: Mac O'Brien <cormac@c-obrien.org>
2019-05-23 15:24:27 +00:00
Mac O'Brien 9e4baf5cf5 Fix RenderPipelineDescriptor.depth_stencil_state doc 2019-05-23 09:32:00 -05:00
Mac O'Brien 96e8784098 Revise initial documentation
- Add intra-doc links
- Clarify object and function usage and behavior
- Make note of alignment requirements
2019-05-23 01:00:44 -05:00
Mac O'Brien 85c5ad070b Add docs to most items
This does not include items re-exported from wgpu-native.
2019-05-22 20:19:16 -05:00