I'm using a GLSurfaceView and need to use some of the methods in the IGL11ExtensionPack (GlGenRenderbuffersOES(), for example). In the native Android examples I've seen, this is simply done by casting the GL10 object provided by the framework to a Gl11ExtensionPack. As in this example from Vogella:
public void onDrawFrame(GL10 gl) {
if (mContextSupportsFrameBufferObject) {
GL11ExtensionPack gl11ep = (GL11ExtensionPack) gl;
...
gl11ep.glBindFramebufferOES(GL11ExtensionPack.GL_FRAMEBUFFER_OES, mFramebuffer);
...
}
In Monodroid, I'm getting a class cast exception when I try to do the cast
public void OnSurfaceCreated(IGL10 gl, EGLConfig config)
{
IGL11ExtensionPack extpack = (IGL11ExtensionPack)gl;
...
}
Is anyone else using a GLSurfaceView with the GL11ExtensionPack successfully in Monodroid?
As a side note, there is a long-since resolved Android issue that I would not expect to apply here.