# SetObjectMeshShader

## Description

Sets the shader used to draw this mesh, the shader must have been loaded with LoadShader. A shader is like a script sent to the GPU to tell it how to combine the polygon and texture data to display it on screen. By default meshes are assigned an internal shader that will handle lighting and texturing. If you use a shader ID of 0 the mesh is assigned the internal shader. Mesh indices are in the range 1 to GetObjectNumMeshes

## Definition

SetObjectMeshShader( objID, meshIndex, shaderID )

void agk::SetObjectMeshShader( UINT objID, UINT meshIndex, UINT shaderID )

## Parameters

- objID - The ID of the object to modify.
- meshIndex - The index of the mesh to modify, first mesh is at index 1.
- shaderID - The ID of the shader to use.