Android: Deciding between SurfaceView and OpenGL (GLSurfaceView)

前端 未结 2 1810
盖世英雄少女心
盖世英雄少女心 2020-12-02 13:36

Is there a way to decide up front based on the expected complexity of a game/app in the planning phase whether to use regular Canvas drawing in a SurfaceView or to go with O

2条回答
  •  悲&欢浪女
    2020-12-02 14:23

    All I can say is that it depends on how many sprites you're gonna use. Chris Pruett from Google has also documented this part very well.

    Google I/O 2009 and Google I/O 2010.

    Below is a picture from one of his slides that are related to your topic: enter image description here

    With that knowledge, you should go with OpenGL using the draw_texture extension. Remember to query out the string and check if draw_texture is supported on the actual device.

    For further information that are related to game development in general, see this.

提交回复
热议问题