opengl - What's the best way to share a texture/image between two context with out context sharing? -
what want render result 1 context, , further rendering in context not shared previous one.
the method can come copy render result gpu memory system memory using glreadpixels apis , use copied data in context.
is there better way this? mean without copying data gpu memory system memory , system gpu again.
i working glx under linux.
i'm not aware of way share them correctly. closest find glx glx_nv_copy_image extension. in introduction, says:
the wgl , glx versions allow copying between images in different contexts, if contexts in different sharelists or on different physical devices.
with extension, use glxcopyimagesubdatanv()
function copy 1 context other. while not allow sharing, might still faster copying data yourself.
as can tell name, vendor specific extension. don't know how supported is, shouldn't count on being present on systems.
other window system bindings have mechanisms sharing images between processes. e.g. egl, used opengl es, eglimage can used purpose. browsing through glx spec , list of extensions, couldn't spot similar there.
Comments
Post a Comment