2,99 €
This title is one of the "Essentials" IT Books published by TechNet Publications Limited.
This Book is a very helpful practical guide for beginners in the topic , which can be used as a learning material for students pursuing their studies in undergraduate and graduate levels in universities and colleges and those who want to learn the topic via a short and complete resource.
We hope you find this book useful in shaping your future career.
This book will be available soon...
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Veröffentlichungsjahr: 2016
Table of Contents
The Story behind the Succinctly Series of Books
About the Author
Introduction
Part 1 Direct2D
Chapter 1: Direct2D (XAML) Template
Chapter 2: Debugging with a WinRT Device
Chapter 3: Beginning a Graph Rendering App
Chapter 4: Graph Backgrounds
Chapter 5: 2-D Data Plots
Chapter 6: Infinite Lines and the Axes
Chapter 7: Displaying FPS (Frames per Second)
Chapter 8: Line Charts
Chapter 9: Navigating between Multiple XAML Pages
Chapter 10: Printing Direct2D
Chapter 11: Margins
Chapter 12: Zooming
Chapter 13: Hit Testing or Picking
Chapter 14: Direct2D Geometry
Part 2 Direct3D
Chapter 15: Rendering Pipeline
Chapter 16: Starting a Direct3D Project
Chapter 17: Rendering a Triangle with Direct3D
Chapter 18: Rendering a Height Map
Chapter 19: Projection Options
Conclusion
Appendix A: Microsoft Limited Public License
MICROSOFT LIMITED PUBLIC LICENSE version 1.1
Appendix B: DirectXPage.xaml Class Listing
Appendix C: CDocSource Class Code Listing
Appendix D: Code Listing for SimpleTextRenderer Printing
Detailed Table of Contents
Introduction
This book is an introduction to some of the capabilities of Direct2D and Direct3D. Direct2D and Direct3D are the graphics rendering components of DirectX. It is about leveraging the graphics card and DirectX to efficiently represent data. It is aimed at programmers already familiar with C++ (both managed and unmanaged) and Visual Studio 2012 Express. We will be using the version of Visual Studio designed for Windows 8 application development, not the desktop version. The desktop version is designed for building standard Windows Forms applications, and the version for Windows 8 is designed for Windows Store applications. This book presents methods for rendering vector graphics and visualizing different types of data on Windows 8 and Windows RT platforms using Direct2D and Direct3D. It is not an in-depth discussion of these topics; for further information, consult the appropriate MSDN library pages from Microsoft along with the specification of the graphics hardware for which you are programming.
This book provides a general introduction to Direct2D and Direct3D. It is written from the perspective of rendering data as nodes and lines, but the information presented is useful for any applications that require efficient rendering using DirectX. In the initial chapters of this book we will develop a small but scalable charting system that can be adapted to suit other projects or incorporated into an existing project. We will examine some common requirements of charting applications, such as detecting if the pointer is near a node, as well as printing Direct2D.
In the interest of keeping things as general as possible, I have generated random data in the examples. In a real situation this data would be loaded from some data source. I will also build on the standard project templates provided by Visual Studio 2012, rather than concentrate on the boilerplate code. The verbose DirectX boilerplate code is a barrier for any programmers hoping to become familiar with the API. Thankfully, the templates supplied with Visual Studio 2012 write all of the boilerplate code for us. We will largely take it for granted, and examine options in the boilerplate code as they arise.
The code in this book is designed for desktop PCs running Windows 8 and tablet PCs running Windows RT. It has been formatted to suit the page of this document. This means it is very difficult to read, and should be reformatted if it is copied and pasted for testing purposes.
Part 1 Direct2D
Direct2D is a graphics API (Application Programming Interface) designed to render 2-D vector and raster graphics. It is built on top of the Direct3D API, which in turn is built on the DXGI (DirectX Graphics Infrastructure). It can be used in conjunction with Direct3D to render any 2-D portions of a scene. It is high performance, leveraging the GPU for efficient, complex 2-D graphics.
Note: Throughout this book I will refer to GPU many times (short for Graphics Processing Unit). The term GPU usually refers to a dedicated graphics card, however, I will use the term more generally to refer to the hardware which performs the majority of graphics processing in a computer. This includes a dedicated graphics card, an onboard graphics card, or the execution units in the NVidia Tegra chips in the WinRT devices.
The API consists of a number of interfaces (COM objects), which are used to communicate with the graphics hardware. It can render vector primitives, like lines and ellipses, and can also fill shapes with solid colors or gradients, as well as display raster images. Raster graphics are composed of pixels, one for each point on a screen (or image). The pixels each have values which determine their colors, and collectively they are arranged in a large grid.
Direct2D is important for visualizing data because many chart types (line charts, scatter plots, etc.) are fundamentally 2-D in design. The most important difference between using Direct2D and using Direct3D to render 2-D graphics is simplicity. Direct3D is orders of magnitude faster than Direct2D but it is more complicated to program. In addition to this, the Direct2D project template is a perfect combination of standard Windows 8 XAML and Direct2D. This allows programmers to use standard Windows 8 controls and XAML pages to deal with user input, while Direct2D handles all the graphics processing. This combination of DirectX and XAML is a feature only available in Windows 8 applications.
Figure 1: Relationship between Major DirectX Components
The graphics driver is the lowest level depicted; it controls the hardware directly. Above this is the DirectX Graphics Infrastructure (DXGI), then Direct3D and finally Direct2D. The software rasterizer is used in place of graphics hardware, it uses the CPU to render graphics when a dedicated GPU is not available.