Recreating Direct2D Brushes when backbuffer dimensions change?

Started by
-1 comments, last by ericrrichards22 9 years, 3 months ago

Everything I've read suggests that, if you recreate your Direct2D render target due to the window being maximized or otherwise resized, you are supposed to release and then recreate any Direct2D Brushes created with that render target (http://msdn.microsoft.com/en-us/library/windows/desktop/dd756757(v=vs.85).aspx#device-dependent_resources, http://msdn.microsoft.com/en-us/library/windows/desktop/dd756651%28v=vs.85%29.aspx).

However, it doesn't seem to actually work that way. At the moment, I'm able to create any Brushes I want right after the RenderTarget is created, and they never seem to stop working, no matter how many times I recreate the backbuffer render target by changing the window dimensions, or even if I switch back and forth between fullscreen and windowed modes.

I am using SlimDX, but looking at the source, there's nothing special going on behind the scenes. Can anyone explain why it doesn't seem to work the way that it is documented?

Eric Richards

SlimDX tutorials - http://www.richardssoftware.net/

Twitter - @EricRichards22

This topic is closed to new replies.

Advertisement