tingfengainiaini / GLTextureView-1

Almost the same api as GLSurfaceView, another android OpenGL surface implementation using TextureView

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GLTextureView

Another Easy-way to Use OpenGL

GLSurfaceView is just one way to incorporate OpenGL ES graphics into your application. For a full-screen or near-full screen graphics view, it is a reasonable choice. Developers who want to incorporate OpenGL ES graphics in a small portion of their layouts should take a look at TextureView. For real, do-it-yourself developers, it is also possible to build up an OpenGL ES view using SurfaceView, but this requires writing quite a bit of additional code. See more on https://developer.android.com/training/graphics/opengl/environment.html

GLSurfaceView v.s. GLTextureView

GLSurfaceView

  • Two window. Host window manager the view hierarchy; And other surface window attarch to the host
  • 'Punches' a hole in its host window to allow its surface to be displayed, make it transparent region
  • GLSurfaceView.updateWindow() on onPreDraw(), different UI update time

GLTextureView

  • Only one window
  • Behave the same as usual view, such as alpha and animation
  • Only be used in a hardware accelerated window

GLTextureView can avoid drawing transparent region. In this case, user will see blocked graph not drawn by the current visible window.

Javadoc

https://wtao901231.github.io/GLTextureView/javadoc/index.html

About

Almost the same api as GLSurfaceView, another android OpenGL surface implementation using TextureView


Languages

Language:Java 100.0%