目次 - API(機能別) - 2Dレンダリング - SDL_RenderGeometryRaw

SDL_RenderGeometryRaw

三角形の一覧をレンダリングする. テクスチャとベクトル配列の番号も使用できる. 色とα変調はベクトルごとに行われる(SDL_SetTextureColorModとSDL_SetTextureAlphaModは無視される)

構文

int SDL_RenderGeometryRaw(SDL_Renderer* renderer, SDL_Texture* texture, const float* xy, int xy_stride, const int* color, int color_stride, const float* uv, int uv_stride, int num_vertices, const void* indices, int num_indices, int size_indices)

引数

rendererレンダラ
texture(任意) 使用するSDL_Texture
xyベクトルの位置
xy_strideある要素から次の要素へ移動するサイズ
colorベクトルの色(SDL_Color)
color_strideある要素から次の要素へ移動するサイズ
uv正規化されたテクスチャ座標のベクトル
uv_strideある要素から次の要素へ移動するサイズ
num_verticesベクトルの個数
indices(任意) vertices配列のインデックス番号の配列. NULLのとき順序通りにレンダリングする
num_indicesインデックス番号の個数
size_indicesインデックスのサイズ: 1 (byte), 2 (short), 4 (int)

戻り値

成功のとき0, 対応していないとき-1を戻す.

バージョン

この関数はSDL git HEADから使用できる. (開発中で公式にはリリースされていない)

SDL Wikiへのリンク

SDL_RenderGeometryRaw - SDL Wiki