Added NPOT texture functionality