DirectX SDK FAQs

Source: Internet
Author: User
Tags pixel coloring

DirectX SDK documentation.

Microsoft DirectX 9.0 SDK Update (summer 2003)

Or Microsoft DirectX SDK (April 2006.

Microsoft DirectX SDK (CMDL 2006) is in the directory J: \ Program Files \ Microsoft DirectX SDK (CMDL 2006) \ documentation \ directx9.

This document is only a reference for getting started with DirectX and used to query DX APIs. The dx sdk is updated in just a few months and is very fast. Therefore, you can pay attention to Microsoft's DirectX site on Monday. Http://www.microsoft.com/windows/directx/default.mspx this site should provide the most comprehensive and most authoritative DirectX information, consulting, news groups, and most of domestic friends do not often go, because of English problems. I also don't often go there because of English problems. Well, let's look at the dxsdk example.

 

To open the dxsdk document, we open the 9, instead of the dx10.

We can see DirectX graphics. Here we will mainly apply direct3d, concepts, code snippets, and principles.

Because DirectDraw is merged into DirectX graphics since DirectX 8, direct3d is still based on DirectDraw, and some interfaces such as surface can still be seen in direct3d. Expand DirectX graphics to see tutorials and samples, guides, and examples. Several articles, codes, and examples in the Guide should be the basics of DirectX SDK programming. However, because they are in English, many beginners are regressing. Some guys who are not afraid of difficulties are either Kingsoft, or translate them by themselves, or they are eager to find Chinese materials, and finally have to read them by themselves. However, as long as we can see the basics of English, there is no problem. You do not need to be proficient in English. In addition, programmers mainly understand the code, however, when it comes to explaining the concepts and algorithms of the principles of mathematics and physics, poor English may lead to misunderstandings and incomprehension of the article. So we need to start with the Code. After all, the Code is the embodiment of the Principles and algorithms. No matter which level of the Code is high-level and low-level open source, it is a question of reading and understanding, and time allocation issues. (Skip)

 

Expand tutorials and samples. We can see 6 articles in the Guide series.

What have these six articles introduced? From the basic use of direct3d devices to the use of vertexbuffer and

Flexible vertex format (fvf) renders vertices to use matrices to describe the 3D world.

View matrix to Projection Matrix

3D objects are converted to 2D objects (pixels) and rendered to the screen. Because the screen is always flat.

In addition, we also introduced how to use illumination and explained the type of illumination to implement the principle of illumination. In direct3d

Light is almost computation, or simulated computing, so you will say why you don't need real computing, because the real light is very resource-consuming and shows the physical characteristics of light in the world, the energy transfer of light, the color of light, and the change of light consume resources, whether through software simulation or hardware implementation, in terms of Algorithm for implementing the illumination model, the current hardware and software conditions cannot be achieved using a completely real mathematical method, that is, it can be very slow. Only when the hardware is expected to be more powerful, or the software algorithm is more efficient and the simulation is more realistic. This implies that at this stage, simple lighting has little impact on program performance, but the use of a large number of static and dynamic light will be very resource-consuming, so we need to use light with caution,

That is to say, when you learn a certain degree of time, you should always consider the problem.

 

Texture maps are also introduced. texture map is also called material textures material map.

You can attach a static or dynamic texture to a rectangle to achieve a realistic effect.

Texture pasters are also an important foundation. I can only say these two types of normal pasters at the current level.

Although I only mentioned two types of textures, as I know, it seems that each effect is a texture,

What does it mean? There are more than 10 kinds of texture pasters and dozens of texture pasters, which will increase constantly. Don't expect you to learn all the texture pasters at will, so that you will forget your original intention to play games, instead of doing technical research. Unless you are a researcher and have learned the basic texture textures, you can learn the corresponding texture algorithms as needed or use the ready-made libraries.

 

The last guide introduces the use of mesh, mesh is a mesh model, and DirectX uses. X called

The format of XFile. This storage 3D model format is used to depict the 3D models used in the game.

This format is similar to the 3DS md2 MD5 format. The purpose is to store the model.

But the details are different. In the 3D world, a model is used to represent a 3D object,

Or, if you want someone in the game to have a human model, an animal, or an animal model, as a beginner,

The impulse to play games comes from the fact that we love games and hope that we can create a beautiful world,

At the beginning, we imagined our game world very spectacular. What are the things in it,

How many models do you need? So if a game has 10 thousand models and 1 model

The execution efficiency of the game is quite different, so the algorithm and structure of the rendering model are also a huge topic. This article describes how to use DirectX functions to render a model. Of course, DirectX SDK

Provides the loadmesh method, but it is not optimized or not optimized, so you need

Or find a method to render the model more efficiently. The algorithms I know include BSP binary split.

This algorithm can be used to separate a model, manage a scenario, and detect collisions. It is widely used.

It is widely used in many FPS games such as doom quake half life CS unreal.

And evolved BSP management methods with their respective features. However, there are not many discussions about this algorithm in China.

Few people come up with easy-to-understand demos or snippets, but the final reason is that this method is not simple.

Because the management of the entire game world through Binary Trees involves data structures, and many universities in China

There are also courses on data structures. It is not difficult to understand Binary Trees. However, if Binary Trees are used to manage game scenarios and perform collision detection, this university will not teach you, so you need to understand them by yourself. Fortunately, the quake doom half life code is included, but there are a lot of game code, you need to separate the code, branch out, find the BSP part.

However, I saw a simple demonstration of BSP ON THE codesample website. In addition, gamedev.net

There should also be, so you should look for more. Of course they are all from the birds.

 

Tutorial finally introduces the use of HLSL. Currently, HLSL is the trend of the times. Using HLSL to write vertex and pixel coloring devices, hardware vendors simplify the design of transistor circuits and focus on performance and image quality.

At the same time, it increases the flexibility of creation in the software. In the future, no fixed rendering pipelines will be provided for graphics cards after dx10, but HLSL is also a big topic, and an entry is provided here. Including a pass

Vertex animation implemented by HLSL. If you understand this getting started article, DirectX will basically get started. A large amount of samples are required for further exploration.

 

About 35 examples are provided in the sample to help learners understand the new features supported by DirectX.

These 35 examples will also change with the release of each DirectX SDK version, so many previous examples

Maybe you can't see it. For example, some examples in summer 2003 do not exist in limit l 2006.

So have you read these examples and fully understand whether these examples can play games? Or what level can be reached.

 

For example, the custom ui prt shadowmap skinmesh text3d is introduced in objective l 2006.

What do you do? You can customize the UI, that is, some set options in the game. Start a game

The buttons, PRT, seem to be a topic about illumination. I have not understood it yet. shadowmap is a shadowmap.

This example is used to learn how to use a shadow matrix to create a smooth shadow. In addition, shadowvolumn, A Volume Shadow, that is, to project its own shadow like an actual object, is more complex than a flat shadow. That is to say, the algorithms and processing related to light and shadows in the game are complicated, but not the most complicated. In addition, text3d shows how to use fonts in games. I will not talk about more examples, but I should emphasize that simple combinations of these examples, or you cannot use the guide or the knowledge and skills in these examples to create a playable game. Unless the gameplay is very simple, such as snakes. These examples show the latest technologies supported by DirectX,

So it should be a presentation from Microsoft to game programmers, explaining what the latest API of DirectX can do and what new features are supported. It is a technical demonstration to guide programmers to use it. Therefore, it is not for the purpose of teaching. It gradually guides everyone to play games. Therefore, these examples can only be used as a reference for understanding new technologies. Specifically, how to learn how to play games, one is to directly find a small game to change, try to understand it, modify it, expand it, the architecture and the algorithms involved in the game are still mastered. The other is reading books and reading articles.

The book "Windows game programming Masters" and "3D game programming Masters" are excellent teaching materials, which are comprehensive and step-by-step, however, you must have a basic understanding of C/C ++.

While the article is not often scattered, you need to sort it out, DirectX 8 DirectX 9 Entry Articles are almost all copied

Dxsdk document. Therefore, the article has nothing to do.

 

Therefore, the proper method is to read "Windows game programming Masters" and modify the code by yourself. If you try to allocate your time and do not allocate it, you will find that you have been busy for a year, in the past two years, it was impossible to create a complete game.

That's what I do, so I am trying to correct it. Remember it for beginners.

 

Postscript:

There are many materials about DirectX or OpenGL, but few of them are Chinese. Therefore, we do not want to send Chinese documents, but the documents in Microsoft's DirectX SDK software development package are very good api reference materials. It also extracts examples of various principles from various graphics articles GDC and game developers' articles. However, if you are getting started with the game, and you have the C ++ winapi Network Programming Data Structure Database basics, The DirectX SDK itself is a good reference. Let me talk about the articles and examples.

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.