public class

GLRender

extends Object
java.lang.Object
   ↳ org.opencdnunion.media.streamer.util.gles.GLRender

Class Overview

OpenGL render thread manager. Support GLSurfaceView and TextureView.

Summary

Nested Classes
interface GLRender.GLRenderListener GLRender listener interface. 
interface GLRender.ScreenShotListener  
Constants
int STATE_IDLE
int STATE_READY
int STATE_RELEASED
int VIEW_TYPE_GLSURFACEVIEW
int VIEW_TYPE_NONE
int VIEW_TYPE_OFFSCREEN
int VIEW_TYPE_TEXTUREVIEW
Public Constructors
GLRender()
GLRender(EGLContext eglContext)
Public Methods
void addListener(GLRender.GLRenderListener listener)
Object getCurrentView()
EGLContext getEGL10Context()
android.opengl.EGLContext getEGLContext()
FboManager getFboManager()
int getState()
int getViewType()
void init(GLSurfaceView glSurfaceView)
Init GLRender manager, must be called before GLSurfaceView created.
void init(int width, int height)
Init GLRender manager with offscreen surface.
void init(TextureView textureView)
Init GLRender manager, must be called before TextureView ready.
boolean isGLRenderThread()
void onPause()
void onResume()
void queueDrawFrameAppends(Runnable r)
void queueEvent(Runnable r)
void release()
void removeListener(GLRender.GLRenderListener listener)
void requestRender()
void setInitEGL10Context(EGLContext eglContext)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int STATE_IDLE

Constant Value: 0 (0x00000000)

public static final int STATE_READY

Constant Value: 1 (0x00000001)

public static final int STATE_RELEASED

Constant Value: 2 (0x00000002)

public static final int VIEW_TYPE_GLSURFACEVIEW

Constant Value: 1 (0x00000001)

public static final int VIEW_TYPE_NONE

Constant Value: 0 (0x00000000)

public static final int VIEW_TYPE_OFFSCREEN

Constant Value: 3 (0x00000003)

public static final int VIEW_TYPE_TEXTUREVIEW

Constant Value: 2 (0x00000002)

Public Constructors

public GLRender ()

public GLRender (EGLContext eglContext)

Public Methods

public void addListener (GLRender.GLRenderListener listener)

public Object getCurrentView ()

public EGLContext getEGL10Context ()

public android.opengl.EGLContext getEGLContext ()

public FboManager getFboManager ()

public int getState ()

public int getViewType ()

public void init (GLSurfaceView glSurfaceView)

Init GLRender manager, must be called before GLSurfaceView created.

Parameters
glSurfaceView dedicated GLSurfaceView

public void init (int width, int height)

Init GLRender manager with offscreen surface.

Parameters
width offscreen width
height offscreen height

public void init (TextureView textureView)

Init GLRender manager, must be called before TextureView ready.

Parameters
textureView dedicated TextureView

public boolean isGLRenderThread ()

public void onPause ()

public void onResume ()

public void queueDrawFrameAppends (Runnable r)

public void queueEvent (Runnable r)

public void release ()

public void removeListener (GLRender.GLRenderListener listener)

public void requestRender ()

public void setInitEGL10Context (EGLContext eglContext)