   SetViewport problem
  hello,everybody!i have a problem when setting viewportBackBufferWidth=1024;BackBufferHeight=768;D3DVIEWPORT9 myviewport;myviewport.x=0;myviewport.y=96;myviewport.width=1024;myviewport.height=576;myviewport.MinZ=0.0f;myviewport.MaxZ=1.0f;g_pd3dDevice->SetViewport(&myviewport)i want to make my app look like a wide-screen movie,something like this:******************************************************************************************************************************************************************************************************************************************************************my render state:(i am rendering point sprite using Fix Function Pipeline)D3DRS_ZENABLETRUED3DRS_LIGHTING    FALSED3DSAMP_MINFILTER D3DTEXF_LINEARD3DSAMP_MAGFILTER D3DTEXF_LINEARbefore rendering pointsprite:D3DRS_ZWRITEENABLEFALSED3DRS_ALPHABLENDENABLE TRUED3DRS_DESTBLEND   D3DBLEND_ONErendering sprite:D3DRS_POINTSPRITEENABLETRUED3DRS_POINTSCALEENABLE TRUED3DRS_POINTSIZE   1.0fD3DRS_POINTSIZE_MIN    1.0fD3DRS_POINTSCALE_A0.0fD3DRS_POINTSCALE_B0.0fD3DRS_POINTSCALE_C1.0fafter rendering pointsprite:D3DRS_POINTSCALEENABLE FALSED3DRS_ZWRITEENABLETRUED3DRS_ALPHABLENDENABLE FALSEi set only one viewport,and the top and bottom area(which i didn't take care of) sometimes flash between black and the back image of my application window.the sprite could be rendered correctly in the viewport i seti am not sure if i described this correctly,i captured a few pictures of my application but i don't know how to post them here.   
  If you use swapeffect flip, you could get away with clearing the area only twice, instead of each frame.  Once for the current back buffer, once for the front buffer as it becomes the backbuffer.  If you use more backbuffers (BackBufferCount > 1), you'll need more clears before they all have the top/bottom area cleared.If you use swapeffect copy, you can clear just once.  The backbuffer is left alone, and copied to the front buffer, so your cleared area remains.If you use swapeffect discard, you must assume the entire backbuffer is trashed, and clear or redraw over the entire buffer each frame.  This mode is the only mode that supports multisampling, and is generally the most efficient mode to use.In general, set the viewport to the whole surface.  Clear.  Set the viewport to the area you want to draw in.  Draw.  Present.  Repeat.   ;  thanks!problem solved!   