Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation for ash::Device and ash::Instance #592

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion ash/src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ use std::mem;
use std::os::raw::c_void;
use std::ptr;

/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkDevice.html>
/// Holds a Vulkan [`vk::Device`] handle together with Vulkan 1.0 - 1.3 device-level function pointers loaded from it,
/// providing convenient wrappers to call these functions.
///
/// The internal handle is available through [`handle()`][Self::handle()] if needed externally.


#[derive(Clone)]
pub struct Device {
pub(crate) handle: vk::Device,
Expand Down
7 changes: 6 additions & 1 deletion ash/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ use std::mem;
use std::os::raw::c_char;
use std::ptr;

/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkInstance.html>
/// Holds a Vulkan [`vk::Instance`] handle together with Vulkan 1.0 - 1.3 instance-level function pointers loaded from it, providing convenient wrappers to call these functions:
/// All functions from the Vulkan API (except those from extensions) which have a `VkInstance` as their first argument have become methods of `ash::Instance`.
/// Their `VkInstance` argument is always passed implicitly.
///
/// The internal handle is available through [`handle()`][Self::handle()] if needed externally.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

#[derive(Clone)]
pub struct Instance {
pub(crate) handle: vk::Instance,
Expand Down