# 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

Use of skeletal animation

# Hybrid rendering

Use external Canvas (Canvas2D/WebGL) to draw part of the interface, You can use the mixed rendering scheme

# Use hybrid rendering

  1. Run at the same time, the runtime of the engine and.

# Support for sharing textures

  1. Obtain the drawn Canvas, and initialize the texture with the initWithCanvas method of Texture2D.
  2. Use the engine's UISprite to render this texture directly.

# Does not support sharing textures

  1. Use the initDynamicTexture method of Texture2D to initialize the dynamic texture.
  2. Use the engine's UISprite to render this texture directly.
  3. After each frame update, call the updateSubTexture method of this texture to transfer Canvas data into the texture.
点击咨询小助手