目次 - SDL 3.0 API(機能別) - 3DレンダリングとGPUコンピューティング - SDL_CalculateGPUTextureFormatSize
SDL_CalculateGPUTextureFormatSize
形式と次元を指定してテクスチャのサイズのバイト数を求める
ヘッダ
SDL3/SDL_gpu.h
構文
Uint32 SDL_CalculateGPUTextureFormatSize(SDL_GPUTextureFormat format, Uint32 width, Uint32 height, Uint32 depth_or_layer_count);
引数
| SDL_GPUTextureFormat | format | テクスチャの形式 |
| Uint32 | width | 幅ピクセル数 |
| Uint32 | height | 高さピクセル数 |
| Uint32 | depth_or_layer_count | 3次元テクスチャの深度, それ以外のときレイヤ数 |
戻り値
(Uint32) 指定の形式と次元のテクスチャのサイズを戻す.
バージョン
SDL 3.2.0以降
SDL Wikiへのリンク
SDL_CalculateGPUTextureFormatSize - SDL Wiki