I haven\'t been able to find any reference except for:
http://answers.opencv.org/question/9512/how-to-bind-gpumat-to-texture/
which discusses a CUDA approach.
Well here's my understanding, maybe not 100% correct, and apologize for my non-mother-lang-English.
GpuMat
uses Global Memory. However OpenGL textures resides in Texture Memory, which is specially designed for GPU's texture hardware(not CUDA cores). Texture mem are't organized as usual linear 2D/3D arrays, it may use certain Space Filling Curve to organize its content as to optimize texture cache rate. Thus you cannot get a device pointer to Texture. You can only access Texture Mem directly in CUDA via Texture Fetch(Read Only) or Surface R/W.
Present OpenCV implementation don't seem to use cuda texture/surface feature. You have to copy from textures to Global memory to bind them as GpuMat
s. Well, not quite a "bind" solution.
This thread describes a CUDA approach writing to OpenGL textures.
Either wait for OpenCV to implement the new feature, or wait NVIDIA's new GPU architecture unifying Texture Mem and Global Mem, or wait someone invent a special EMP device to hack these memories ... XD