# 2D resource import and hybrid rendering
This chapter mainly introduces the use of NGUI resource import, external bitmap fonts, skeletal animation, FairyGUI and other external UI solutions mixed rendering.
# External bitmap font import, bone animation import, FairyGUI import
External resource import overview
# Hybrid rendering
Use external Canvas (Canvas2D/WebGL) to draw part of the interface,
You can use the mixed rendering
scheme
# Use hybrid rendering
- Run at the same time, the runtime of the engine and.
# Support for sharing textures
- Obtain the drawn Canvas, and initialize the texture with the
initWithCanvas
method ofTexture2D
. - Use the engine's
UISprite
to render this texture directly.
# Does not support sharing textures
- Use the
initDynamicTexture
method ofTexture2D
to initialize the dynamic texture. - Use the engine's
UISprite
to render this texture directly. - After each frame update, call the
updateSubTexture
method of this texture to transfer Canvas data into the texture.