# SDL_WGPU_CreateSurface Create a new WebGPU surface. ## Header File Defined in [](https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_wgpu.h) ## Syntax ```c bool SDL_WGPU_CreateSurface(SDL_Window *window, WGPUInstance instance, WGPUSurface *surface); ``` ## Function Parameters | | | | | -------------------------- | ------------ | ----------------------------------------------------------------------------- | | [SDL_Window](SDL_Window) * | **window** | the window which the surface will attach itself to. | | WGPUInstance | **instance** | a WebGPU instance. | | WGPUSurface * | **surface** | a pointer to a WGPUSurface handle to output the newly created WebGPU surface. | ## Return Value (bool) Returns true on success or false on failure; call [SDL_GetError](SDL_GetError)() for more information. ## Remarks This will not configure the surface. ## Version This is part of SDL PR #16020, and is therefore not available in regular SDL. ## See Also - [SDL_WGPU_DestroySurface](SDL_WGPU_DestroySurface) ---- [CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction), [CategoryWgpu](CategoryWgpu)