Added SDL_PROP_TEXTURE_GPU_TEXTURE_POINTER

This commit is contained in:
Sam Lantinga committed 2025-09-09 17:34:34 -07:00
1 parent c5749f0ae7
commit a4b180f515
2 files changed
+9 -1

No files matched your search

+3 -1
View File
@@ -233,11 +233,13 @@ static bool GPU_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture, SDL_
data->format = format;
data->texture = SDL_CreateGPUTexture(renderdata->device, &tci);
if (!data->texture) {
return false;
}
SDL_PropertiesID props = SDL_GetTextureProperties(texture);
SDL_SetPointerProperty(props, SDL_PROP_TEXTURE_GPU_TEXTURE_POINTER, data->texture);
if (texture->format == SDL_PIXELFORMAT_RGBA32 || texture->format == SDL_PIXELFORMAT_BGRA32) {
data->shader = FRAG_SHADER_TEXTURE_RGBA;
} else {