To add multiple sub-displays: use .AddDisplay(<name>)
<span style="color:#3366FF;"> // LayoutEqual is an EXPERIMENTAL feature - it requires that all sub-displays
// share the same aspect ratio, placing them in a raster fasion in the
// viewport so as to maximise display size.</span>
pangolin::Display("multi")
.SetBounds(1.0, 0.0, 0.0, 1.0)
.<span style="color:#FF0000;">SetLayout</span>(pangolin::LayoutEqual)
.<span style="color:#FF0000;">AddDisplay</span>(d_cam1)
.AddDisplay(d_img1)
.AddDisplay(d_cam2)
.AddDisplay(d_img2)
.AddDisplay(d_cam3)
.AddDisplay(d_cam4);
To set up GL-Texture image:
const int width = 64;
const int height = 48;
unsigned char* imageArray = new unsigned char[3*width*height];
pangolin::<span style="color:#009900;">GlTexture</span> <span style="color:#3333FF;">imageTexture</span>(width,height,GL_RGB,false,0,GL_RGB,GL_UNSIGNED_BYTE);
d_img1.Activate();
glColor4f(1.0f,1.0f,1.0f,1.0f);
<span style="color:#3333FF;">imageTexture</span>.<span style="color:#009900;">RenderToViewport</span>();