intrinsic-184 Set3DTexture

Top  Previous  Next

184: Set3DTexture(Handle, Mode, SubMode, @BMHandles, BMPCount);


This intrinsic is used to apply bitmap textures to meshes. Applying a bitmap texture to an object makes it look more realistic. There are several different modes that can be used to apply the bitmap to give different appearances.




Handle. This argument is an integer handle created by the Add3DObject intrinsic. It must be a handle for a 3D Mesh.


Mode, SubMode. These arguments specify the way in which the bitmap is applied to the mesh. Click here for detailed information about the Modes and Sub-Modes.


BMHandles. Every texture mode uses at least one bitmap, and some use more than one. This item is an integer or integer array of one or more handles for bitmaps. As such, you must pass the address of the variable or array. Here's an example using a single bitmap handle:




Here is an example using an array of bitmap handles:


Set3DTexture(WrkMesh,2,0, @CubeMap(0),6);


BMPCount. This is an integer that specifies the number of bitmaps in the array.