Hi Joshy,
thanks, so are the functions ok?
There is one function in TBGL called "TBGL_MakeTexture", it takes as input RGBA, RGB, BGRA or BGR block of memory. If you could return this stream from your TBTIL, it can be integrated seamlessly and even stay garbage collected.
TBGL_MakeTexture allows making nearest, linear, mipmapped linear and also anisotropic filtering, so I would prefer to do it this way, if possible.
I will make suggestion in your forum now
Petr