Wiki > TV3D65 Index > TVMesh
SetLightingMode
DESCRIPTION
-This page has been generated automatically. Please improve it by adding a description and additional information.
DECLARATION
| VB.NET | SetLightingMode(eLightingMode As CONST_TV_LIGHTINGMODE , iMaxDirLight As Integer , iMaxPointLight As Integer) |
| C++ | void SetLightingMode(cCONST_TV_LIGHTINGMODE eLightingMode , int iMaxDirLight , int iMaxPointLight ) |
PARAMETERS
| NAME | OPTIONAL | DESCRIPTION |
| eLightingMode | No | eLightingMode description |
| iMaxDirLight | Yes | iMaxDirLight description |
| iMaxPointLight | Yes | iMaxPointLight description |
RETURN VALUE
| Null | Does not return a value. |
EXAMPLES
TIPS
- LightingMode should be set prior to loading in Geometry via .LoadXFile() or .LoadTVM(). This is especially true when using the TVMesh to create a TVMinimesh. The TVMinimesh will look at the lightingMode of the TVMesh to determine what vertex format to use so that the proper information will be available to vertex shaders. For instance, TangentBumpMapping lighting mode requires Binormal, Tangent and Normal informat be included in the Vertex format. This gets created automatically by TVMinimesh if the TVMesh it is created off of has the TangentBumpMapping lighting mode set. So in a sense, LightingMode can be viewed as a SetMeshFormat shortcut. It should not be viewed as something that really has anything to do with Lights, Materials and Textures.
- If you’re creating an Editor, think of LightingMode as something that requires the mesh to be unloaded and reloaded whenever the mode is changed. In other words, the same as you would for changing the MeshFormat.