Fix compiler warnings for textures.cpp