It is possible to use the same texture in more than on OptiX context?

The following is supposed to work?

GLuint tex_id;
glGenTextures(1, &tex_id);
[...] texture initialization [...]

optix::Context c1 = optix::Context::create();
optix::Context c2 = optix::Context::create();

optix::TextureSampler optix_sampler1 = c1->createTextureSamplerFromGLImage(tex_id, RT_TARGET_GL_TEXTURE_2D);
optix::TextureSampler optix_sampler2 = c2->createTextureSamplerFromGLImage(tex_id, RT_TARGET_GL_TEXTURE_2D);

I’m getting the “An OptiX resource has already been registed” error.

OptiX doesn’t support to use the same gl texture in multiple OptiX contexts. We are going to remove this restriction in future releases, but I can’t say when

That’s ok, I code my application like the example I gave. I just have to create another texture from the same image.