# SetObjectMeshLightMap

## Description

Sets an object mesh to use the specified image as a lightmap. The lightmap will be placed in texture stage 1, overwriting anything that is already there and will have a shader generated that combines it with texture stage 0, and any dynamic lighting, to correctly light the object. If you are setting your own shader with SetObjectShader then your shader will have to make use of the lightmap itself as AGK will not modify your shader in this way. Mesh indices are in the range 1 to GetObjectNumMeshes

## Definition

SetObjectMeshLightMap( objID, meshIndex, imageID )

void agk::SetObjectMeshLightMap( UINT objID, UINT meshIndex, UINT imageID )

## Parameters

- objID - The ID of the object to modify.
- meshIndex - The index of the mesh to modify, first mesh is at index 1.
- imageID - The ID of the image to use as a light map.