FileDocCategorySizeDatePackage
EGLObjectHandle.javaAPI DocAndroid 5.1 API2087Thu Mar 12 22:22:40 GMT 2015android.opengl

EGLObjectHandle

public abstract class EGLObjectHandle extends Object
Base class for wrapped EGL objects.

Fields Summary
private final long
mHandle
Constructors Summary
protected EGLObjectHandle(int handle)

deprecated
Use {@link #EGLObjectHandle(long)} instead. Handles on 64 bit platforms will be wider than java ints.

        mHandle = handle;
    
protected EGLObjectHandle(long handle)

        mHandle = handle;
    
Methods Summary
public intgetHandle()

deprecated
Use {@link #getNativeHandle()} instead. Handles on 64 bit platforms will be wider than java ints.

        if ((mHandle & 0xffffffffL) != mHandle) {
            throw new UnsupportedOperationException();
        }
        return (int)mHandle;
    
public longgetNativeHandle()
Returns the native handle of the wrapped EGL object. This handle can be cast to the corresponding native type on the native side. For example, EGLDisplay dpy = (EGLDisplay)handle;

return
the native handle of the wrapped EGL object.

        return mHandle;
    
public inthashCode()

        /*
         * Based on the algorithm suggested in
         * http://developer.android.com/reference/java/lang/Object.html
         */
        int result = 17;
        result = 31 * result + (int) (mHandle ^ (mHandle >>> 32));
        return result;