Fixed compiler warnings in textures.cpp