Mygui (version 3.2 Preview) class diagrams and render flow charts, sketched by liigo. 2011-12-16.
Init:
Irendertarget, rendermanager, vertex, ivertexbuf, itexture, directxrendermananger:
Basemanager, layermanager, ilayer,
Ilaynode, ilayeritem:
Layermanager tree:
The liigo update, for example, mainly supplements the rendering content of layer and layernode:
Layermanager tree, layer. rendertotarget (),
Layernode. rendertotarget ():
Renderitem,
Isubwidget:
Directxrendermanage. dorender (...)
Isubwidget. createdrawitem (...):
Summary of mygui rendering process: basemanager. Run ()
-> While (peekmessage ()... basemanager. drawoneframe ()-> idirect3ddevice9. beginscene ()-> rendermanager. drawoneframe
-> Rendermanager. onframeevent (), begin () | setrenderstates, onrendertotarget () end ()-> layermanager. rendertotarget ()-> ilayer. rendertotarget ()
-> Ilayernode. rendertotarget ()-> renderitem. rendertotarget ()-> isubwidget.Dorender() To ivertexbuffer, directxrendermanager. dorender ()
-> Idirect3ddevice9. setstreamsource () to ivertexbuffer-> idirect3ddevice9.Drawprimitive(D3dpt_trianglelist,
...)... And last, idirect3ddevice9. endscene, idirect3ddevice9. Present ().
The core of the entire rendering process isIsubwidget. dorender ()
Generate vertex data (including coordinates, colors, and textures) to the ivertexbuffer.Idirect3ddevice9. drawprimitive (). Text/liigo
The above content is for easy understanding. At present, the level of understanding is limited, so it is not expected to ask for help from external users.
Continued: Flowchart of creating widgets using hand-drawn mygui