If you have a PH account, you can customize your PH profile.
*/
*/

Read Post

DirectX

Moderators: Sephiroth
Number of threads: 58
Number of posts: 118

This Forum Only
Post New Thread

Report
IDirect3DDevice9::Present Posted by ergonomy_joe on on 9 May 2008 at 3:30 AM
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

Reply




corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.
Resource Listings