# Get the internal SDL\_Texture type

**URL:** <https://discourse.libsdl.org/t/get-the-internal-sdl-texture-type/20266>\
**Category:** SDL Development\
**Created:** [January 3, 2014, 8:35am UTC](https://discourse.libsdl.org/t/get-the-internal-sdl-texture-type/20266 "2014-01-03T08:35:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vlag](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/v/e56c9b/32.png) [@vlag](https://discourse.libsdl.org/u/vlag)\
**Post date:** [January 3, 2014, 8:35am UTC](https://discourse.libsdl.org/t/get-the-internal-sdl-texture-type/20266/1 "2014-01-03T08:35:46Z")

</div>

Hi !

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

According to [https://forums.libsdl.org/viewtopic.php?p=41124#41124](https://forums.libsdl.org/viewtopic.php?p=41124#41124) , 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 😉
