mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-04 08:56:25 +00:00
Added SDL_PROP_TEXTURE_GPU_TEXTURE_POINTER
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user