Appendix A 5. Direct3D Show

xiaoxiao2021-03-06  63

· Appendix A 5. Direct3D Show

(Cai Junsheng copyright)

How to display a situation in Direct 3D? Or how do you display a frame of a frame? With this problem, let's take a look at the Direct3D display process. Due to any animation, it is based on movies' playing principles. It is because the human eye has image visual delay. When seeing a frame of drawing, it is not possible to disappear from the brain immediately. If you keep at least 24 frames in one second, you will see the picture is a continuous animation. Therefore, in Direct 3D, you will have the ability to display a frame of pictures.

Direct3D uses a function idirect3ddevice9 :: present3ddevice9 :: present to display a frame of animation. To display this frame of animation, there are many jobs to do, first calculate the image position, coloring, texture, background, etc., then put the data into the back buffer, then use the above function to put the backup The buffer replaces the Front Buffer, you can display an animate. Each display device in Direct3D has a backup buffer switching list (SWAP chain), which is used to save the backup buffer, of course, you can add a lot of backup buffers to the inside, the key to the program requires and the size of the program or the system memory size. Direct3D is to obtain a backup buffer in the backup buffer in the backup buffer, you can make the graphics card display animation on the display. Put the previous buffer that has been displayed, in return to the backup buffer switch, allowing the application to constantly copy the display data to the backup buffer of the backup buffer switching list.

转载请注明原文地址:https://www.9cbs.com/read-112524.html

New Post(0)