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)