Vizard 7 » Command Index » Vizard modules » spi » <spi>.init
7.6

<spi>.init

Initialize the Elumens display

<spi>.init(  
channels = 3  
format = spi.PBUFFER  
)  
channels = 3
The number of channels to render. This value can be a number from 1-4
format = spi.PBUFFER
The pixel format to use when rendering the spherical projection. Can be one of the following values:

Pixel formats

spi.BACKBUFFER

Render to back buffer

spi.PBUFFER

Render to pixel buffer

spi.TEXTURE

Render to texture

spi.AUTO

Automatically determine best rendering surface

Remarks

This function creates and initializes the SPI rendering context and must precede the use of any other SPI
functions. The SPI related environment variables are read and the default values are set in the SPI context.
It also calls the initialization of the intermediate textures. This function must be used to create a SPI
rendering context, which is then used in all subsequent SPI calls.

NOTE: When using the spi library, some features will not work as expected including the following:



IMPORTANT: This command must be called after viz.go()

Return Value

None

Example

import viz
import spi

viz.go()

#Initialize spi with 4 channels
spi.init(4)