Skip to content

Commit

Permalink
Merge branch 'main' of github.com:eliemichel/glfw3webgpu
Browse files Browse the repository at this point in the history
  • Loading branch information
eliemichel committed Oct 13, 2024
2 parents 6dba74a + d27b3e1 commit f09d042
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ Overview
This extension simply provides the following function:

```C
WGPUSurface glfwGetWGPUSurface(WGPUInstance instance, GLFWwindow* window);
WGPUSurface glfwCreateWindowWGPUSurface(WGPUInstance instance, GLFWwindow* window);
```
Given a GLFW window, `glfwGetWGPUSurface` returns a WebGPU *surface* that corresponds to the window's back-end. This is a process that is highly platform-specific, which is why I believe it belongs to GLFW.
Given a GLFW window, `glfwCreateWindowWGPUSurface` returns a WebGPU *surface* that corresponds to the window's back-end. This is a process that is highly platform-specific, which is why I believe it belongs to GLFW.
Usage
-----
Expand Down Expand Up @@ -74,7 +74,7 @@ int main(int argc, char* argv[]) {
GLFWwindow* window = glfwCreateWindow(640, 480, "Learn WebGPU", NULL, NULL);
// Here we create our WebGPU surface from the window!
WGPUSurface surface = glfwGetWGPUSurface(instance, window);
WGPUSurface surface = glfwCreateWindowWGPUSurface(instance, window);
printf("surface = %p", surface);
// Terminate GLFW
Expand Down

0 comments on commit f09d042

Please sign in to comment.