[vlc-devel] [PATCH 1/4] vgl: provide a module to allow rendering in a user defined opengl context

Denis Charmet typx at dinauz.org
Mon Jul 9 16:08:43 CEST 2018


Hi,

On 2018-07-09 15:21, Pierre Lamot wrote:
> I think we need to let the user define the context and the texture.
> 

That was my point actually. Sorry if that wasn't clear :)
You need a callback to require a texture from the libvlc user 
(equivalent to the vmem-lock)

> VLC will render video in its own OpenGL  thread and at its own rate.
> User will have its scene rendering at (i.e.) 60fps  while we will have 
> video
> rending at (i.e.) 24 fps. So we have two rendering thread and two 
> contexts.
> The user one, and VLC one. VLC context need to be shared with user 
> context
> in order to let texture to be usable in both contexts. Shared context 
> need to
> be created from the parent context (user) (see wglShareLists,
> glXCreateNewContext,
> etc..)

I don't understand why you'd need another openGL context if your libvlc 
user provides one. Why not use the one given by the user?

> The next problem is the synchronizations between the contexts. User 
> might
> have different use cases: rendering to textures using FBO with triple
> buffering for sync, custom sync using glMemoryBarrier, etc..

That's my problem, why would you need to synchronize two openGL 
contexts, don't you just need a callback for the core to notify you that 
the texture is ready (equivalent to vmem-unlock).

And maybe one to notify that you should display the function 
(equivalent to the vmem-display callback).

Once again, I'm neither an OpenGL nor a vout expert. Just someone who 
used vmem a long time ago wishing to understand :)

Regards,
-- 
Denis Charmet - TypX
Le mauvais esprit est un art de vivre


More information about the vlc-devel mailing list