Binding Buffer to Aux

Im creating a texture/buffer :
self.eg_texture=Texture()
self.eg_buffer=base.win.makeTextureBuffer(“egBuffer”, x,y,self.eg_texture,True)

Attaching it to a camera
self.eg_camera=base.makeCamera(self.eg_buffer,lens=self.eg_camera_lens)

This of course copies the colour channel to the ram texture for the camera.

How do i modify this so that GraphicsOutput.RTPAuxRgba0/1 is rendered to the buffer instead of the colour channel?

Thanks.

You’ll need to call addRenderTexture on the buffer. The eg_texture parameter passed to makeTextureBuffer is automatically bound to the RTPColor slot, so you’ll have to call addRenderTexture with RTPAuxRgba0 to bind another texture containing the auxiliary rgba colour.

For more control, you may want to use the lower-level graphicsEngine.makeOutput. In fact, all makeTextureBuffer does is call makeOutput followed by addRenderTexture.

Thanks, did the trick