I am trying to create a texture sampler from gl textures and for some reason this always fails with RT ERROR INVALID VALUE.
The exception thrown says:
“Invalid value (Details: Function “RTresult _rtTextureSamplerCreateFromGLImage(RTcontext, unsigned int, RTgltarget, RTtexturesampler_api**)” caught exception: Unsupported texture format. 261)”
but no further information what exactly is wrong on the format.
The gl texture format is GL_RGBA, which should be supported. Any idea what might cause this or what i can check?
I am calling the function like that:
TextureSampler sampler = context->createTextureSamplerFromGLImage(textureId, RT_TARGET_GL_TEXTURE_2D);
I am also checking gl errors before calling the interop function (as it was recommended in this forum).
I am using Optix 4.1.0 and Cuda 8.0.61_375.26 in OpenSUSE 13.2
Edit: ok seems that I mixed things up, GL_RGBA is NOT supported right? So in my case with GL_RGBA8 it works…