Sharing textures across threads.

17 views
Skip to first unread message

Nayan

unread,
Feb 9, 2012, 12:17:51 PM2/9/12
to android-...@googlegroups.com
Hi,

I have been trying to share textures across 2 threads in android native code. Below is what I am trying to achieve,

In non-ui thread, I create a texture, bind it as a FBO and render onto this texture (using glDraw* calls).
In UI thread, I try to blit this texture onto screen.

I tried EGLContext sharing mechanism to share the texture across threads (by passing UI thread EGLContext as share texture argument to eglCreateTexture in non-ui thread). However, I do not see any output on screen, and don't even get any GL_ERROR messages!

What is the ideal way to share textures across threads? Any example code -snippets?

Thanks,

--
Regards,
Nayan



Artur Mazurek

unread,
Feb 10, 2012, 2:30:36 AM2/10/12
to android-...@googlegroups.com
Well, 

I have never actually did it, but when reading about OpenGL ES i stepped across this:


While this obviously is not for Android, I still think it has useful, generic knowledge about the subject you're interested in. Hope it helps ;)

Best Regards,
Artur


2012/2/9 Nayan <nay...@gmail.com>

--
Regards,
Nayan



--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.

Reply all
Reply to author
Forward
0 new messages