Re: [native-client-discuss] Use shared texture inside native client?

20 views
Skip to first unread message

Ben Smith

unread,
Jul 11, 2016, 2:43:02 PM7/11/16
to native-cli...@googlegroups.com
Hi Matthias,

I'm not sure if I fully understand what you're trying to do, but it sounds like you want to set up a way to render to a buffer in a Windows application and send the data to a NaCl plugin. That should not be allowed, and if it is, it is a bug. The only way that NaCl should communicate with the "outside world" is via the Pepper interfaces (PPAPI). There are a few ways you can get arbitrary data into the NaCl plugin, but typically passing an ArrayBuffer via PostMessage from JavaScript is the fastest. You could use native messaging to send data from your Windows executable to JavaScript, then forward that to the NaCl plugin. I'm not certain that will be fast enough for your usage, however.

-Ben

On Mon, Jun 20, 2016 at 2:25 AM, Matthias Frener <zpm.ps...@gmail.com> wrote:
Hi all.

I'm new to nacl and currently trying to figure out if I can implement my use-case as a plugin, or if need to go a different way (i.e. do a CEF-like wrapper around chromium).

What I'm trying to do:
There is an application that renders 3D contents onto a texture.
The application itself won't compile on nacl (a lot of system dependencies).
So what I would like to do is to share the render target texture of that application to a nacl plugin, which composes / renders it inside chrome.

I'm starting with windows, but it should work on linux platforms as well.
I can use DXGI / NV_DX_interop. Means I have an EGLImage on the nacl plugin, which I would like to render.
What I do miss however is eglCreatePbufferFromClientBuffer or anything similar on the nacl api.
Using glTexImage2D is no option. The application can update the texture up to 60 time per second, and it can be HD (even 4K) size.
So it is crucial to not do any lock/copy/unlock operations on the pixel buffer, but do zero-copy until the texture is actually rendered inside chrome.

Is it possible on a nacl plugin?
I need a way to create a GL texture from a shared texture. eglCreatePbufferFromClientBuffer does exactly that, but I can't use on nacl.
Is there any other way?

Many thanks.

--
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to native-client-di...@googlegroups.com.
To post to this group, send email to native-cli...@googlegroups.com.
Visit this group at https://groups.google.com/group/native-client-discuss.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages