Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Direct3D Rendering Cookbook

You're reading from  Direct3D Rendering Cookbook

Product type Book
Published in Jan 2014
Publisher
ISBN-13 9781849697101
Pages 430 pages
Edition 1st Edition
Languages

Table of Contents (19) Chapters

Direct3D Rendering Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started with Direct3D 2. Rendering with Direct3D 3. Rendering Meshes 4. Animating Meshes with Vertex Skinning 5. Applying Hardware Tessellation 6. Adding Surface Detail with Normal and Displacement Mapping 7. Performing Image Processing Techniques 8. Incorporating Physics and Simulations 9. Rendering on Multiple Threads and Deferred Contexts 10. Implementing Deferred Rendering 11. Integrating Direct3D with XAML and Windows 8.1 Further Reading
Index

Rendering primitives


Now that we have our rendering framework ready, we can finally work on the more interesting stuff—actually rendering something!

All rendered objects, at their simplest form, are made up of one or more primitives: points, lines, or triangles which are made up of one or more vertices. In this recipe, we will render the following primitives:

  • A set of colored arrows representing the x, y, and z axes (red, green, and blue) using lines

  • A triangle using a triangle

  • A quad (made up of two triangles)

We will also implement our WVP matrix and see how multisampling affects the rendered image. The final result is shown in the following figure:

Rendering primitives final output

Getting ready

We'll start by creating a new Windows Form Application project named Ch02_01RenderingPrimitives in the D3DRendering.sln solution:

  1. Add the SharpDX.dll, SharpDX.DXGI.dll and SharpDX.Direct3D11.dll references like we did in the previous recipes.

  2. Next, we will add a reference to .\External\bin\SharpDX.D3DCompiler...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}