A red rectangle drawn on 2D texture disappears right after being drawn
问题 following my another question, I have provided the code that draws the rectangle as follows: void COpenGLControl::DrawRectangleOnTopOfTexture() { wglMakeCurrent(hdc, hrc); glPushAttrib(GL_ENABLE_BIT|GL_CURRENT_BIT); glDisable(target); glColor3f(1.0f,0.0f,0.0f); glBegin(GL_LINE_LOOP); glVertex2f(RectangleToDraw.at(0),RectangleToDraw.at(1)); glVertex2f(RectangleToDraw.at(0),RectangleToDraw.at(3)); glVertex2f(RectangleToDraw.at(2),RectangleToDraw.at(3)); glVertex2f(RectangleToDraw.at(2)