opengl: OpenGL renderers need to support texture target in properties.

Otherwise this has to become an awkward heuristic in sdl2-compat.
This commit is contained in:
Ryan C. Gordon
2024-01-08 14:07:23 -05:00
parent 8e7c0b34d7
commit df438a3170
3 changed files with 24 additions and 16 deletions

View File

@@ -532,6 +532,7 @@ static int GL_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture, SDL_Pr
}
SDL_PropertiesID props = SDL_GetTextureProperties(texture);
SDL_SetNumberProperty(props, SDL_PROPERTY_TEXTURE_OPENGL_TEXTURE_NUMBER, data->texture);
SDL_SetNumberProperty(props, SDL_PROPERTY_TEXTURE_OPENGL_TEXTURE_TARGET, (Sint64) textype);
SDL_SetFloatProperty(props, SDL_PROPERTY_TEXTURE_OPENGL_TEX_W_FLOAT, data->texw);
SDL_SetFloatProperty(props, SDL_PROPERTY_TEXTURE_OPENGL_TEX_H_FLOAT, data->texh);