mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-15 09:18:27 +00:00
GPU: Add SDL_CalculateGPUTextureFormatSize (#11146)
--------- Co-authored-by: Sam Lantinga <slouken@libsdl.org>
This commit is contained in:
parent
6d85127560
commit
6ea4a66451
7 changed files with 34 additions and 13 deletions
|
@ -3714,6 +3714,23 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GPUTextureSupportsSampleCount(
|
|||
SDL_GPUTextureFormat format,
|
||||
SDL_GPUSampleCount sample_count);
|
||||
|
||||
/**
|
||||
* Calculate the size in bytes of a texture format with dimensions.
|
||||
*
|
||||
* \param format a texture format.
|
||||
* \param width width in pixels.
|
||||
* \param height height in pixels.
|
||||
* \param depth_or_layer_count depth for 3D textures or layer count otherwise.
|
||||
* \returns the size of a texture with this format and dimensions.
|
||||
*
|
||||
* \since This function is available since SDL 3.1.5.
|
||||
*/
|
||||
extern SDL_DECLSPEC Uint32 SDLCALL SDL_CalculateGPUTextureFormatSize(
|
||||
SDL_GPUTextureFormat format,
|
||||
Uint32 width,
|
||||
Uint32 height,
|
||||
Uint32 depth_or_layer_count);
|
||||
|
||||
#ifdef SDL_PLATFORM_GDK
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue