Passing openGL rendered view to Nvidia Video Encoder

I am passing an OpenGL rendered image to Nvidia GPU H.264 encoder. However, the operation is slow because of the redundant data pass GPU->CPU (rendering) then CPU->GPU (video encoding).
How can I point the address of the rendered view to the NVIDIA GPU video encoder API?