Removed comments. Retrieves the maximum amount of active textures dynamically.