Parcourir la source

GPU: Document swapchain dimensions

cosmonaut il y a 1 an
Parent
commit
c39e8298b7
1 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. 3 2
      include/SDL3/SDL_gpu.h

+ 3 - 2
include/SDL3/SDL_gpu.h

@@ -3351,9 +3351,9 @@ extern SDL_DECLSPEC SDL_GPUTextureFormat SDLCALL SDL_GetGPUSwapchainTextureForma
  * submitted. The swapchain texture should only be referenced by the command
  * submitted. The swapchain texture should only be referenced by the command
  * buffer used to acquire it. The swapchain texture handle can be NULL under
  * buffer used to acquire it. The swapchain texture handle can be NULL under
  * certain conditions. This is not necessarily an error. If this function
  * certain conditions. This is not necessarily an error. If this function
- * returns false then there is an error. This texture is managed by the
+ * returns false then there is an error. The swapchain texture is managed by the
  * implementation and must not be freed by the user. The texture dimensions
  * implementation and must not be freed by the user. The texture dimensions
- * will be the height and width of the claimed window. You MUST NOT call this
+ * will be the width and height of the claimed window. You can obtain these dimensions by calling SDL_GetWindowSizeInPixels. You MUST NOT call this
  * function from any thread other than the one that created the window.
  * function from any thread other than the one that created the window.
  *
  *
  * \param command_buffer a command buffer.
  * \param command_buffer a command buffer.
@@ -3367,6 +3367,7 @@ extern SDL_DECLSPEC SDL_GPUTextureFormat SDLCALL SDL_GetGPUSwapchainTextureForma
  * \sa SDL_ClaimWindowForGPUDevice
  * \sa SDL_ClaimWindowForGPUDevice
  * \sa SDL_SubmitGPUCommandBuffer
  * \sa SDL_SubmitGPUCommandBuffer
  * \sa SDL_SubmitGPUCommandBufferAndAcquireFence
  * \sa SDL_SubmitGPUCommandBufferAndAcquireFence
+ * \sa SDL_GetWindowSizeInPixels
  */
  */
 extern SDL_DECLSPEC bool SDLCALL SDL_AcquireGPUSwapchainTexture(
 extern SDL_DECLSPEC bool SDLCALL SDL_AcquireGPUSwapchainTexture(
     SDL_GPUCommandBuffer *command_buffer,
     SDL_GPUCommandBuffer *command_buffer,