Preliminary Exploration of direct3d technology-Basic rendering process

Source: Internet
Author: User

What operations are required for rendering? This varies and is complicated with the depth of application technology.

In general, the real-time information update section includes:

1Update roaming information: handles real-time mouse and keyboard events

The mouse or keyboard triggers operations such as scene model translation, rotation, scaling, camera rotation, and translation.

2Camera Information Update: Changes in camera position, orientation, and other information

Camera update directly affects the real-time update of the view matrix and projection matrix.

3Model Information Update: Changes in model location and size and rendering of Models

Model translation matrix, rotation matrix, scaling matrix change, and real-time update of world Matrix

For model rendering, you need to deal with multiple details:

Set the rendering status before proceeding. OpenAlphaTest,Alpha Cutting Subtract and remove the backend and texture layer filter settings

And then you need to set materials, textures, and other details.

The last step of model rendering:

generally, the drawsubset (DWORD attribid),

attribid specifies the subset of the mesh to be drawn, splits a plane in a grid into one or more attribute groups.

CallSetstreamsource ( Streamnumber ,Streamdata,Ffsetinbytes,Tride ) This functionSet Vertex Cache

Bind to a device data stream, and then execute Setindices (pindexdata), and then Run Setfvf (fvf ),Last call:

 

before alpha test alpha = "En-us">:

OpenAlphaTestAlphaAfter reduction:

 

You can also use the following method:Idirect3ddevice9Interface)

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.