Access directly to OpenGL in plugins?

CNLohr

New Member
Not sure why I can't post in the plugins threads, but here goes.

I'm currently writing a (now linux-only) VR environment, and it's mixed reality. I'm hoping to submit textures directly from OpenGL to OBS, via SHM with GL_NV_copy_image. This would afford me full-screen 1080p capture of the game while having access to the desktop for other tasks.

The second part of this is it would be really cool if I could frame-synchronize the two apps. I don't understand quite how synchronization works in Linux, but I am having frame choppyness if I try just capturing the desktop window. I can handle buffering/doubling frames and keeping a tight rein on the amount of drift, but it would be very attractive to not have to halt my VR app to update the window to use for broadcasting or have multiple OGL contexts in one process.

Anyway, all of this is just to ask - how would I
(1) Use Platform-specific OpenGL Code directly in OBS Studio, instead of the inbetween language that is DX/OGL agnostic. To submit/blit a texture to the canvas.
(2) Have some degree of synchronization. (This is OPTIONAL!) Since I could just handle the under/overflows in my choice of what textures to actually blit.
 

CNLohr

New Member
The answer is: You can just use OpenGL. The GLX Context works just fine in the *_render function. Also - I am having trouble with using GL_NV_copy_image to do any form of marshaling. But that's a different question. Also, it seems that it is best not to meddle with synchronization in this area forcefully.
 
Top