Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

# GLSurfaceView.GLWrapper

*** ** * ** ***


`
public
static


interface
GLSurfaceView.GLWrapper
`


`


`

|---|
| android.opengl.GLSurfaceView.GLWrapper |

<br />

*** ** * ** ***

An interface used to wrap a GL interface.

Typically
used for implementing debugging and tracing on top of the default
GL interface. You would typically use this by creating your own class
that implemented all the GL methods by delegating to another GL instance.
Then you could add your own behavior before or after calling the
delegate. All the GLWrapper would do was instantiate and return the
wrapper GL instance:

```
class MyGLWrapper implements GLWrapper {
    GL wrap(GL gl) {
        return new MyGLImplementation(gl);
    }
    static class MyGLImplementation implements GL,GL10,GL11,... {
        ...
    }
}
```

<br />

**See also:**

- `https://developer.android.com/reference/android/opengl/GLSurfaceView#setGLWrapper(android.opengl.GLSurfaceView.GLWrapper)`

## Summary

| ### Public methods ||
|---|---|
| ` abstract https://developer.android.com/reference/javax/microedition/khronos/opengles/GL` | ` https://developer.android.com/reference/android/opengl/GLSurfaceView.GLWrapper#wrap(javax.microedition.khronos.opengles.GL)(https://developer.android.com/reference/javax/microedition/khronos/opengles/GL gl) ` Wraps a gl interface in another gl interface. |

## Public methods

### wrap

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract GL wrap (GL gl)
```

Wraps a gl interface in another gl interface.

<br />

| Parameters ||
|---|---|
| `gl` | `GL`: a GL interface that is to be wrapped. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/javax/microedition/khronos/opengles/GL` | either the input argument or another GL object that wraps the input argument. <br /> |