removed dependency on GL_TEXTURE_WIDTH,GL_TEXTURE_HEIGHT