Use static for local functions.
Added variants for texture functions to make texture configuration
easier.