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
No known key found for this signature in database
GPG key ID: FA148B892AB48044
3 changed files with 24 additions and 16 deletions

View file

@ -1594,6 +1594,7 @@ static int GLES2_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture, SDL
}
}
SDL_SetNumberProperty(SDL_GetTextureProperties(texture), SDL_PROPERTY_TEXTURE_OPENGLES2_TEXTURE_NUMBER, data->texture);
SDL_SetNumberProperty(SDL_GetTextureProperties(texture), SDL_PROPERTY_TEXTURE_OPENGLES2_TEXTURE_TARGET, data->texture_type);
if (texture->access == SDL_TEXTUREACCESS_TARGET) {
data->fbo = GLES2_GetFBO(renderer->driverdata, texture->w, texture->h);