# Multiview Textures¶

Any Panda texture, including a cube map or video texture, can also be loaded as a multiview texture. This means that there are multiple different images, or views, stored within the texture object.

The most common use for a multiview texture is to implement a stereo texture, or a texture with two views: one for each of the left and the right eyes. For instance, you would do this to project a 3-D movie onto a screen in your virtual space.

In its default configuration, whenever Panda renders to a 3-D stereo window (see Stereo Display Regions), any multiview textures are automatically treated as stereo textures. View 0 is presented to the left eye, and view 1 is presented to the right eye. Additional views beyond view 1 are not used.

A multiview texture is loaded as a series of independent texture images (similar to the way a cube map or 3-D texture is loaded). Each image is numbered, and first image (or left image) is image number 0. The right image is image number 1. If there are additional views, they are numbered consecutively from there. All of the images in the series must have the same filename, except for the image sequence number.

To load a multiview texture, use:

LoaderOptions options;
PT(Texture) tex = TexturePool::load_texture("filename_#.png", 0, false, options);


where the hash mark in the filename is replaced with the digit (or digits) that correspond to the image sequence number. For instance, the above example would load image files named filename_0.png and filename_1.png.

You can also load cube maps in the same way. A cube map consists of six independently loaded texture images numbered 0 through 5, which define the six faces of a cube. With a stereo cube map, there are twelve texture images numbered 0 through 11. The first six images define the six faces of the cube in the left view, and the next six images define the six faces of the cube in the right view.

LoaderOptions options;

LoaderOptions options;