Syntax

dbTextureObject(ObjectID, ImageID [, StageIndex [, NoSort]])

Description

This command will texture an object using the specified image. The image can be any size, but the quality of the texture depends on the graphics card used. A texture size to the power of two is recommended size for all your textures. Where an image is larger than the supported texture size, the image is internally reduced when used as a texture. The object and image number must be integer values. You can use this command to remove the effects of multitexturing effects and shaders. An additional texture stage index can be provided to the command to specify multi-textures directly, and is required when using shaders that take pixel data from secondary textures. If an image value of zero is used to texture the object, the texture information will be reset. If the object contains material information from a loading event, this command will erase that material information in favour of a clean texturing of the object. Ensure material settings are applied after the the texture command to retain them, or ensure the object is loaded with both texture and material information pre-set. Setting the parameter NoSort to zero skips the automated resorting of the textures in the render pipeline. The NoSort texture flag is a way to group all objects together, sorted by texture, so that a group of objects can be rendered at the same time, which the graphics engine can do faster than swapping individual textures in and out of graphics memory as it renders all your game objects. Set this value to one to skip the texture sort.

See Also

dbColorObject, dbSetObject, dbSetObjectDiffuse, dbSetObjectFilter, dbSetObjectTexture, dbSetTextureMD3