Skip to content

Commit

Permalink
document Adapter::new_external in wgpu-hal (gfx-rs#2863)
Browse files Browse the repository at this point in the history
  • Loading branch information
i509VCB authored and cwfitzgerald committed Jul 14, 2022
1 parent 4a5b1f6 commit e594c1e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ Bottom level categories:
### Documentation
- Update present_mode docs as most of them don't automatically fall back to Fifo anymore. by @Elabajaba in [#2855](https://github.com/gfx-rs/wgpu/pull/2855)

#### Hal

- Document safety requirements for `Adapter::from_external` in gles hal by @i509VCB in [#2863](https://github.com/gfx-rs/wgpu/pull/2863)

## wgpu-0.13.1 (2022-07-02)

### Bug Fixes
Expand Down
7 changes: 7 additions & 0 deletions wgpu-hal/src/gles/egl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,13 @@ impl crate::Instance<super::Api> for Instance {
}

impl super::Adapter {
/// Creates a new external adapter using the specified loader function.
///
/// # Safety
///
/// - The underlying OpenGL ES context must be current.
/// - The underlying OpenGL ES context must be current when interfacing with any objects returned by
/// wgpu-hal from this adapter.
pub unsafe fn new_external(
fun: impl FnMut(&str) -> *const ffi::c_void,
) -> Option<crate::ExposedAdapter<super::Api>> {
Expand Down

0 comments on commit e594c1e

Please sign in to comment.