"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Enabling opengl1.1 for videoplayback sample

Hi,

I have integrated cloudreco example into videoplayback sample code for my purpose. Now, it is working for devices with opengl 2.0 version. I want to make it work for opengl es 1.1 as well. I tried to enable opengl es flag 1.1 in native code and made changes accordingly. But it is not working for me.

 

Cna someone suggest the steps I need to follow to enable opengl es 1.1 for videoplayback sample. I tried making all the changes similar to imagetargets.cpp in videoplayback.cpp. but in renserframe, I am getting an error that I am calling unimplemented opengl es api.

 

This is my renderframe code :

 

NIEXPORT void JNICALLJava_com_qualcomm_QCARSamples_VideoPlayback_VideoPlaybackRenderer_renderFrame(JNIEnv * env, jobject obj){    LOG("Java_com_qualcomm_QCARSamples_VideoPlayback_GLRenderer_renderFrame");

 //Sushil start //New code for Cloud Reco if (showStartScanButton) {     //jclass javaClass = env->GetObjectClass(obj);     //jmethodID method = env->GetMethodID(javaClass, "showStartScanButton", "()V");     //env->CallVoidMethod(obj, method);

     showStartScanButton = false; } /////////////////// //Sushil end

    // Clear color and depth buffer    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

    // Get the state from QCAR and mark the beginning of a rendering section    QCAR::State state = QCAR::Renderer::getInstance().begin();

    // Explicitly render the Video Background    QCAR::Renderer::getInstance().drawVideoBackground();

    //sushopengl    glEnableClientState(GL_VERTEX_ARRAY);     glEnableClientState(GL_NORMAL_ARRAY);     glEnableClientState(GL_TEXTURE_COORD_ARRAY);

     glEnable(GL_TEXTURE_2D);     glDisable(GL_LIGHTING);     //sushopengl

    glEnable(GL_DEPTH_TEST);       // We must detect if background reflection is active and adjust the culling direction.    // If the reflection is active, this means the post matrix has been reflected as well,    // therefore standard counter clockwise face culling will result in "inside out" models.    glEnable(GL_CULL_FACE);    glCullFace(GL_BACK);    if(QCAR::Renderer::getInstance().getVideoBackgroundConfig().mReflection == QCAR::VIDEO_BACKGROUND_REFLECTION_ON)        glFrontFace(GL_CW);  //Front camera    else        glFrontFace(GL_CCW);   //Back camera

      for (int i=0; i<NUM_TARGETS; i++)    {        isTracking[i] = false;        targetPositiveDimensions[i].data[0] = 0.0;        targetPositiveDimensions[i].data[1] = 0.0;    }

//Sushil

    //for(int tIdx = 0; tIdx < state.getNumTrackableResults(); tIdx++)    if (state.getNumTrackableResults() > 0)    {        // Get the trackable:     const QCAR::TrackableResult* trackableResult = state. getTrackableResult(/*tIdx*/0);     const QCAR::Trackable& trackable = trackableResult->getTrackable();     //const QCAR::ImageTarget& imageTarget = (const QCAR::ImageTarget&) trackableResult->getTrackable();

//         Compare this trackable's id to a globally stored id//         If this is a new trackable, find the displayMessage java method and//         call it with the trackable's name        if (/*trackable.getId() != lastTrackableId*/scanningMode) {         scanningMode = false;            jstring js = env->NewStringUTF(trackable.getName());            jclass javaClass = env->GetObjectClass(obj);            jmethodID method = env->GetMethodID(javaClass, "displayMessage", "(Ljava/lang/String;)V");            env->CallVoidMethod(obj, method, js);            lastTrackableId = trackable.getId();        }    }

    glDisable(GL_DEPTH_TEST);

    glDisable(GL_TEXTURE_2D);    glDisableClientState(GL_VERTEX_ARRAY);    glDisableClientState(GL_NORMAL_ARRAY);    glDisableClientState(GL_TEXTURE_COORD_ARRAY);

    QCAR::Renderer::getInstance().end();}

 

 

Thank You,

Sushil