Agora Java API Reference for Android
Classes | Public Member Functions | List of all members
io.agora.rtc.video.GlRectDrawer Class Reference
Inheritance diagram for io.agora.rtc.video.GlRectDrawer:
io.agora.rtc.video.RendererCommon.GlDrawer

Public Member Functions

void drawRgb (int textureId, float[] texMatrix, int x, int y, int srcWidth, int srcHeight, int dstWidth, int dstHeight)
 
void drawRgb (int textureId, float[] texMatrix, int x, int y, int srcWidth, int srcHeight, int dstWidth, int dstHeight, int dstWidth_ori, int dstHeight_ori)
 
void drawOes (int oesTextureId, float[] texMatrix, int x, int y, int srcWidth, int srcHeight, int dstWidth, int dstHeight)
 
void drawOes (int oesTextureId, float[] texMatrix, int x, int y, int srcWidth, int srcHeight, int dstWidth, int dstHeight, int dstWidth_ori, int dstHeight_ori)
 
void drawOes (int oesTextureId, float[] texMatrix, int x, int y, int width, int height)
 
void drawRgb (int textureId, float[] texMatrix, int x, int y, int width, int height)
 
void drawYuv (int[] yuvTextures, float[] texMatrix, int x, int y, int width, int height)
 
void release ()
 

Detailed Description

Helper class to draw an opaque quad on the target viewport location. Rotation, mirror, and cropping is specified using a 4x4 texture coordinate transform matrix. The frame input can either be an OES texture or YUV textures in I420 format. The GL state must be preserved between draw calls, this is intentional to maximize performance. The function release() must be called manually to free the resources held by this object.

Member Function Documentation

◆ drawOes()

void io.agora.rtc.video.GlRectDrawer.drawOes ( int  oesTextureId,
float []  texMatrix,
int  x,
int  y,
int  width,
int  height 
)

Draw an OES texture frame with specified texture transformation matrix. Required resources are allocated at the first call to this function.

Implements io.agora.rtc.video.RendererCommon.GlDrawer.

◆ drawRgb()

void io.agora.rtc.video.GlRectDrawer.drawRgb ( int  textureId,
float []  texMatrix,
int  x,
int  y,
int  width,
int  height 
)

Draw a RGB(A) texture frame with specified texture transformation matrix. Required resources are allocated at the first call to this function.

Implements io.agora.rtc.video.RendererCommon.GlDrawer.

◆ drawYuv()

void io.agora.rtc.video.GlRectDrawer.drawYuv ( int []  yuvTextures,
float []  texMatrix,
int  x,
int  y,
int  width,
int  height 
)

Draw a YUV frame with specified texture transformation matrix. Required resources are allocated at the first call to this function.

Implements io.agora.rtc.video.RendererCommon.GlDrawer.

◆ release()

void io.agora.rtc.video.GlRectDrawer.release ( )

Release all GLES resources. This needs to be done manually, otherwise the resources are leaked.

Implements io.agora.rtc.video.RendererCommon.GlDrawer.