Vizard 7 » Command Index » Vizard objects » texture » <texture>.compression
7.7

<texture>.compression

Set the compression format for the image

<texture>.compression(  
mode  
)  
mode
Specifies the compression mode of the texture. Can be one of the following values:

Compression Modes

viz.COMPRESSION_DEFAULT

Use the default compression mode of the texture. This will usually represent no compression.

viz.COMPRESSION_ARB

Use the standard OpenGL compression.

viz.COMPRESSION_DXT1

Use S3TC compression. Higher compression, lower quality

viz.COMPRESSION_DXT3

Use S3TC compression. Lower compression, better quality.

viz.COMPRESSION_DXT5

Use S3TC compression. Lower compression, better quality.

Remarks

Compressing textures can save a lot of video memory, thus improving perfomance in worlds which contain many textures.

Return Value

None

Example

tex = viz.addTexture('texture.jpg')
tex.compression(viz.COMPRESSION_ARB)