GPU: device & frameSDL 3.2

SDL_DestroyGPUDevice

Destroys the GPU device. Release everything created from it first.

Signature

void SDL_DestroyGPUDevice(SDL_GPUDevice *device);

How it works

Shutdown order: release pipelines, buffers, textures and samplers; SDL_ReleaseWindowFromGPUDevice for each claimed window; then destroy the device; then the windows; then SDL_Quit.

Parameters

deviceSDL_GPUDevice *

The device to destroy.

Example

example.cpp
1SDL_ReleaseGPUGraphicsPipeline(device, pipeline);
2SDL_ReleaseGPUBuffer(device, vertexBuffer);
3SDL_ReleaseWindowFromGPUDevice(device, window);
4SDL_DestroyGPUDevice(device);
5SDL_DestroyWindow(window);
Official SDL wiki