Skip to content

Commit

Permalink
Merge pull request #12 from anchpop/patch-1
Browse files Browse the repository at this point in the history
Update README.md to discuss glfwCreateWindowWGPUSurface rather than glfwGetWGPUSurface
  • Loading branch information
eliemichel authored Oct 6, 2024
2 parents 798c556 + 966418b commit d27b3e1
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 d27b3e1

Please sign in to comment.