In old OpenGL, once the projection matrix has been set to GLOrtho2D, you could simply use glTranslatef to position a 2D rectangle and then draw it like so:

Code :
void drawTexturedSurface(int width, int height) {
	glBegin(GL_QUADS);
		glTexCoord2d(0.0f, 0.0f); glVertex2f(0, 0);
		glTexCoord2d(1.0f, 0.0f); glVertex2f(width, 0);
		glTexCoord2d(1.0f, 1.0f); glVertex2f(width, height);
		glTexCoord2d(0.0f, 1.0f); glVertex2f(0, height);
	glEnd();
}

However, modern OpenGL doesn't support glTranslatef. What is the equilivant?