sdlGetWindowPixelFormat function

int sdlGetWindowPixelFormat(
  1. Pointer<SdlWindow> window
)

Get the pixel format associated with the window.

\param window the window to query. \returns the pixel format of the window on success or SDL_PIXELFORMAT_UNKNOWN on failure; call SDL_GetError() for more information.

\threadsafety This function should only be called on the main thread.

\since This function is available since SDL 3.1.3.

extern SDL_DECLSPEC SDL_PixelFormat SDLCALL SDL_GetWindowPixelFormat(SDL_Window *window)

Implementation

int sdlGetWindowPixelFormat(Pointer<SdlWindow> window) {
  final sdlGetWindowPixelFormatLookupFunction = libSdl3.lookupFunction<
      Int32 Function(Pointer<SdlWindow> window),
      int Function(Pointer<SdlWindow> window)>('SDL_GetWindowPixelFormat');
  return sdlGetWindowPixelFormatLookupFunction(window);
}