ChartDemo.wmv — Although D2D can render thousands (the exact amount depends on the video hardware that’s used, quality of drivers, amount of memory, etc) of anti-aliased primitives per second, there are some cases where even greater performance is required. ChartDemo demonstrates an alternative approach that uses aliased lines and rectangles (primitives that have been highly optimized in D2D) along with MSAA rendering (via D3D interop). With this approach, ChartDemo is able to scale much further.
Chomp.wmv — This demo started out as a simple 2D Pac Man-like game and, gradually, we kept adding features; for example, zooming, god-mode and, unlike the original Pac Man game, our variation maps the playfield onto the outside faces of a cube, and rotates the cube to the closest contiguous face as the Chomp character runs through the tunnels. One other important note is that the playfield is rendered entirely using anti-aliased vector primitives — not bitmaps — so features such as zooming can be accomplished without scaling artifacts.
SciFiText.wmv — This sample combines Direct2D and Direct3D to achieve what is commonly known as the “scrolling Star Wars text effect”. An application can render Direct2D content into a Direct3D surface, and then display that surface at an angle to the camera.
SimplePathAnimation.wmv — This sample demonstrates how to use a Direct2D Path Geometry to drive a path animation. Every D2D geometry exposes a ID2D1Geometry::ComputePointAtLength method, which can be used to obtain a point and tangent vector for any given length.
TextExtrusion.wmv — This sample illustrates how DirectWrite, Direct2D, and Direct3D can be combined to create a text-extrusion effect. Text geometry is generated using a custom IDWriteTextRenderer that calls into IDWriteFontFace::GetGlyphRunOutline. D2D geometry operations are then used to eliminate self-intersections and tessellate the front and back faces. Side faces are generated by walking the text geometry and emitting quads. DWrite hit-testing is also used for positioning of the cursor. Finally, the generated triangles are sent to D3D for rasterization.