Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

lookx2

Problem with Direct3D system flow

This topic is 5600 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve write a Direct3D program ~ i''ve Create a square with texture, but something strange happen, whatever what i draw at the screen, the framerate cannot greater than 75, even i only draw a trangle at the center of the screen, the max framerate is 75, i''ve try many other computer, the result is the same,even i use ATI 9700.. I wonder is my system flow have problem or the way to calculate FPS is incorrect? The Calculation of FPS is : VOID UpdateDisplay() { FLOAT fTimeLapsed = DXUtil_Timer( TIMER_GETAPPTIME ) - fLastTime; fpsCal += fTimeLapsed; nof ++; if( fTimeLapsed <= 0.01f ) fTimeLapsed = 0.01f; fLastTime = DXUtil_Timer( TIMER_GETAPPTIME ); if( fpsCal >= 1.0f) { fps = nof/fpsCal; fpsCal = 0.0f; nof = 0.0f; } } And the system flow is(at winmain): while( msg.message != WM_QUIT ) { if( g_bIsActive ) bGotMsg = PeekMessage( &msg, NULL, 0U, 0U, PM_REMOVE ); else bGotMsg = GetMessage( &msg, NULL, 0U, 0U ); if( bGotMsg ) { TranslateMessage( &msg ); DispatchMessage( &msg ); } else { if( g_bDisplayReady ) { FrameMove(); RenderFrame(); } } } Please Help me...Thanks a lot

Share this post


Link to post
Share on other sites
Advertisement
Don''t worry, I can tell you everything''s fine without even looking over your code. Is your refresh rate set to 75? Whenever your update interval is set to default then Direct3D WILL NOT draw faster than your refresh rate. Therefore, if your refresh rate was 75 you''d never get over 75 fps.

Share this post


Link to post
Share on other sites
Oh~~Thanks a lot~
I was using refresh rate with 75~~
But why the Direct3D sample can over the limited framerate, are there anything different?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!