DirectX API programming started #01 project settings,

Source: Internet
Author: User

DirectX API programming started #01 project settings,

I learned how to use the DirectX API from scratch.

Tutorial: rastertek-> DirectX 11 Tutorials

Preparations

1) first, we need a set of software that can write code. I use Microsoft's own IDE: Visual Studio2015

VS2015 community edition (free)

For beginners, a good IDE can indeed improve efficiency. However, it depends on your personal preferences.

2) to be able to manipulate graphics devices, we also need DirectX SDK, which is the object we focus on and learn this time.

  

PleaseInstall in a proper placeYou do not have to install it on the system disk. The installation address is too deep for future use.

After installation, go to the "installation directory"(Use "DirectXSDK" later)\ Samples \ SampleBrowser "There is an example samplebrowser.exe under the folder", which contains many built-in cases and tutorials. If you are fine, you can check them out.

After the installation is complete, the preparation is basically complete. You can familiarize yourself with the VS interface and adjust the settings to make it more suitable for you.

Project Creation

Open Visual Studio (VS) and click File> New> Project in the upper left corner;

In the pop-up window (for example), select the project from the list on the left, select "Win32 Project" in the middle, and fill in the project name and path below.

 

After you click OK, a window will pop up. Click "Next" at the bottom, and then click set. Make sure to select "Empty Projects" and click "OK, an empty Win 32 project is created.

PS: Win32 refers to the 32-bit environment of the Microsoft Windows operating system. Although most of our computers today are 64-bit, this does not affect our programming.

 

Project Settings

Because we need to use DIrectX APIs, we need to include their paths so that they can be called normally during compilation.

After creating a project, Open View> other window> property manager, or search for "Property Manager" in the search bar in the upper right corner. If you have installed the English version, please find the corresponding English...

In the property manager, expand the project settings (triangle on the leftmost side of the point), select Debug | Win32 (as long as Debug is required), and double-click Microsoft. Cpp. Win32.user. For example

In the displayed window, select "VC ++ directory", as shown in figure


What we need to change is "include directory" and "library directory"

Set "include directory" first ":

(Your DirectXSDK installation location) \ Include

Click "OK" to close.

Set the "library directory". The operation is similar to Step 1 and Step 2 above, but set the path

(Your DirectXSDK installation location) \ Lib \ x86

All the way to determine and save the project, so that we can properly compile the code for DirectX.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.