# SetObjectShader

## Description

Sets the shader used to draw the meshes in this object, each mesh can have its own shader set with SetObjectMeshShader, this command sets all meshes in this object to use the specified shader. 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 meshes are assigned the internal shader.

## Definition

SetObjectShader( objID, shaderID )

void agk::SetObjectShader( UINT objID, UINT shaderID )

## Parameters

- objID - The ID of the object to modify.
- shaderID - The ID of the shader to use.