-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Direct3D Rendering Cookbook
In this recipe, we will look at how the included sample framework deals with the initialization of size-dependent Direct3D resources within the base Direct3D application class. We review the base class's implementation, and then implement an override for a descending class.
We also review two important graphics pipeline preparation steps that are dependent upon the render target size: creating the viewport for the Rasterizer Stage (RS) and creating a depth/stencil buffer and view for the Output Merger (OM) stage.
We continue on from where we left off in the Using the sample rendering framework recipe.
The application base class D3DApplicationBase initializes the swap chain buffers and render targets within the CreateSizeDependentResources method, which is an event-handler attached to the D3DApplicationBase.OnSizeChanged event. This method has been implemented as follows:
The base implementation is a protected virtual method that allows...
Change the font size
Change margin width
Change background colour