added #ifdef to avoid the compilation of texture objects