<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Notes On Software</title>
	<atom:link href="http://www.notesonsoftware.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.notesonsoftware.com</link>
	<description></description>
	<lastBuildDate>Sat, 31 Dec 2011 19:17:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>C++/CLI IServiceProvider: ambiguous symbol compiler error</title>
		<link>http://www.notesonsoftware.com/uncategorized/ccli-iserviceprovider-ambiguous-symbol-compiler-error/</link>
		<comments>http://www.notesonsoftware.com/uncategorized/ccli-iserviceprovider-ambiguous-symbol-compiler-error/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 19:15:42 +0000</pubDate>
		<dc:creator>bg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.notesonsoftware.com/?p=113</guid>
		<description><![CDATA[While doing some programming using C++/CLI for .NET interop, I ran across this compiler error: error C2872: &#8216;IServiceProvider&#8217; : ambiguous symbol As the MSDN reference indicates, the compiler can&#8217;t sort out a symbol because it encountered multiple definitions. In this &#8230; <a href="http://www.notesonsoftware.com/uncategorized/ccli-iserviceprovider-ambiguous-symbol-compiler-error/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>While doing some programming using C++/CLI for .NET interop, I ran across this compiler error:</p>
<p>error C2872: &#8216;IServiceProvider&#8217; : ambiguous symbol</p>
<p>As the <a href="http://msdn.microsoft.com/en-us/library/t57wswcs(v=VS.100).aspx" title="MSDN Reference">MSDN reference</a> indicates, the compiler can&#8217;t sort out a symbol because it encountered multiple definitions.  In this case it was because of a core IServiceProvider definition that was not part of my code.</p>
<h3>Rules to avoid this error:</h3>
<ul>
<li><a href="#rule1">Do not put &#8220;using namespace&#8221; statements in global scope in your header files</a></li>
<li><a href="#rule2">If you put &#8220;using namespace&#8221; statements in your cpp files, add them after any includes</a></li>
</ul>
<p><span id="more-113"></span></p>
<h5><a name="rule1">Do not put &#8220;using namespace&#8221; statements in global scope in your header files</a></h5>
<p>If you put <strong>using namespace</strong> declarations at the top of a header file, they are global and can lead to these ambiguous symbol compile errors. </p>
<p>This means instead of this in a MyClass.h file:</p>
<pre class="brush: cpp; title: ; notranslate">
#pragma once

using namespace System;

public ref class MyClass
{
     IntPtr GetMyReference(String^ name);
}
</pre>
<p>you&#8217;ll need to use fully qualified references:</p>
<pre class="brush: cpp; title: ; notranslate">
#pragma once

public ref class MyClass
{
     System::IntPtr GetMyReference(System::String^ name);
}
</pre>
<h5><a name="rule2">If you put &#8220;using namespace&#8221; statements in your cpp files, add them after any includes</a></h5>
<p>Your MyClass.cpp file should look like this:</p>
<pre class="brush: cpp; title: ; notranslate">
#include &quot;StdAfx.h&quot;
#include &quot;MyClass.h&quot;

using namespace System;

IntPtr MyClass::GetMyReference(String^ name)
{
     // provide implementation
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.notesonsoftware.com/uncategorized/ccli-iserviceprovider-ambiguous-symbol-compiler-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Initializing DirectX 9 Drawing in WPF</title>
		<link>http://www.notesonsoftware.com/directx/initializing-directx-9-drawing-in-wpf/</link>
		<comments>http://www.notesonsoftware.com/directx/initializing-directx-9-drawing-in-wpf/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 03:42:54 +0000</pubDate>
		<dc:creator>bg</dc:creator>
				<category><![CDATA[DirectX]]></category>
		<category><![CDATA[Wpf]]></category>

		<guid isPermaLink="false">http://www.notesonsoftware.com/?p=21</guid>
		<description><![CDATA[In this article I&#8217;ll construct a very simple demo appication that hosts a D3DImage control whose buffer is directly manipulated using DirectX. I won&#8217;t be able to describe all of the code, but will try to hit the important points. &#8230; <a href="http://www.notesonsoftware.com/directx/initializing-directx-9-drawing-in-wpf/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In this article I&#8217;ll construct a very simple demo appication that hosts a D3DImage control whose buffer is directly manipulated using DirectX.  I won&#8217;t be able to describe all of the code, but will try to hit the important points.  Please download the code to see the full working application.</p>
<p>Download the code here:  <a href="http://www.notesonsoftware.com/redcrashcourse/wp-content/uploads/2011/12/DirectX9Test.zip" title="DirectX 9 Sample Code">DirectX 9 Sample Code</a></p>
<p><span id="more-21"></span></p>
<p>Here&#8217;s a quick preview of what it will look like (click the picture to see it bigger):<br />
<div id="attachment_96" class="wp-caption aligncenter" style="width: 297px"><a href="http://www.notesonsoftware.com/redcrashcourse/wp-content/uploads/2011/12/ScreenShot.png"><img src="http://www.notesonsoftware.com/redcrashcourse/wp-content/uploads/2011/12/ScreenShot-287x300.png" alt="" title="DirectXTestApplication" width="287" height="300" class="size-medium wp-image-96" /></a><p class="wp-caption-text">DirectXTest Application</p></div></p>
<p>First credit where credit is due:  The first article I read on integrating DirectX with WPF was <a href="http://www.codeproject.com/KB/WPF/D3DImage.aspx" title="Dr. Wpfs CodeProject D3DImage article">Dr. Wpf&#8217;s D3DImage article on CodeProject</a>.  I ported some of the C++ code in this application from his code.</p>
<p>The goal of this project is to demonstrate:</p>
<ul>
<li>How to set up a Visual Studio C++/Cli project to use the DirectX 9 libraries</li>
<li>How to initialize a drawing surface using DirectX 9</li>
<li>How to integrate the DirectX drawing surface into a C# WPF application</li>
</ul>
<h2>Solution Overview:</h2>
<p><div id="attachment_47" class="wp-caption alignleft" style="width: 247px"><a href="http://www.notesonsoftware.com/redcrashcourse/wp-content/uploads/2011/12/SolutionExplorer.png"><img src="http://www.notesonsoftware.com/redcrashcourse/wp-content/uploads/2011/12/SolutionExplorer.png" alt="Solution Explorer" title="SolutionExplorer" width="237" height="285" class="size-full wp-image-47" /></a><p class="wp-caption-text">DIrectXTest Solution Explorer</p></div><br />
The Visual Studio solution consists of a managed C++ Library (DirectX9Library) and a C# WPF Application (DirectX9LibraryClient). </p>
<p>The DirectX9Library interacts with native DirectX libraries and provides the code necessary to initialize a DirectX surface.  </p>
<p>The DirectX9LibraryClient provides a simple user interface with a D3DImage control whose back buffer is generated using DirectX.<br />
<br/><br />
<br/><br />
<br/></p>
<h2>Setting up a Visual Studio C++/Cli project to use the DirectX 9 libraries:</h2>
<p>The June 2010 DirectX SDK typically installs to &#8220;C:\Program Files\Microsoft DirectX SDK (June 2010)\&#8221;.  If you installed the DirectX SDK after you installed Visual Studio, it will add a macro $(DXSDK_DIR) to your C++ environment.  If not, substitute the path to your SDK install directory for $(DXSDK_DIR) below.</p>
<p>In order to utilize the DirectX libraries from a managed C++ project, right-click on the Project in Solution Explorer and choose Properties.  Towards the top of the Property Pages, change the Configuration setting to &#8220;All Configurations&#8221; to ensure your project will build in Debug and Release modes.  </p>
<p>Under Configuration Properties, select C/C++ and then General.  In Additional Include Directories, add $(DXSDK_DIR)\include.<br />
<div id="attachment_68" class="wp-caption alignnone" style="width: 310px"><a href="http://www.notesonsoftware.com/redcrashcourse/wp-content/uploads/2011/12/GeneralProperties1.png"><img src="http://www.notesonsoftware.com/redcrashcourse/wp-content/uploads/2011/12/GeneralProperties1-300x211.png" alt="" title="GeneralProperties" width="300" height="211" class="size-medium wp-image-68" /></a><p class="wp-caption-text">C/C++ General Properties</p></div><br />
Now select Linker and then General.  In Additional Library Directories, add $(DXSDK_DIR)\lib\x86.<br />
<div id="attachment_71" class="wp-caption alignnone" style="width: 310px"><a href="http://www.notesonsoftware.com/redcrashcourse/wp-content/uploads/2011/12/LinkerGeneral.png"><img src="http://www.notesonsoftware.com/redcrashcourse/wp-content/uploads/2011/12/LinkerGeneral-300x212.png" alt="" title="LinkerGeneral" width="300" height="212" class="size-medium wp-image-71" /></a><p class="wp-caption-text">Linker General Settings</p></div><br />
Finally, under Linker and Input, set Additional Dependencies to:  d3dx9.lib;d3d9.lib<br />
<div id="attachment_74" class="wp-caption alignnone" style="width: 310px"><a href="http://www.notesonsoftware.com/redcrashcourse/wp-content/uploads/2011/12/LinkerInput.png"><img src="http://www.notesonsoftware.com/redcrashcourse/wp-content/uploads/2011/12/LinkerInput-300x212.png" alt="" title="LinkerInput" width="300" height="212" class="size-medium wp-image-74" /></a><p class="wp-caption-text">Linker Input Settings</p></div></p>
<h2>Initializing a Drawing Surface using DirectX 9:</h2>
<p>The WPF application interacts with the DirectX surface via the DirectXManager class in the DirectX9Library project.  The Initialize function calls CreateD3dObjects, where the main DirectX objects are created and the DirectX capabilities of the system are determined.</p>
<p>These are declared in the DirectXManager header file:</p>
<pre class="brush: cpp; title: ; notranslate">
IDirect3D9 *_direct3DObject;
IDirect3D9Ex *_direct3DExObject;
</pre>
<p>Here is the CreateD3dObjects function in its entirety:</p>
<pre class="brush: cpp; title: ; notranslate">
HRESULT DirectXManager::CreateD3dObjects(void)
{
    HRESULT hr = S_OK;
    HMODULE hD3D = NULL;

    // first load the d3d library
    hD3D = LoadLibrary(TEXT(&quot;d3d9.dll&quot;));

    if (hD3D)
    {
        // see if the function to create a d3dEx object is there
        DIRECT3DCREATE9EXFUNCTION pfnCreate9Ex = (DIRECT3DCREATE9EXFUNCTION)GetProcAddress(hD3D, &quot;Direct3DCreate9Ex&quot;);

        if (pfnCreate9Ex)
        {
            _supportsD3dEx = true;
            pin_ptr&lt;IDirect3D9Ex*&gt; pinnedD3dEx = &amp;_direct3DExObject;
            // the function exists, so create a d3dEx object
            hr = (*pfnCreate9Ex)(D3D_SDK_VERSION, pinnedD3dEx);
            if (hr == S_OK)
            {
                pin_ptr&lt;IDirect3D9*&gt; pinnedD3d = &amp;_direct3DObject;
                hr = _direct3DExObject-&gt;QueryInterface(__uuidof(IDirect3D9), reinterpret_cast&lt;void **&gt;(pinnedD3d));
            }
        }
        else
        {
            _supportsD3dEx = false;
            // the function was not found, so just create a d3d object
            _direct3DObject = Direct3DCreate9(D3D_SDK_VERSION);
           if (!_direct3DObject)
           {
                hr = E_FAIL;
           }
        }

        D3DCAPS9 caps;

        hr = _direct3DObject-&gt;GetDeviceCaps(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, &amp;caps);
        if ((caps.DevCaps &amp; D3DDEVCAPS_HWTRANSFORMANDLIGHT) == D3DDEVCAPS_HWTRANSFORMANDLIGHT)
            _supportsHardwareVertexProcessing = true;
        else
            _supportsHardwareVertexProcessing = false;

        FreeLibrary(hD3D);
    }
    else
        hr = E_FAIL;

    return hr;
}
</pre>
<p>Because this code is utilized in a managed library, pin_ptr types are used to ensure that the garbage collector does not move things around while the DirectX objects are being initialized. </p>
<p>If the host operating system is running Windows Vista or later, the so called &#8220;Ex&#8221; functions and interfaces should be used for the best performance.  These functions are supported by WDDM drivers, and are not available on Windows XP.</p>
<p>In order to determine whether the extended functionality of the IDirect3D9Ex interface can be used, the code has to determine whether the DirectX version on the system supports it.  This is done by loading the d3d9 library and trying to get the address of the Direct3DCreate9Ex function.  If the address is not found, then an object supporting the IDirect3D9 interface is created, otherwise an object that supports IDirect3D9Ex is created.</p>
<p>Once the d3dObjects are set up, the code checks to see if the graphics adapter supports hardware acceleration by checking for the D3DDEVCAPS_HWTRANSFORMANDLIGHT capability.  The result of this inquiry is stored in the _supportsHardwareVertexProcessing variable for use when creating the surface later on.  Finally, the d3d9 library is unloaded.</p>
<p>Once the DirectX objects are initialized, the WPF application needs to get an IntPtr to a surface that DirectX is going to draw on.  This is accomplished in the DirectXManager GetImageBackBuffer function.  The first step is to get a device object initialized.  We&#8217;ll see where this is called from in a minute, but take a quick look at the GetDevice function:</p>
<pre class="brush: cpp; title: ; notranslate">
bool DirectXManager::GetDevice(D3DPRESENT_PARAMETERS presentParameters)
{
    HRESULT hr;
    bool result = false;

    // determine what type of vertex processing to use based on the device capabilities
    DWORD vertexProcessing;

    if (_supportsHardwareVertexProcessing)
        vertexProcessing = D3DCREATE_HARDWARE_VERTEXPROCESSING;
    else
        vertexProcessing = D3DCREATE_SOFTWARE_VERTEXPROCESSING;;

    if (_direct3DExObject)
    {
        pin_ptr&lt;IDirect3DDevice9Ex*&gt; pinnedDeviceEx = &amp;_direct3DDeviceEx;

        // create the D3D device using the Ex function
        hr = _direct3DExObject-&gt;CreateDeviceEx(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, _windowHandle,
			vertexProcessing | D3DCREATE_MULTITHREADED | D3DCREATE_FPU_PRESERVE,
			&amp;presentParameters, NULL, pinnedDeviceEx);

        if (hr == S_OK)
        {
            pin_ptr&lt;IDirect3DDevice9*&gt; pinnedDevice = &amp;_direct3DDevice;

            // obtain the standard D3D device interface
            hr = _direct3DDeviceEx-&gt;QueryInterface(__uuidof(IDirect3DDevice9), reinterpret_cast&lt;void **&gt;(pinnedDevice));
        }
    }
    else
    {
        pin_ptr&lt;IDirect3DDevice9*&gt; pinnedDevice = &amp;_direct3DDevice;

        // create the D3D device
        hr = _direct3DObject-&gt;CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, _windowHandle,
            vertexProcessing | D3DCREATE_MULTITHREADED | D3DCREATE_FPU_PRESERVE,
            &amp;presentParameters, pinnedDevice);
    }

    if (hr == S_OK)
        result = true;

    return result;
}
</pre>
<p>If the extended interfaces were found during initialization, a device that supports the IDirect3DDevice9Ex interface is created; otherwise a device that supports the IDirect3DDevice9 interface is created.  Note that pin_ptr is used to prevent garbage collection from moving things around and that the hardware acceleration support and a window handle are used to create the device.  The hardware acceleration support was determined during initialization and the window handle comes from the main window of the WPF application.</p>
<p>The last major function in the DirectXLibrary returns an IntPtr pointing to the surface that the WPF D3DImage interacts with.  Here&#8217;s the code for the DirectXManager GetImageBackBuffer function:</p>
<pre class="brush: cpp; title: ; notranslate">
IntPtr DirectXManager::GetImageBackBuffer(unsigned int height, unsigned int width, IntPtr windowHandle)
{
    if (!_isInitialized)
        throw gcnew InvalidOperationException(&quot;Cannot call GetImageBackBuffer without initializing first&quot;);

    _windowHandle = (HWND)windowHandle.ToPointer();
    IntPtr backBuffer = IntPtr::Zero;

    _width = width;
    _height = height;

    // present parameters to create the D3DDevice
    D3DPRESENT_PARAMETERS presentParameters;

    ZeroMemory(&amp;presentParameters, sizeof(presentParameters));

    presentParameters.Windowed = TRUE;
    presentParameters.BackBufferHeight = 1;
    presentParameters.BackBufferWidth = 1;
    presentParameters.SwapEffect = D3DSWAPEFFECT_DISCARD;
    presentParameters.BackBufferFormat = D3DFMT_UNKNOWN;

    // Vista requires the D3D &quot;Ex&quot; functions for optimal performance.
    // The Ex functions are only supported with WDDM drivers, so they
    // will not be available on XP.  As such, we must use the D3D9Ex
    // functions on Vista and the D3D9 functions on XP.

    bool deviceResult = GetDevice(presentParameters);

    if (deviceResult)
    {
        HRESULT hr;
        pin_ptr&lt;IDirect3DSurface9*&gt; pinnedSurface = &amp;_direct3DSurface;

        // create and set the render target surface
        // it should be lockable on XP and nonlockable on Vista
        hr = _direct3DDevice-&gt;CreateRenderTarget(width, height,
            D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, 0,
            !_supportsD3dEx, // lockable
            pinnedSurface, NULL);

        if (hr == S_OK)
        {
            // set the device to render to the surface
            hr = _direct3DDevice-&gt;SetRenderTarget(0, _direct3DSurface);

            if (hr == S_OK)
            {
                // turn off culling
                hr = _direct3DDevice-&gt;SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);

                if (hr == S_OK)
                {
                    // turn off D3D lighting
                    hr = _direct3DDevice-&gt;SetRenderState(D3DRS_LIGHTING, FALSE);

                    if (hr == S_OK)
                        backBuffer = IntPtr(_direct3DSurface);
                 }
            }
        }
    }

    return backBuffer;
}
</pre>
<p>First the GetDevice function is called to create the appropriate device configuration, then a surface is created using the device CreateRenderTarget method.  Note that for performance reasons the surface should be lockable on Windows XP and non-lockable on Vista or later.  Once the surface is created, it is set as the device render target, configured, and a pointer to it is returned to the application.</p>
<h2>Integrating the DirectX surface into the WPF application:</h2>
<p>The DirectXLibraryClient application interacts with DirectX by using a D3DImage control on the main window.  It is implemented using the MVVM pattern, so a reference to the D3DImage control and the window handle are passed in to the ViewModel constructor.</p>
<pre class="brush: csharp; title: ; notranslate">
/// &lt;summary&gt;
/// constructor
/// &lt;/summary&gt;
/// &lt;param name=&quot;height&quot;&gt;the height of the directX window&lt;/param&gt;
/// &lt;param name=&quot;width&quot;&gt;the width of the directX window&lt;/param&gt;
/// &lt;param name=&quot;d3DImage&quot;&gt;a reference to the d3dImage control use with DirectX&lt;/param&gt;
/// &lt;param name=&quot;windowHandle&quot;&gt;the main window handle&lt;/param&gt;
public ViewModel(uint height, uint width, D3DImage d3DImage, IntPtr windowHandle)
{
    // validate inputs
    if (height &lt;= 0)
        throw new ArgumentOutOfRangeException(&quot;height&quot;, &quot;height must be &gt; 0&quot;);
    if (width &lt;= 0)
        throw new ArgumentOutOfRangeException(&quot;width&quot;, &quot;width must be &gt; 0&quot;);
    if (d3DImage == null)
        throw new ArgumentNullException(&quot;d3DImage&quot;, &quot;d3DImage cannot be null&quot;);
    if (windowHandle == IntPtr.Zero)
        throw new ArgumentException(&quot;windowHandle cannot be zero&quot;, &quot;windowHandle&quot;);

    // set local references
    _height = height;
    _width = width;
    _d3DImage = d3DImage;
    _windowHandle = windowHandle;

    // set up directx
    InitializeDirectX();

    // respond to IsFrontBufferAvailableChanged event from d3DImage
    _d3DImage.IsFrontBufferAvailableChanged += IsFrontBufferAvailableChanged;
}
</pre>
<p>The main thing to note here is that the ViewModel saves a reference to the window handle and the D3DImage control and subscribes to the IsFrontBufferAvailableChanged event on the D3DImage control.  This event is used to Initialize and Uninitialize DirectX and is detailed in the CodeProject article mentioned at the beginning of this page.</p>
<p>The InitializeDirectX method is shown here:</p>
<pre class="brush: csharp; title: ; notranslate">
private void InitializeDirectX()
{
    _directXManager = new DirectXManager();

    _directXManager.Initialize();
    _backBuffer = _directXManager.GetImageBackBuffer(_width, _height, _windowHandle);

    if (_backBuffer != IntPtr.Zero)
    {
        _d3DImage.Lock();
        _d3DImage.SetBackBuffer(D3DResourceType.IDirect3DSurface9, _backBuffer);
        _d3DImage.Unlock();
    }
}
</pre>
<p>As expected, the InitializeDirectX method creates an object of type DirectXManager from the DirectXLibrary, initializes it, and then gets a pointer to the surface DirectX will draw on.  That surface is then passed to the D3DImage control via the SetBackBuffer method.</p>
<p>Now the DirectX surface is seamlessly integrated into the WPF application as the back buffer of the D3DImage.  Whenever the surface image has changed, it can be rendered using the following snippet:</p>
<pre class="brush: csharp; title: ; notranslate">
_d3DImage.Lock();
// make call to DirectXLibrary to redraw the DirectX surface
_d3DImage.AddDirtyRect(new Int32Rect(0, 0, (int)_width, (int)_height));
_d3DImage.Unlock();
</pre>
<p>In order to demonstrate the interaction between the DirectX surface and the application, I implemented a combobox from which the user can select a surface background color.  When a new selection is made, the DirectX surface is cleared to the selected color.  I&#8217;ll leave the details of the user interface and how everything is hooked for to you to explore in the code download.  Enjoy! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.notesonsoftware.com/directx/initializing-directx-9-drawing-in-wpf/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Wpf and DirectX using D3dImage</title>
		<link>http://www.notesonsoftware.com/directx/wpf-and-directx-using-d3dimage/</link>
		<comments>http://www.notesonsoftware.com/directx/wpf-and-directx-using-d3dimage/#comments</comments>
		<pubDate>Mon, 26 Dec 2011 19:13:33 +0000</pubDate>
		<dc:creator>bg</dc:creator>
				<category><![CDATA[DirectX]]></category>
		<category><![CDATA[Wpf]]></category>

		<guid isPermaLink="false">http://www.notesonsoftware.com/?p=16</guid>
		<description><![CDATA[I&#8217;ve been playing around with Wpf and DirectX lately and am starting a series on how to combine the two via the D3dImage control introduced in .Net 3.5 SP1. I&#8217;m mostly documenting this for my own reference, but it might &#8230; <a href="http://www.notesonsoftware.com/directx/wpf-and-directx-using-d3dimage/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing around with Wpf and DirectX lately and am starting a series on how to combine the two via the D3dImage control introduced in .Net 3.5 SP1. I&#8217;m mostly documenting this for my own reference, but it might help a few other folks out as well.</p>
<h2>Here are the articles in the series so far:</h2>
<ul>
<li><a href="http://www.notesonsoftware.com/directx/initializing-directx-9-drawing-in-wpf/" title="Initializing DirectX9 Drawing in WPF">Initializing DirectX 9 Drawing in WPF</a>
</ul>
<h2>Tools used to generate the projects:</h2>
<ul>
<li><a href="http://www.microsoft.com/visualstudio/en-us/products/2010-editions" title="Visual Studio Editions">Visual Studio 2010 Professional</a></li>
<li><a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&#038;id=6812" title="Direct X SDK (June 2010)">DirectX SDK (June 2010)</a></li>
</ul>
<h2>WPF and DirectX Resources:</h2>
<ul>
<li><a href="http://www.codeproject.com/KB/WPF/D3DImage.aspx" title="D3DImage CodeProject article by Dr. Wpf">D3DImage CodeProject article</a></li>
<li><a href="http://www.d3dcoder.net" title="DirectX Programming Books">Various DirectX Programming Books</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.notesonsoftware.com/directx/wpf-and-directx-using-d3dimage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

