More optimized version of drawTexture