Jump to content
  • Advertisement


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


Flickering problem in windowed mode with DX8

This topic is 5354 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''m using DX8 in an MFC single document app. I''m encountering a strange flickering problem when moving the view. It seems that the top 75 or so pixels refresh after the rest of the pixels. This means that as the view moves, line that is going straight up will be clearly broken for a very small period of time. I try to take a screen shot of this, but either I am unlucky or Windows isn''t taking a screen shot of what it is actually rendering. I guess there isn''t a good way of saying what''s going on, but if any of you have an idea what could be wrong, it would be helpful. Here''s my device creation code, if it helps:
if(FAILED(m_pD3D->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &d3ddm)))
	MessageBox("Failed to get the video adapter''s display mode");
	return E_FAIL;

ZeroMemory(&d3dpp, sizeof(d3dpp));

d3dpp.Windowed = TRUE;
d3dpp.BackBufferFormat = d3ddm.Format;
d3dpp.BackBufferCount = 1;
d3dpp.AutoDepthStencilFormat = D3DFMT_D16;
d3dpp.EnableAutoDepthStencil = TRUE;
d3dpp.hDeviceWindow = GetSafeHwnd();

CRect rc;

d3dpp.BackBufferWidth = rc.Width();
d3dpp.BackBufferHeight = rc.Height();

if(FAILED(m_pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, GetSafeHwnd(), 
	return E_FAIL;

Share this post

Link to post
Share on other sites
I''ve discovered something that may help.

I have a big dialog bar on the window, and if I take it out, and the status bar, and the toolbar, everything works fine. The area that works normally is equal or very close to the same size as the toolbar, dialog bar, and status bar combined. If I take one out, the area size changes accordingly. Maybe this will help.

Share this post

Link to post
Share on other sites
I have had the same problem before but nothing helped
(including changing the presentation parameters which
reduced the tearing but did not eliminate it entirely) so
I just changed my program to a fullscreen one. I set a
variable so that I can still run in windowed mode during
development and change to fullscreen when necessary.

Best regards,
Sherman Chin

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!