Package tvi.webrtc
Class GlRectDrawer
java.lang.Object
tvi.webrtc.GlRectDrawer
- All Implemented Interfaces:
RendererCommon.GlDrawer
Simplest possible GL shader that just draws frames as opaque quads.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
drawOes
(int oesTextureId, float[] texMatrix, int frameWidth, int frameHeight, int viewportX, int viewportY, int viewportWidth, int viewportHeight) Draw an OES texture frame with specified texture transformation matrix.void
drawRgb
(int textureId, float[] texMatrix, int frameWidth, int frameHeight, int viewportX, int viewportY, int viewportWidth, int viewportHeight) Draw a RGB(A) texture frame with specified texture transformation matrix.void
drawYuv
(int[] yuvTextures, float[] texMatrix, int frameWidth, int frameHeight, int viewportX, int viewportY, int viewportWidth, int viewportHeight) Draw a YUV frame with specified texture transformation matrix.void
release()
Release all GLES resources.
-
Constructor Details
-
GlRectDrawer
public GlRectDrawer()
-
-
Method Details
-
drawOes
public void drawOes(int oesTextureId, float[] texMatrix, int frameWidth, int frameHeight, int viewportX, int viewportY, int viewportWidth, int viewportHeight) Draw an OES texture frame with specified texture transformation matrix. Required resources are allocated at the first call to this function.- Specified by:
drawOes
in interfaceRendererCommon.GlDrawer
-
drawRgb
public void drawRgb(int textureId, float[] texMatrix, int frameWidth, int frameHeight, int viewportX, int viewportY, int viewportWidth, int viewportHeight) Draw a RGB(A) texture frame with specified texture transformation matrix. Required resources are allocated at the first call to this function.- Specified by:
drawRgb
in interfaceRendererCommon.GlDrawer
-
drawYuv
public void drawYuv(int[] yuvTextures, float[] texMatrix, int frameWidth, int frameHeight, int viewportX, int viewportY, int viewportWidth, int viewportHeight) Draw a YUV frame with specified texture transformation matrix. Required resources are allocated at the first call to this function.- Specified by:
drawYuv
in interfaceRendererCommon.GlDrawer
-
release
public void release()Release all GLES resources. This needs to be done manually, otherwise the resources are leaked.- Specified by:
release
in interfaceRendererCommon.GlDrawer
-