IDirect3DDevice9::Present - Programmers Heaven

Howdy, Stranger!

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

Categories

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.