public class WZGLES extends Object
Modifier and Type | Class and Description |
---|---|
static class |
WZGLES.EglEnv
The class used by the GoCoder SDK to encapsulate OpenGL ES
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_GLES_VERSION |
static float[] |
IDENTITY_MATRIX
A 4x4 array initialized as an identity matrix
|
Constructor and Description |
---|
WZGLES() |
Modifier and Type | Method and Description |
---|---|
static int |
checkEglError(String caller)
Deprecated.
|
static int |
checkForEglError(String caller)
Calls
EGL14#eglGetError() and logs an error if the last EGL call produced an error |
static EGLContext |
createEglContext(EGLDisplay eglDisplay,
int version)
Create an
EGLContext for the specified EGLDisplay and EGL version |
static EGLContext |
createEglContext(EGLDisplay eglDisplay,
int version,
EGLContext eglContextShared)
Create an
EGLContext for the specified EGLDisplay and EGL version |
static EGLContext |
createEglContext(EGLDisplay eglDisplay,
int version,
EGLContext eglContextShared,
boolean recordable)
Create an
EGLContext for the specified EGLDisplay and EGL version |
static EGLSurface |
createEglWindowSurface(Object surface,
EGLDisplay eglDisplay,
EGLConfig eglConfig)
Wraps a native Android
Surface or SurfaceTexture with an EGLSurface |
static void |
destroyEglContext(EGLDisplay eglDisplay,
EGLContext eglContext)
Destroy the specified
EGLContext |
static EGLConfig |
getEglConfig(EGLDisplay eglDisplay,
int version)
Returns the first matching
EGLConfig for the specified EGLDisplay and version |
static EGLConfig |
getEglConfig(EGLDisplay eglDisplay,
int version,
boolean recordable)
Returns the first matching
EGLConfig for the specified EGLDisplay and version |
static EGLConfig |
getEglContextConfig(EGLDisplay eglDisplay,
EGLContext eglContext)
Returns the first matching
EGLConfig for the specified EGLDisplay and EGLContext |
static int |
getEglContextVersion(EGLDisplay eglDisplay,
EGLContext eglContext)
Returns the EGL version for the specified
EGLDisplay and EGLContext |
static int |
getEglError()
Returns and error code produced by the last EGL call
|
static String |
getEglErrorString(int eglError)
Returns a human readable string for the most common EGL error strings
|
static String |
getEglInfo()
Deprecated.
use
getEglInfo(boolean) instead |
static String |
getEglInfo(boolean includeExtensions)
Returns detailed EGL support information for the current device
|
static WZDataMap |
getEglInfoDataMap()
Returns detailed EGL support information for the current device
|
static EGLConfig |
getEglSurfaceConfig(EGLDisplay eglDisplay,
EGLSurface eglSurface)
Returns the
EGLConfig for the specified EGLSurface |
static WZSize |
getEglSurfaceSize(EGLDisplay eglDisplay,
EGLSurface eglSurface)
Returns the dimensions for the specified
EGLSurface |
static String |
matrixToString(float[] matrix)
Convert a 4x4 matrix stored in a float[16] array to a human readable string
|
static String |
matrixToString(String header,
float[] matrix)
Convert a 4x4 matrix stored in a float[16] array to a human readable string
|
static int |
surfaceToEGLRotation(int surfaceRotation)
Converts a
Surface rotation angle to an EGL-based rotation angle |
public static final int DEFAULT_GLES_VERSION
public static final float[] IDENTITY_MATRIX
public static int checkForEglError(String caller)
EGL14#eglGetError()
and logs an error if the last EGL call produced an errorcaller
- The calling routine name to logEGL14#EGL_SUCCESS
EGL_SUCCESS if no error occurredpublic static int getEglError()
EGL14#EGL_SUCCESS
EGL_SUCCESS if no error occurredpublic static String getEglErrorString(int eglError)
eglError
- The egl error codepublic static String getEglInfo(boolean includeExtensions)
includeExtensions
- A flag indicating if EGL extension support information should be includedpublic static WZDataMap getEglInfoDataMap()
WZDataMap
containing detailed EGL support informationpublic static String getEglInfo()
getEglInfo(boolean)
insteadpublic static String matrixToString(String header, float[] matrix)
header
- A header to prepend to the outputmatrix
- A 4x4 matrixpublic static String matrixToString(float[] matrix)
matrix
- A 4x4 matrixpublic static EGLConfig getEglConfig(EGLDisplay eglDisplay, int version, boolean recordable)
EGLConfig
for the specified EGLDisplay
and versioneglDisplay
- The EGL displayversion
- The EGL versionrecordable
- A flag indicating whether to require the EGL_ANDROID_RECORDABLE extension or notEGLConfig
or null if one was not foundpublic static EGLConfig getEglConfig(EGLDisplay eglDisplay, int version)
EGLConfig
for the specified EGLDisplay
and versioneglDisplay
- The EGL displayversion
- The EGL versionEGLConfig
or null if one was not foundpublic static EGLContext createEglContext(EGLDisplay eglDisplay, int version, EGLContext eglContextShared, boolean recordable)
EGLContext
for the specified EGLDisplay
and EGL versioneglDisplay
- The EGL displayversion
- The EGL versioneglContextShared
- Unless EGL14#EGL_NO_CONTEXT
is specified, the newly created context will share EGL resources with the specified contextrecordable
- Indicates that the newly created context should support the EGL_ANDROID_RECORDABLE extension
for use with android.media.MediaCodec
public static EGLContext createEglContext(EGLDisplay eglDisplay, int version, EGLContext eglContextShared)
EGLContext
for the specified EGLDisplay
and EGL versioneglDisplay
- The EGL displayversion
- The EGL versioneglContextShared
- Unless EGL14#EGL_NO_CONTEXT
is specified, the newly created context will share EGL resources with the specified contextpublic static EGLContext createEglContext(EGLDisplay eglDisplay, int version)
EGLContext
for the specified EGLDisplay
and EGL versioneglDisplay
- The EGL displayversion
- The EGL versionpublic static EGLConfig getEglContextConfig(EGLDisplay eglDisplay, EGLContext eglContext)
EGLConfig
for the specified EGLDisplay
and EGLContext
eglDisplay
- The EGL displayeglContext
- The EGL contextEGLConfig
or null if one was not foundpublic static int getEglContextVersion(EGLDisplay eglDisplay, EGLContext eglContext)
EGLDisplay
and EGLContext
eglDisplay
- The EGL displayeglContext
- The EGL contextpublic static void destroyEglContext(EGLDisplay eglDisplay, EGLContext eglContext)
EGLContext
eglDisplay
- The EGL displayeglContext
- The EGL contextpublic static EGLSurface createEglWindowSurface(Object surface, EGLDisplay eglDisplay, EGLConfig eglConfig)
Surface
or SurfaceTexture
with an EGLSurface
surface
- A Surface
or SurfaceTexture
instance to wrap with an EGLSurface
eglDisplay
- The EGL displayeglConfig
- The EGL config to useEGL14#EGL_NO_SURFACE
if an error occurredpublic static WZSize getEglSurfaceSize(EGLDisplay eglDisplay, EGLSurface eglSurface)
EGLSurface
eglDisplay
- The EGL displayeglSurface
- The EGL surfacepublic static EGLConfig getEglSurfaceConfig(EGLDisplay eglDisplay, EGLSurface eglSurface)
EGLConfig
for the specified EGLSurface
eglDisplay
- The EGL displayeglSurface
- The EGL surfacepublic static int surfaceToEGLRotation(int surfaceRotation)
Surface
rotation angle to an EGL-based rotation anglesurfaceRotation
- The rotation angle of the screen from its "natural" orientation.public static int checkEglError(String caller)
checkForEglError(String)
© 2016 Wowza Media Systems, LLC. All rights reserved. Terms | Privacy | Trademarks | Legal