how to render the output of a camera into a graphicsbuffer

I have a hidden graphics buffer and want to render a output of a camera to a buffer without rendering it into a main window, the code for python is

mybuffer ="My Buffer", 512, 512) 
 mytexture = mybuffer.getTexture() 
 mycamera = base.makeCamera(mybuffer) 
 myscene = NodePath("My Scene") 

here i have mycamera = base.makeCamera(mybuffer)
to attach the cam to the buffer i could not find the corressponding statement in cpp can someone direct me to this statement.


You can look in the source code to see what makeCamera is doing.