mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 22:14:34 +00:00
Minor coding style changes
This commit is contained in:
parent
1ae5376a31
commit
a2f8d94a7b
@ -6409,8 +6409,7 @@ GLFWAPI VkResult glfwCreateWindowSurface(VkInstance instance, GLFWwindow* window
|
||||
* If the surface cannot be created, this function returns `NULL`.
|
||||
*
|
||||
* It is the responsibility of the caller to destroy the window surface. The
|
||||
* window surface must be destroyed using `wgpuSurfaceDrop` (wgpu-native) or
|
||||
* `wgpuSurfaceRelease` (Dawn/emscripten).
|
||||
* window surface must be destroyed using `wgpuSurfaceRelease`.
|
||||
*
|
||||
* @param[in] instance The WebGPU instance to create the surface in.
|
||||
* @param[in] window The window to create the surface for.
|
||||
|
25
src/webgpu.c
25
src/webgpu.c
@ -74,9 +74,9 @@ GLFWAPI WGPUSurface glfwCreateWindowWGPUSurface(WGPUInstance instance, GLFWwindo
|
||||
{
|
||||
id metal_layer = NULL;
|
||||
NSWindow* ns_window = glfwGetCocoaWindow(window);
|
||||
[ns_window.contentView setWantsLayer : YES] ;
|
||||
[ns_window.contentView setWantsLayer : YES];
|
||||
metal_layer = [CAMetalLayer layer];
|
||||
[ns_window.contentView setLayer : metal_layer] ;
|
||||
[ns_window.contentView setLayer : metal_layer];
|
||||
return wgpuInstanceCreateSurface(
|
||||
instance,
|
||||
&(WGPUSurfaceDescriptor){
|
||||
@ -84,8 +84,7 @@ GLFWAPI WGPUSurface glfwCreateWindowWGPUSurface(WGPUInstance instance, GLFWwindo
|
||||
.nextInChain =
|
||||
(const WGPUChainedStruct*)&(
|
||||
WGPUSurfaceDescriptorFromMetalLayer) {
|
||||
.chain =
|
||||
(WGPUChainedStruct){
|
||||
.chain = (WGPUChainedStruct){
|
||||
.next = NULL,
|
||||
.sType = WGPUSType_SurfaceDescriptorFromMetalLayer,
|
||||
},
|
||||
@ -104,8 +103,7 @@ GLFWAPI WGPUSurface glfwCreateWindowWGPUSurface(WGPUInstance instance, GLFWwindo
|
||||
.nextInChain =
|
||||
(const WGPUChainedStruct*)&(
|
||||
WGPUSurfaceDescriptorFromXlibWindow) {
|
||||
.chain =
|
||||
(WGPUChainedStruct){
|
||||
.chain = (WGPUChainedStruct){
|
||||
.next = NULL,
|
||||
.sType = WGPUSType_SurfaceDescriptorFromXlibWindow,
|
||||
},
|
||||
@ -125,14 +123,12 @@ GLFWAPI WGPUSurface glfwCreateWindowWGPUSurface(WGPUInstance instance, GLFWwindo
|
||||
.nextInChain =
|
||||
(const WGPUChainedStruct*)&(
|
||||
WGPUSurfaceDescriptorFromWaylandSurface) {
|
||||
.chain =
|
||||
(WGPUChainedStruct){
|
||||
.chain = (WGPUChainedStruct){
|
||||
.next = NULL,
|
||||
.sType =
|
||||
WGPUSType_SurfaceDescriptorFromWaylandSurface,
|
||||
},
|
||||
.display = wayland_display,
|
||||
.surface = wayland_surface,
|
||||
.sType = WGPUSType_SurfaceDescriptorFromWaylandSurface,
|
||||
},
|
||||
.display = wayland_display,
|
||||
.surface = wayland_surface,
|
||||
},
|
||||
});
|
||||
}
|
||||
@ -147,8 +143,7 @@ GLFWAPI WGPUSurface glfwCreateWindowWGPUSurface(WGPUInstance instance, GLFWwindo
|
||||
.nextInChain =
|
||||
(const WGPUChainedStruct*)&(
|
||||
WGPUSurfaceDescriptorFromWindowsHWND) {
|
||||
.chain =
|
||||
(WGPUChainedStruct){
|
||||
.chain = (WGPUChainedStruct){
|
||||
.next = NULL,
|
||||
.sType = WGPUSType_SurfaceDescriptorFromWindowsHWND,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user