CUDA Video Encoder -encode data from device memory.

I really wonder if anyone from CUDA team or just experienced people look into this forum because I got no answer to this question (though I posted it a round a couple of weeks ago.)So I will ask it again:
How can I get texture data (presumably from OpenGL texture) into device pointer in CUDA Video Encoder to encode H264 without any need to use YUV file from CPU.
I also posted this question on stack overflow :

http://stackoverflow.com/questions/15210776/nvidia-cuda-video-encoder-nvcuvenc-input-from-device-texture-array

Is the current version of encoder designed to work with device memory at all? The VideoEncoder.cpp looks like it has some flags for device mode but from the other hand the class enforces by default usage of YUV files.
Thanks for help in advance and I hope this time someone can shed some light on this issue.
Also , it would be nice if NVidia could provide us ,developers with better docs on encoder/decoder usage.