<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.xna.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Direct3D 10 </title><link>http://forums.xna.com/forums/29.aspx</link><description>Only questions about the Direct3D 10 API are permitted here.</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 0.0)</generator><item><title>Re: DXGI::SwapChain::ResizeTarget not working</title><link>http://forums.xna.com/forums/thread/200599.aspx</link><pubDate>Fri, 17 Jul 2009 08:33:36 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:200599</guid><dc:creator>Simon Kozlov</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/200599.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=29&amp;PostID=200599</wfw:commentRss><description>Do I understand correctly that you want to make your application fullscreen with 1024x768 fullscreen resolution?&lt;br /&gt;
&lt;br /&gt;
Here&amp;#39;s the way to do it in DXGI:&lt;br /&gt;
1) Create swapchain with DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH set (otherwise, DXGI won&amp;#39;t try to switch desktop resolutions)&lt;br /&gt;
&lt;br /&gt;
2) Call ResizeTarget with DXGI_MODE_DESC with Width = 1024, Height = 768 and everything else set to zero.&lt;br /&gt;
&lt;br /&gt;
DXGI_MODE_DESC desc;&lt;br /&gt;
ZeroMemory(&amp;amp;desc, sizeof (desc));&lt;br /&gt;
desc-&amp;gt;Width = 1024;&lt;br /&gt;
desc-&amp;gt;Height = 768;&lt;br /&gt;
&lt;br /&gt;
pSwapChain-&amp;gt;ResizeTarget(&amp;amp;desc);&lt;br /&gt;
&lt;br /&gt;
3) Finally, make swapchain go fullscreen:&lt;br /&gt;
pSwapChain-&amp;gt;SetFullscreenState(TRUE, pOutput);&lt;br /&gt;
&lt;br /&gt;
Now you should be in fullscreen and kicking with the right mode set (1024x768).&lt;br /&gt;
Note that swapchains backbuffers are not necessary the same resolution (by default, they remained the same size as on swapchain creation), so you could still see lower resolution image in fullscreen.&lt;br /&gt;
The right way to deal with it is calling ResizeBuffers with the right backbuffer resolution (in your case, 1024x768).&lt;br /&gt;
&lt;br /&gt;
4) pSwapChain-&amp;gt;ResizeBuffers(backbuffercount, 1024, 768, backbufferformat, DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH);&lt;br /&gt;
&lt;br /&gt;
In fact, it&amp;#39;s recommended that app calls ResizeBuffers as a reaction to WM_SIZE message, which then would happen automatically on ResizeTarget/SetFullscrenState.&lt;br /&gt;
&lt;br /&gt;
Hope that helps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description></item><item><title>Re: DXGI::SwapChain::ResizeTarget not working</title><link>http://forums.xna.com/forums/thread/187799.aspx</link><pubDate>Tue, 09 Jun 2009 20:38:55 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:187799</guid><dc:creator>Nightmare</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/187799.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=29&amp;PostID=187799</wfw:commentRss><description>&lt;span style="background-color:#f4f7f5;"&gt;If your windows &amp;quot;stretches&amp;quot; on fullscreen when using widescreen u need to set 2 flags to get the requested resolution on fullscreen&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size:13px;"&gt;swapChainDesc.BufferDesc.Scaling = DXGI_MODE_SCALING_CENTERED;&lt;br /&gt;
&lt;span style="font-size:13px;"&gt;swapChainDesc.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH;&lt;br /&gt;
&lt;br /&gt;
to switch from windowed to fullscreen and back i use this code:&lt;br /&gt;
&lt;br /&gt;
&lt;font face="Lucida Console" size="2"&gt;&lt;br /&gt;
BOOL bFullscreen = FALSE;&lt;br /&gt;
g_pRenderDevice-&amp;amp;gt;GetSwapChain()-&amp;amp;gt;GetFullscreenState( &amp;amp;amp;bFullscreen, NULL );&lt;br /&gt;
DXGI_SWAP_CHAIN_DESC scd;&lt;br /&gt;
g_pRenderDevice-&amp;amp;gt;GetSwapChain()-&amp;amp;gt;GetDesc( &amp;amp;amp;scd );&lt;br /&gt;
g_pRenderDevice-&amp;amp;gt;GetSwapChain()-&amp;amp;gt;SetFullscreenState( !bFullscreen, NULL );&lt;br /&gt;
g_pRenderDevice-&amp;amp;gt;GetSwapChain()-&amp;amp;gt;ResizeTarget( &amp;amp;amp;scd.BufferDesc );&lt;br /&gt;
&lt;/font&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</description></item><item><title>Re: DXGI::SwapChain::ResizeTarget not working</title><link>http://forums.xna.com/forums/thread/187530.aspx</link><pubDate>Tue, 09 Jun 2009 02:49:44 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:187530</guid><dc:creator>trogo</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/187530.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=29&amp;PostID=187530</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;Christopher Pisz:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;I&amp;#39;ve made progress with DXGI after struggling for 2 months now. However, I cannot get DXGI::SwapChain::ResizeTarget to do its job!&lt;br /&gt;
&lt;br /&gt;
Calling this method seems to have no effect on my application. I have been trying for months on figuring out a way to tell DXGI to use a given fullscreen resolution when switching from windowed back to fullscreen.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;br /&gt;
Do you call ResizeTarget() when at fullscreen or before going to FS?</description></item><item><title>Re: DXGI::SwapChain::ResizeTarget not working</title><link>http://forums.xna.com/forums/thread/177927.aspx</link><pubDate>Thu, 14 May 2009 15:01:19 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:177927</guid><dc:creator>Xtro</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/177927.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=29&amp;PostID=177927</wfw:commentRss><description>I am new to d3d 10 but maybe it is because of vista skin using directx too.</description></item><item><title>DXGI::SwapChain::ResizeTarget not working</title><link>http://forums.xna.com/forums/thread/161202.aspx</link><pubDate>Thu, 09 Apr 2009 01:26:41 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:161202</guid><dc:creator>Christopher Pisz</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/161202.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=29&amp;PostID=161202</wfw:commentRss><description>I&amp;#39;ve made progress with DXGI after struggling for 2 months now. However, I cannot get DXGI::SwapChain::ResizeTarget to do its job!&lt;br /&gt;
&lt;br /&gt;
Calling this method seems to have no effect on my application. I have been trying for months on figuring out a way to tell DXGI to use a given fullscreen resolution when switching from windowed back to fullscreen.&lt;br /&gt;
&lt;br /&gt;
If I set the DXGI_SWAP_CHAIN_FLAG_ALLOW flag, then DXGI will go one step up from the window&amp;#39;s resolution, which is not my target resolution.&lt;br /&gt;
&lt;br /&gt;
If I set the flag to 0, DXGI will go to the current desktop resolution from before the application started.&lt;br /&gt;
&lt;br /&gt;
For instance - suppose I always want fullscreen to be 1280X768, however my desktop is set at 1280x1024. there seems to be no way to do it.&lt;br /&gt;
&lt;br /&gt;
I then tried calling ResizeTarget in both cases and the window remained the DXGI chosen size instead of my chosen size. A call to GetClientRect showed no change before and after. However, the method did not return a fail code.&lt;br /&gt;
&lt;br /&gt;
If anyone can come up with a way to tell DXGI to retain a windowed resolution and a fullscreen resolution to use when transitioning back and forth, please let me know.&lt;br /&gt;
&lt;br /&gt;
I noticed the DX10 samples also have the same troublesome behavior. When going from windowed to fullscreen they seem to change to the desktop resolution instead of the fullscreen resolution you started with.</description></item></channel></rss>