Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
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 · ·