Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

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.

IDirect3DDevice9::Present

ergonomy_joeergonomy_joe Posts: 6Member
Hi everyone,

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:

IDirect3DDevice9_BeginScene(d3ddev);
IDirect3DSurface9_LockRect(pMyOffscreenSurface, &d3dlr, 0, 0);
/* Here I copy my buffer to the offscreenSurface */
IDirect3DSurface9_UnlockRect(pMyOffscreenSurface);
IDirect3DDevice9_StretchRect(d3ddev, pMyOffscreenSurface, &srcRect, pRenderTarget, &dstRect, D3DTEXF_NONE);
IDirect3DDevice9_EndScene(d3ddev);

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
Joe

Sign In or Register to comment.