Skip to main content
GameDev.net gamedev.net
🔒 Locked

twiching back buffer in windowed mode..

Started by franky Nov 22, 2003 at 9:41 AM 2 replies 300+ views
Original Post
franky
franky
Some times when I run my window with a rotating cube the backbuffering seems to flicker every 2 second or so.. But it don't seem to do this in fullscreen mode. The cube also spins much faster in fullscreen mode. Does anybody have any ideas? I use these windows settings.. D3DPRESENT_PARAMETERS d3dpp; ZeroMemory(&d3dpp, sizeof(d3dpp)); // Reset Parameters d3dpp.BackBufferWidth = 640; d3dpp.BackBufferHeight = 480; d3dpp.BackBufferFormat = D3DFMT_R5G6B5; d3dpp.BackBufferCount = 1; d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; d3dpp.hDeviceWindow = hWnd; d3dpp.Windowed = mybool; d3dpp.EnableAutoDepthStencil = TRUE; d3dpp.AutoDepthStencilFormat = D3DFMT_D16; If you need more information just let me know.. Thank you! [edited by - franky on November 22, 2003 12:09:24 PM]
franky
franky
I have gone through my code a couple of times,
I couldn''t find anyting wrong.. So I decided to turn on/off some application that was running in the sytem tray..
Thinking maybe I would find something affecting the app.
And when I turned off apache web service and turned on MSN the direct3d application started to run smoothly in windowed mode.
I tried to turn off MSN again and it started to run slow again!

Well I think that was strange since my directx application only have 12 triangles..
S1CA
S1CA
quote:
Original post by franky
I have gone through my code a couple of times,
I couldn''t find anyting wrong.. So I decided to turn on/off some application that was running in the sytem tray..
Thinking maybe I would find something affecting the app.
And when I turned off apache web service and turned on MSN the direct3d application started to run smoothly in windowed mode.
I tried to turn off MSN again and it started to run slow again!

Well I think that was strange since my directx application only have 12 triangles..


That suggests to me that there could be a problem with:

1) The way your Windows message pump is implemented (e.g. not processing messages regularly enough).

and/or

2) Not processing or handling certain window messages such as WM_PAINT properly.

and/or

3) The other applications were interfering with yours in some way.


Do the sample D3D programs that come with the DirectX SDK suffer the same problem? If not, I''d suggest comparing your message pump and handling to the sample framework.

If they do suffer in the same way, I''d strongly suspect those other applications or something else in your system (including mis-configured hardware) is causing problems - for example a misbehaving network card/driver could be stalling the whole machine when those networking applications use it. Virus scanners, software firewalls, even the indexing service, MS Office indexing etc are common causes of system wide stalls...

--
Simon O''Connor
3D Game Programmer &
Microsoft DirectX MVP
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site
franky
franky
Thank you for your thorough reply Simon O'Connor

I use the same message loop for some other applications, so I don't think that is the problem.. I have tested the rendering sequence in one of the tutorials that came with the D3DSDK and I think I got the same result. I will try to figure out if one of the other applications is interfering..

Is there any special features I have to think about when I set up a message loop for D3D or can I use a standard WIN32 loop?


[edited by - franky on November 22, 2003 7:34:10 PM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.