• Advertisement
Sign in to follow this  

[.net] [XNA] Fullscreen Flickering

This topic is 4042 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

When I try to go fullscreen in XNA, there is a very noticable flicker. In this case it's white, which happens to be the color I'm clearing the screen to (which I don't think is a coincidence). It's kind of like, it clears the screen to white one frame, then displays my graphics the next frame, and repeats, causing an annoying white flickering. Why would this be? All I'm doing is setting IsFullscreen to true, which the XNA documentation says to do, and that's all it says to do. Why might the flickering be happening?

Share this post


Link to post
Share on other sites
Advertisement
UPDATE:

I've found that the flickering only happens when I call Present() on my device. If I leave that call out, there is no flicker, but I assume I'm sacrificing something.

Share this post


Link to post
Share on other sites
i think that this has to do with the back buffer. i dont know how to solve this problem off the top of my head so maybe someone else will.

Share this post


Link to post
Share on other sites
I can't find the exact reference, but I recall the XNA Game Framework already calls device.Present for you. This would explain the flickering, since an additional call to device.Present will then show the empty backbuffer once every odd frame. All XNA samples I've seen so far never call Present manually, so I guess it's safe to omit it.

Share this post


Link to post
Share on other sites
Quote:
Original post by remigius
I can't find the exact reference, but I recall the XNA Game Framework already calls device.Present for you. This would explain the flickering, since an additional call to device.Present will then show the empty backbuffer once every odd frame. All XNA samples I've seen so far never call Present manually, so I guess it's safe to omit it.


Bingo. The framework takes care of BeginScene/EndScene/Present for you.

Share this post


Link to post
Share on other sites
Oh, you're right! I never noticed that... Sometimes I think the framework does too much for you ;-)

Anyways, thanks! That was really frustrating me.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement