Get the internal SDL_Texture type

Hi !

I don’t really know where to post this request so I open a new thread :slight_smile:

According to , I need to know what is the internal texture type used by a SDL_Texture (in my case : a render texture) to correctly apply a shader on them. I currently copy the way SDL choose between GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE_ARB (since I plan to only use shader when GL or GL ES are available), but this way may change in the future on SDL side.

Since a feature like this can be useful to other people too, can you consider to add a method like SDL_Driver_GetTextureType(SDL_Texture&) which return an enum corresponding to the encapsulated texture type, or add a corresponding field to the SDL_QueryTexture() function ?
With that, you can guarantee that a specific texture code will never be broken if you change/optimize the encapsulated stuff.

If there is another way to reliabily get the internal texture type, I’m happy to know it :wink: