FileDocCategorySizeDatePackage
GLImpl.javaAPI DocAndroid 5.1 API53948Thu Mar 12 22:22:40 GMT 2015com.google.android.gles_jni

GLImpl

public class GLImpl extends Object implements javax.microedition.khronos.opengles.GL11, javax.microedition.khronos.opengles.GL10, javax.microedition.khronos.opengles.GL11Ext, javax.microedition.khronos.opengles.GL10Ext, javax.microedition.khronos.opengles.GL11ExtensionPack

Fields Summary
Buffer
_colorPointer
Buffer
_normalPointer
Buffer
_texCoordPointer
Buffer
_vertexPointer
Buffer
_pointSizePointerOES
Buffer
_matrixIndexPointerOES
Buffer
_weightPointerOES
private boolean
haveCheckedExtensions
private boolean
have_OES_blend_equation_separate
private boolean
have_OES_blend_subtract
private boolean
have_OES_framebuffer_object
private boolean
have_OES_texture_cube_map
Constructors Summary
public GLImpl()


      
    
Methods Summary
public native java.lang.String_glGetString(int name)

private static native void_nativeClassInit()

private static booleanallowIndirectBuffers(java.lang.String appName)

        boolean result = false;
        int version = 0;
        IPackageManager pm = AppGlobals.getPackageManager();
        try {
            ApplicationInfo applicationInfo = pm.getApplicationInfo(appName, 0, UserHandle.myUserId());
            if (applicationInfo != null) {
                version = applicationInfo.targetSdkVersion;
            }
        } catch (android.os.RemoteException e) {
            // ignore
        }
        Log.e("OpenGLES", String.format(
            "Application %s (SDK target %d) called a GL11 Pointer method with an indirect Buffer.",
            appName, version));
        if (version <= Build.VERSION_CODES.CUPCAKE) {
            result = true;
        }
        return result;
    
public native voidglActiveTexture(int texture)

public native voidglAlphaFunc(int func, float ref)

public native voidglAlphaFuncx(int func, int ref)

public native voidglBindBuffer(int target, int buffer)

public native voidglBindFramebufferOES(int target, int framebuffer)

public native voidglBindRenderbufferOES(int target, int renderbuffer)

public native voidglBindTexture(int target, int texture)

public native voidglBlendEquation(int mode)

public native voidglBlendEquationSeparate(int modeRGB, int modeAlpha)

public native voidglBlendFunc(int sfactor, int dfactor)

public native voidglBlendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha)

public native voidglBufferData(int target, int size, java.nio.Buffer data, int usage)

public native voidglBufferSubData(int target, int offset, int size, java.nio.Buffer data)

public native intglCheckFramebufferStatusOES(int target)

public native voidglClear(int mask)

public native voidglClearColor(float red, float green, float blue, float alpha)

public native voidglClearColorx(int red, int green, int blue, int alpha)

public native voidglClearDepthf(float depth)

public native voidglClearDepthx(int depth)

public native voidglClearStencil(int s)

public native voidglClientActiveTexture(int texture)

public native voidglClipPlanef(int plane, float[] equation, int offset)

public native voidglClipPlanef(int plane, java.nio.FloatBuffer equation)

public native voidglClipPlanex(int plane, int[] equation, int offset)

public native voidglClipPlanex(int plane, java.nio.IntBuffer equation)

public native voidglColor4f(float red, float green, float blue, float alpha)

public native voidglColor4ub(byte red, byte green, byte blue, byte alpha)

public native voidglColor4x(int red, int green, int blue, int alpha)

public native voidglColorMask(boolean red, boolean green, boolean blue, boolean alpha)

public native voidglColorPointer(int size, int type, int stride, int offset)

public voidglColorPointer(int size, int type, int stride, java.nio.Buffer pointer)

        glColorPointerBounds(
            size,
            type,
            stride,
            pointer,
            pointer.remaining()
        );
        if ((size == 4) &&
            ((type == GL_FLOAT) ||
             (type == GL_UNSIGNED_BYTE) ||
             (type == GL_FIXED)) &&
            (stride >= 0)) {
            _colorPointer = pointer;
        }
    
private native voidglColorPointerBounds(int size, int type, int stride, java.nio.Buffer pointer, int remaining)

public native voidglCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, java.nio.Buffer data)

public native voidglCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, java.nio.Buffer data)

public native voidglCopyTexImage2D(int target, int level, int internalformat, int x, int y, int width, int height, int border)

public native voidglCopyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height)

public native voidglCullFace(int mode)

public native voidglCurrentPaletteMatrixOES(int matrixpaletteindex)

public native voidglDeleteBuffers(int n, int[] buffers, int offset)

public native voidglDeleteBuffers(int n, java.nio.IntBuffer buffers)

public native voidglDeleteFramebuffersOES(int n, int[] framebuffers, int offset)

public native voidglDeleteFramebuffersOES(int n, java.nio.IntBuffer framebuffers)

public native voidglDeleteRenderbuffersOES(int n, int[] renderbuffers, int offset)

public native voidglDeleteRenderbuffersOES(int n, java.nio.IntBuffer renderbuffers)

public native voidglDeleteTextures(int n, int[] textures, int offset)

public native voidglDeleteTextures(int n, java.nio.IntBuffer textures)

public native voidglDepthFunc(int func)

public native voidglDepthMask(boolean flag)

public native voidglDepthRangef(float zNear, float zFar)

public native voidglDepthRangex(int zNear, int zFar)

public native voidglDisable(int cap)

public native voidglDisableClientState(int array)

public native voidglDrawArrays(int mode, int first, int count)

public native voidglDrawElements(int mode, int count, int type, int offset)

public native voidglDrawElements(int mode, int count, int type, java.nio.Buffer indices)

public native voidglDrawTexfOES(float x, float y, float z, float width, float height)

public native voidglDrawTexfvOES(float[] coords, int offset)

public native voidglDrawTexfvOES(java.nio.FloatBuffer coords)

public native voidglDrawTexiOES(int x, int y, int z, int width, int height)

public native voidglDrawTexivOES(int[] coords, int offset)

public native voidglDrawTexivOES(java.nio.IntBuffer coords)

public native voidglDrawTexsOES(short x, short y, short z, short width, short height)

public native voidglDrawTexsvOES(short[] coords, int offset)

public native voidglDrawTexsvOES(java.nio.ShortBuffer coords)

public native voidglDrawTexxOES(int x, int y, int z, int width, int height)

public native voidglDrawTexxvOES(int[] coords, int offset)

public native voidglDrawTexxvOES(java.nio.IntBuffer coords)

public native voidglEnable(int cap)

public native voidglEnableClientState(int array)

public native voidglFinish()

public native voidglFlush()

public native voidglFogf(int pname, float param)

public native voidglFogfv(int pname, float[] params, int offset)

public native voidglFogfv(int pname, java.nio.FloatBuffer params)

public native voidglFogx(int pname, int param)

public native voidglFogxv(int pname, int[] params, int offset)

public native voidglFogxv(int pname, java.nio.IntBuffer params)

public native voidglFramebufferRenderbufferOES(int target, int attachment, int renderbuffertarget, int renderbuffer)

public native voidglFramebufferTexture2DOES(int target, int attachment, int textarget, int texture, int level)

public native voidglFrontFace(int mode)

public native voidglFrustumf(float left, float right, float bottom, float top, float zNear, float zFar)

public native voidglFrustumx(int left, int right, int bottom, int top, int zNear, int zFar)

public native voidglGenBuffers(int n, int[] buffers, int offset)

public native voidglGenBuffers(int n, java.nio.IntBuffer buffers)

public native voidglGenFramebuffersOES(int n, int[] framebuffers, int offset)

public native voidglGenFramebuffersOES(int n, java.nio.IntBuffer framebuffers)

public native voidglGenRenderbuffersOES(int n, int[] renderbuffers, int offset)

public native voidglGenRenderbuffersOES(int n, java.nio.IntBuffer renderbuffers)

public native voidglGenTextures(int n, int[] textures, int offset)

public native voidglGenTextures(int n, java.nio.IntBuffer textures)

public native voidglGenerateMipmapOES(int target)

public native voidglGetBooleanv(int pname, boolean[] params, int offset)

public native voidglGetBooleanv(int pname, java.nio.IntBuffer params)

public native voidglGetBufferParameteriv(int target, int pname, int[] params, int offset)

public native voidglGetBufferParameteriv(int target, int pname, java.nio.IntBuffer params)

public native voidglGetClipPlanef(int pname, float[] eqn, int offset)

public native voidglGetClipPlanef(int pname, java.nio.FloatBuffer eqn)

public native voidglGetClipPlanex(int pname, int[] eqn, int offset)

public native voidglGetClipPlanex(int pname, java.nio.IntBuffer eqn)

public native intglGetError()

public native voidglGetFixedv(int pname, int[] params, int offset)

public native voidglGetFixedv(int pname, java.nio.IntBuffer params)

public native voidglGetFloatv(int pname, float[] params, int offset)

public native voidglGetFloatv(int pname, java.nio.FloatBuffer params)

public native voidglGetFramebufferAttachmentParameterivOES(int target, int attachment, int pname, int[] params, int offset)

public native voidglGetFramebufferAttachmentParameterivOES(int target, int attachment, int pname, java.nio.IntBuffer params)

public native voidglGetIntegerv(int pname, int[] params, int offset)

public native voidglGetIntegerv(int pname, java.nio.IntBuffer params)

public native voidglGetLightfv(int light, int pname, float[] params, int offset)

public native voidglGetLightfv(int light, int pname, java.nio.FloatBuffer params)

public native voidglGetLightxv(int light, int pname, int[] params, int offset)

public native voidglGetLightxv(int light, int pname, java.nio.IntBuffer params)

public native voidglGetMaterialfv(int face, int pname, float[] params, int offset)

public native voidglGetMaterialfv(int face, int pname, java.nio.FloatBuffer params)

public native voidglGetMaterialxv(int face, int pname, int[] params, int offset)

public native voidglGetMaterialxv(int face, int pname, java.nio.IntBuffer params)

public voidglGetPointerv(int pname, java.nio.Buffer[] params)

        throw new UnsupportedOperationException("glGetPointerv");
    
public native voidglGetRenderbufferParameterivOES(int target, int pname, int[] params, int offset)

public native voidglGetRenderbufferParameterivOES(int target, int pname, java.nio.IntBuffer params)

public java.lang.StringglGetString(int name)

        String returnValue;
        returnValue = _glGetString(
            name
        );
        return returnValue;
    
public native voidglGetTexEnviv(int env, int pname, int[] params, int offset)

public native voidglGetTexEnviv(int env, int pname, java.nio.IntBuffer params)

public native voidglGetTexEnvxv(int env, int pname, int[] params, int offset)

public native voidglGetTexEnvxv(int env, int pname, java.nio.IntBuffer params)

public native voidglGetTexGenfv(int coord, int pname, float[] params, int offset)

public native voidglGetTexGenfv(int coord, int pname, java.nio.FloatBuffer params)

public native voidglGetTexGeniv(int coord, int pname, int[] params, int offset)

public native voidglGetTexGeniv(int coord, int pname, java.nio.IntBuffer params)

public native voidglGetTexGenxv(int coord, int pname, int[] params, int offset)

public native voidglGetTexGenxv(int coord, int pname, java.nio.IntBuffer params)

public native voidglGetTexParameterfv(int target, int pname, float[] params, int offset)

public native voidglGetTexParameterfv(int target, int pname, java.nio.FloatBuffer params)

public native voidglGetTexParameteriv(int target, int pname, int[] params, int offset)

public native voidglGetTexParameteriv(int target, int pname, java.nio.IntBuffer params)

public native voidglGetTexParameterxv(int target, int pname, int[] params, int offset)

public native voidglGetTexParameterxv(int target, int pname, java.nio.IntBuffer params)

public native voidglHint(int target, int mode)

public native booleanglIsBuffer(int buffer)

public native booleanglIsEnabled(int cap)

public native booleanglIsFramebufferOES(int framebuffer)

public native booleanglIsRenderbufferOES(int renderbuffer)

public native booleanglIsTexture(int texture)

public native voidglLightModelf(int pname, float param)

public native voidglLightModelfv(int pname, float[] params, int offset)

public native voidglLightModelfv(int pname, java.nio.FloatBuffer params)

public native voidglLightModelx(int pname, int param)

public native voidglLightModelxv(int pname, int[] params, int offset)

public native voidglLightModelxv(int pname, java.nio.IntBuffer params)

public native voidglLightf(int light, int pname, float param)

public native voidglLightfv(int light, int pname, float[] params, int offset)

public native voidglLightfv(int light, int pname, java.nio.FloatBuffer params)

public native voidglLightx(int light, int pname, int param)

public native voidglLightxv(int light, int pname, int[] params, int offset)

public native voidglLightxv(int light, int pname, java.nio.IntBuffer params)

public native voidglLineWidth(float width)

public native voidglLineWidthx(int width)

public native voidglLoadIdentity()

public native voidglLoadMatrixf(float[] m, int offset)

public native voidglLoadMatrixf(java.nio.FloatBuffer m)

public native voidglLoadMatrixx(int[] m, int offset)

public native voidglLoadMatrixx(java.nio.IntBuffer m)

public native voidglLoadPaletteFromModelViewMatrixOES()

public native voidglLogicOp(int opcode)

public native voidglMaterialf(int face, int pname, float param)

public native voidglMaterialfv(int face, int pname, float[] params, int offset)

public native voidglMaterialfv(int face, int pname, java.nio.FloatBuffer params)

public native voidglMaterialx(int face, int pname, int param)

public native voidglMaterialxv(int face, int pname, int[] params, int offset)

public native voidglMaterialxv(int face, int pname, java.nio.IntBuffer params)

public voidglMatrixIndexPointerOES(int size, int type, int stride, java.nio.Buffer pointer)

        glMatrixIndexPointerOESBounds(
            size,
            type,
            stride,
            pointer,
            pointer.remaining()
        );
        if (((size == 2) ||
             (size == 3) ||
             (size == 4)) &&
            ((type == GL_FLOAT) ||
             (type == GL_BYTE) ||
             (type == GL_SHORT) ||
             (type == GL_FIXED)) &&
            (stride >= 0)) {
            _matrixIndexPointerOES = pointer;
        }
    
public native voidglMatrixIndexPointerOES(int size, int type, int stride, int offset)

private native voidglMatrixIndexPointerOESBounds(int size, int type, int stride, java.nio.Buffer pointer, int remaining)

public native voidglMatrixMode(int mode)

public native voidglMultMatrixf(float[] m, int offset)

public native voidglMultMatrixf(java.nio.FloatBuffer m)

public native voidglMultMatrixx(int[] m, int offset)

public native voidglMultMatrixx(java.nio.IntBuffer m)

public native voidglMultiTexCoord4f(int target, float s, float t, float r, float q)

public native voidglMultiTexCoord4x(int target, int s, int t, int r, int q)

public native voidglNormal3f(float nx, float ny, float nz)

public native voidglNormal3x(int nx, int ny, int nz)

public native voidglNormalPointer(int type, int stride, int offset)

public voidglNormalPointer(int type, int stride, java.nio.Buffer pointer)

        glNormalPointerBounds(
            type,
            stride,
            pointer,
            pointer.remaining()
        );
        if (((type == GL_FLOAT) ||
             (type == GL_BYTE) ||
             (type == GL_SHORT) ||
             (type == GL_FIXED)) &&
            (stride >= 0)) {
            _normalPointer = pointer;
        }
    
private native voidglNormalPointerBounds(int type, int stride, java.nio.Buffer pointer, int remaining)

public native voidglOrthof(float left, float right, float bottom, float top, float zNear, float zFar)

public native voidglOrthox(int left, int right, int bottom, int top, int zNear, int zFar)

public native voidglPixelStorei(int pname, int param)

public native voidglPointParameterf(int pname, float param)

public native voidglPointParameterfv(int pname, float[] params, int offset)

public native voidglPointParameterfv(int pname, java.nio.FloatBuffer params)

public native voidglPointParameterx(int pname, int param)

public native voidglPointParameterxv(int pname, int[] params, int offset)

public native voidglPointParameterxv(int pname, java.nio.IntBuffer params)

public native voidglPointSize(float size)

public voidglPointSizePointerOES(int type, int stride, java.nio.Buffer pointer)

        glPointSizePointerOESBounds(
            type,
            stride,
            pointer,
            pointer.remaining()
        );
        if (((type == GL_FLOAT) ||
             (type == GL_FIXED)) &&
            (stride >= 0)) {
            _pointSizePointerOES = pointer;
        }
    
private native voidglPointSizePointerOESBounds(int type, int stride, java.nio.Buffer pointer, int remaining)

public native voidglPointSizex(int size)

public native voidglPolygonOffset(float factor, float units)

public native voidglPolygonOffsetx(int factor, int units)

public native voidglPopMatrix()

public native voidglPushMatrix()

public native intglQueryMatrixxOES(int[] mantissa, int mantissaOffset, int[] exponent, int exponentOffset)

public native intglQueryMatrixxOES(java.nio.IntBuffer mantissa, java.nio.IntBuffer exponent)

public native voidglReadPixels(int x, int y, int width, int height, int format, int type, java.nio.Buffer pixels)

public native voidglRenderbufferStorageOES(int target, int internalformat, int width, int height)

public native voidglRotatef(float angle, float x, float y, float z)

public native voidglRotatex(int angle, int x, int y, int z)

public native voidglSampleCoverage(float value, boolean invert)

public native voidglSampleCoveragex(int value, boolean invert)

public native voidglScalef(float x, float y, float z)

public native voidglScalex(int x, int y, int z)

public native voidglScissor(int x, int y, int width, int height)

public native voidglShadeModel(int mode)

public native voidglStencilFunc(int func, int ref, int mask)

public native voidglStencilMask(int mask)

public native voidglStencilOp(int fail, int zfail, int zpass)

public voidglTexCoordPointer(int size, int type, int stride, java.nio.Buffer pointer)

        glTexCoordPointerBounds(
            size,
            type,
            stride,
            pointer,
            pointer.remaining()
        );
        if (((size == 2) ||
             (size == 3) ||
             (size == 4)) &&
            ((type == GL_FLOAT) ||
             (type == GL_BYTE) ||
             (type == GL_SHORT) ||
             (type == GL_FIXED)) &&
            (stride >= 0)) {
            _texCoordPointer = pointer;
        }
    
public native voidglTexCoordPointer(int size, int type, int stride, int offset)

private native voidglTexCoordPointerBounds(int size, int type, int stride, java.nio.Buffer pointer, int remaining)

public native voidglTexEnvf(int target, int pname, float param)

public native voidglTexEnvfv(int target, int pname, float[] params, int offset)

public native voidglTexEnvfv(int target, int pname, java.nio.FloatBuffer params)

public native voidglTexEnvi(int target, int pname, int param)

public native voidglTexEnviv(int target, int pname, int[] params, int offset)

public native voidglTexEnviv(int target, int pname, java.nio.IntBuffer params)

public native voidglTexEnvx(int target, int pname, int param)

public native voidglTexEnvxv(int target, int pname, int[] params, int offset)

public native voidglTexEnvxv(int target, int pname, java.nio.IntBuffer params)

public native voidglTexGenf(int coord, int pname, float param)

public native voidglTexGenfv(int coord, int pname, float[] params, int offset)

public native voidglTexGenfv(int coord, int pname, java.nio.FloatBuffer params)

public native voidglTexGeni(int coord, int pname, int param)

public native voidglTexGeniv(int coord, int pname, int[] params, int offset)

public native voidglTexGeniv(int coord, int pname, java.nio.IntBuffer params)

public native voidglTexGenx(int coord, int pname, int param)

public native voidglTexGenxv(int coord, int pname, int[] params, int offset)

public native voidglTexGenxv(int coord, int pname, java.nio.IntBuffer params)

public native voidglTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, java.nio.Buffer pixels)

public native voidglTexParameterf(int target, int pname, float param)

public native voidglTexParameterfv(int target, int pname, float[] params, int offset)

public native voidglTexParameterfv(int target, int pname, java.nio.FloatBuffer params)

public native voidglTexParameteri(int target, int pname, int param)

public native voidglTexParameteriv(int target, int pname, int[] params, int offset)

public native voidglTexParameteriv(int target, int pname, java.nio.IntBuffer params)

public native voidglTexParameterx(int target, int pname, int param)

public native voidglTexParameterxv(int target, int pname, int[] params, int offset)

public native voidglTexParameterxv(int target, int pname, java.nio.IntBuffer params)

public native voidglTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, java.nio.Buffer pixels)

public native voidglTranslatef(float x, float y, float z)

public native voidglTranslatex(int x, int y, int z)

public voidglVertexPointer(int size, int type, int stride, java.nio.Buffer pointer)

        glVertexPointerBounds(
            size,
            type,
            stride,
            pointer,
            pointer.remaining()
        );
        if (((size == 2) ||
             (size == 3) ||
             (size == 4)) &&
            ((type == GL_FLOAT) ||
             (type == GL_BYTE) ||
             (type == GL_SHORT) ||
             (type == GL_FIXED)) &&
            (stride >= 0)) {
            _vertexPointer = pointer;
        }
    
public native voidglVertexPointer(int size, int type, int stride, int offset)

private native voidglVertexPointerBounds(int size, int type, int stride, java.nio.Buffer pointer, int remaining)

public native voidglViewport(int x, int y, int width, int height)

public voidglWeightPointerOES(int size, int type, int stride, java.nio.Buffer pointer)

        glWeightPointerOESBounds(
            size,
            type,
            stride,
            pointer,
            pointer.remaining()
        );
    
public native voidglWeightPointerOES(int size, int type, int stride, int offset)

private native voidglWeightPointerOESBounds(int size, int type, int stride, java.nio.Buffer pointer, int remaining)