viewports and glClear()

I have two functions that are supposed to create two viewports on a single window. For some reason it only draws one of them. Can anyone help me? Here is some of the code:

void RenderScene(void)
{
glViewport(0,0,100,100);
glOrtho(-1000,1000,-1000,1000,1000,-1000);

glBegin(GL_LINES);
glColor3f(0,0,1);
glVertex3f(1000,10,0);
glVertex3f(-10,10,0);
glEnd();
}

void RenderScene2(void)
{
glViewport(100,100,100,100);
glOrtho(-1000,1000,-1000,1000,1000,-1000);

glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(1000,20,0);
glVertex3f(-10,20,0);
glEnd();
}

and in my winProc WM_PAINT case:

RenderScene2();
SwapBuffers(hDC);
ValidateRect(hWnd,NULL);

RenderScene();
SwapBuffers(hDC);
ValidateRect(hWnd,NULL);

The window this draws to is a 600x800 full screen window with windows in 600x800 resolution. This code only draws the RenderScene2() code.

Also can someone tell me if glClearColor() clears the entire window or just the current viewport? How do I clear just the current viewport when it does not take up the entire screen? Thanks.

in your rendering functions, you call glOrtho without calling glLoadIdentity.
the result is the concatenation of the 2 projection and i don’t know what could it do.

Also can someone tell me if glClearColor() clears the entire window or just the current viewport? How do I clear just the current viewport when it does not take up the entire screen?

glClear will clear the entire window. If you want to clear only a part of the window, use glScissor.

sorry for bringing this back up again but how would you clear only the 2ndviewport which has animation on vertexes instead of the 1st viewport with the background art on vertexes?