I have a purely native Android NDK app. The main loop is in
android_main
as provided by the android_native_app_glue.h.
I need to render something in a separate thread, so via android_main I tried:
pthread_t thread1;
pthread_create(&thread1, NULL, renderstuff, NULL);
void *renderstuff( void *ptr )
{
// some opnegl es draw calls
}
However this does not render anything. If I perform the same draw calls from within android_main (but without creating a new thread), it renders fine :S
I ended up reworking things to ensure that only a single thread performs the rendering.