O'Reilly logo

Game Development with SlimDX by Michael Fontanini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Rendering a triangle

In this section we will set up a basic Direct3D application and render a simple triangle on the screen. We will start by creating a new project called Triangle. In this project, we will first create a new class named TriangleGameWindow.cs. We will need to make it inherit from our GameWindow base class and implement IDisposable, of course.

Note

You will need to get the downloadable code for this book to complete this chapter, particularly for the second demo we will create in this chapter.

Now that we have a new game window class, the next item of business is to get Direct3D set up and ready to go. We will need to add some using statements to the top of the file first though. These allow us to use Direct3D in our code. The following ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required