use ofApp::draw() on top of other GLview

Hello,

i’m trying to merge the Vuforia Imagetargets sample with an openFramworks sample.

What i did was set up my openframeworks environment. I then merged the libraries and the source files (C++ and Java) from the imagetargets sample.

I naively thought that all i had to do was wrap and call the qcar draw call as first instruction inside ofApp::draw(). This doesn’t work though, i suspect because the two sample are working on two differnt GLviews.

OFAndroid.java (from of sample) -> private static OFGLSurfaceView mGLView;

while my OFActivity.java (derived from vuforia sample) -> private QCARSampleGLView mGlView;

I also naively tried to render both, one on top of each other, by using this layout

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout android:id="@+id/camera_overlay_layout" android:layout_width=“fill_parent” android:layout_height=“fill_parent” xmlns:android=“http://schemas.android.com/apk/res/android">
<cc.openframeworks.OFGLSurfaceView android:id=”@+id/of_gl_surface"
android:layout_width=“fill_parent”
android:layout_height=“fill_parent”/>
<ProgressBar
android:id="@+id/loading_indicator"
android:layout_width=“wrap_content”
android:layout_height=“wrap_content”
android:layout_centerHorizontal=“true”
android:layout_centerVertical=“true” />

however this doesn’t work. I get a weird “called unimplemented OpenGL ES API” o.O

it’s worth nothing that if i remove the of_gl_surface from the layout, i can see the vuforia sample working correctly, while if i keep it, i see the drawing of ofApp::draw() working correctly.

I’m not sure what i’m supposed to do to make two GLviews work togheter, any help is really appreciated!

thanks in advance