hello,

I would like to create a multithreaded opengl es2 application (developped 
in JNI).
To do this, I create my thread with the pthread library by using the 
function pthread_create(&thread_render, NULL, (void *(*)(void *)) 
renderLoop, NULL);

Here is the code of the renderLoop() callback function :

void renderLoop() {
    while (m_start) {
            glClearColor(1, 0, 0, 1.0f);
            checkGlError("glClearColor");
            glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
            checkGlError("glClear");
            LOGI("avant swap");
            eglSwapBuffers(engine.eglDisplay, engine.eglSurface);
            checkEglError("eglSwapBuffers");
            LOGI("apres swap");
    }
}

The application crash when calling eglSwapBuffers(engine.eglDisplay, 
engine.eglSurface);
Do you have any idea to fix the problem ?

thanks :)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to