Changed byte sequence creation to a cross-python-version method in texture deletion.