Ive searched a lot and couldnt find a working solution for my problem. Imagine youre playing a game and your running at 120 fps, you look at a particle heavy explosion and it drops to 40 or 50. I'm sure it takes little time in Update() and it can run at a steady frame rate of 60, so there seems to be no problem in OnRender(). But after I added the iAd banner to my game, the FPS drops to 30 or 40 when the ad is loading or when the ad is animating Well that hurts And its a fast reaction-based game, I dont want any lag with it. OutputDebugPrintf("%lf\n", now_time - last_time) Īpplication->Update(now_time - last_time) The mainloop looks like this: while(msg.message!=WM_QUIT) Hr = m_pDirect2dFactory->CreateHwndRenderTarget( ↑ Tried this and it doesn't work, don't know why render_target_properties.presentOptions = D2D1_PRESENT_OPTIONS_IMMEDIATELY HRESULT hr = S_OK ĭ2D1_SIZE_U size = D2D1::SizeU(rc.right - rc.left, rc.bottom - rc.top) ĭ2D1_HWND_RENDER_TARGET_PROPERTIES render_target_properties = D2D1::HwndRenderTargetProperties(m_hwnd, size) There are frame rate drops and visual glitches all over the place in 2.5.6 and so if youre one of those experiencing problems right now Youre not alone. Is it because my laptop shut down something when powered by battery which cuts the FPS to its half? If true, what can I do for it? When external power supply is plugged, my program runs at a steady FPS of 60, which I know may be a result of VSync but after unplugging the external power supply for a while, my program drops to a steady FPS of 30 (I outputed the time interval between every two renderings and it shows 32ms).Īnd even if I plugged the power supply again, it still remains at 30 FPS until I reboot the computer. I am new to Direct2D and recently I've found a wierd problem.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |