Here is the story. I am making an emulator which original system runs for 60 Hz displays. So I create a Direct3D device on fullscreen mode asking for a 60 Hz refreshing rate, I also use the D3DPRESENT_INTERVAL_ONE parameter to have the rendering synchonized with the VSync. And it looks pretty good.
Since the rendering consist mainly of displaying a 2d buffer with direct3d, the rendering function is pretty simple:
IDirect3DSurface9_LockRect(pMyOffscreenSurface, &d3dlr, 0, 0);
/* Here I copy my buffer to the offscreenSurface */
IDirect3DDevice9_StretchRect(d3ddev, pMyOffscreenSurface, &srcRect, pRenderTarget, &dstRect, D3DTEXF_NONE);
IDirect3DDevice9_Present(d3ddev, NULL, NULL, NULL, NULL);
Problem is that when I go to windowed mode, the frame rate drops for some reasons linked to the size of the window and the current display color mode.
Since I am a beginner in DirectX there is certainly something I miss, but I really wish I had the same quality in the windowed mode that I have in the fullscreen mode.
Could someone help me ?
Thanks a lot
0 · ·