The object surface may be covered by a
color or by a texture. Essentially, a texture is a normal picture that can be created in Peter application's
graphic editor. A texture for an
active operation stage of an
active object can be set by the
texture element. For default operation stage 0 the modulate
operation is preset as a default (the texture being modulated by the object's basic color). The only thing needed to display a texture is setting the object texture, no other transactions are necessary.
With most videocards (typically, if
faraway textures are supported by the videocard) it is necessary that the texture dimensions be a power of 2, i.e. 1, 2, 4, 8, 16, ... In exceptional cases a square size of a texture is required. The maximum dimensions of a texture may be limited by the videocard utilized. As a rule it is recommended a texture to be sized 256x256 pixels (i.e. 8x8 steps) maximum. All rules quoted hold for a texture after
smoothing (i.e. after size diminishing). If a texture does not comply with the above rules, it will be adjusted automatically. The size conversion may be a time consuming operation, therefore it is recommended to use a texture not requiring any adjustment.
A texture will be adjusted and read into the videomemory during its first usage. When a greater number of textures is used than can be read into the videomemory, the textures are unloaded from the videomemory to be read later when necessary. The operation of repeated reading lowers the graphics operation speed considerably. Therefore it is recommended to use a texture being sized as small as possible, to follow the
capacity of the videomemory, and, if the videomemory capacity is too low, to use a lower resolution texture rather than to unload textures at every frame and then to read them into the videomemory again. When rather vast texture changes are carried out (like a scene change during a game), there is the opportunity to unload textures from the videomemory by switching off the
3D window (setting the size to 0) followed by switching it on again.