-
Notifications
You must be signed in to change notification settings - Fork 1
LightingAdv
getLightBinManager() |
Will return the lightBinManager for this light manager. Syntax getLightBinManager(); Returns
Examples lightmgr->getLightBinManager() |
isCompatible() |
Checks to make sure that the graphics card is compatible with the current pixel shader version that is needed. Currently at least 3.0 is needed. Syntax isCompatible(); Returns No return value. Examples // Make sure its valid... else fail! if ( !lm->isCompatible() ) return false; |
activate( SceneGraph *) |
In addition to calling its base classes active(SceneGraph*), it will activate the Shadow Manager and create the AdvancedLightBinManager. It will also setup the Render Prepass Manager and register the feature as an AdvancedLightingFeature. Syntax activate( SceneGraph *sceneManager);
Returns
Examples // From the engine function "resetLightManager" LIGHTMGR->activate( LIGHTMGR->getSceneManager()); |
deactivate() |
Will remove all the objects from the AdvancedLightBinManager and the PrePassRenderBin, then set them to NULL. It will deactivate the Shadow Manager, unregister all the advanced lighting features and then finally send a trigger to let everyone know the LightManager has been deactivated. Syntax deactivate() Returns No return value. Examples if (mLightManager) mLightManager->deactivate(); |
registerGlobalLight( LightInfo *, SimObject * ) |
In addition to calling LightManager::registerGlobalLight, it will add the light to the AdvancedLightBinManager member variable if the AdvancedLightBinManager is created and the light type is a LightInfo::Point or LightInfo::Spot. Syntax registerGlobalLight(LightInfo *light, SimObject *obj )
Returns No return value. Examples // From inside of Item::registerLights lightManager->registerGlobalLight( mLight, this ); |
unregisterAllLights() |
In addition to calling LightManager::unregisterAllLights, it will clear the AdvancedLightBinManager if it has been created. Syntax unregisterAllLights() Returns No return value. Examples // Unregister all the lights in the light manager. LIGHTMGR->unregisterAllLights(); |
setLightInfo( ProcessedMaterial *, const Material *, const SceneGraphData &, const SceneState *, U32, GFXShaderConstBuffer * ) |
Will check to make sure that the SceneGraphData is not PrePassBin, if it is then it will return out immediately. If it is not, then it will update the constants for the GFXShaderConstBuffer passed in. Syntax setLightInfo(ProcessedMaterial *pmat, Material *mat, const SceneGraphData &sgData, SceneState *state, U32 pass, GFXShaderConstBuffer *shaderConsts )
Returns No return value. Examples // From inside of ProcessedShaderMaterial::setSceneInfo LIGHTMGR->setLightInfo( this, mMaterial, sgData, state, pass, shaderConsts ); |
setTextureStage( const SceneGraphData &sgData, const U32 currTexFlag, const U32 textureSlot, GFXShaderConstBuffer *shaderConsts, ShaderConstHandles *handles ) |
Will assign a Shadowmap if it exists. It will grab the ShadowMap via the LightingShaderContants obtained via the shaderConsts passed in. Syntax setTextureStage(const SceneGraphData &sgData, const U32 currTexFlag, const U32 textureSlot, GFXShaderConstBuffer *shaderConsts, ShaderConstHandles *handles )
Returns No return value. Examples // From inside of ProcessedCustomMaterial::setTextureStages lm->setTextureStage(sgData, currTexFlag, i, shaderConsts, handles ) |
getSphereMesh( U32 &, GFXPrimitiveBuffer *& ) |
Will return a vertex buffer handled filled out by a SphereMesh (mSphereGeometry), along with set the variables passed in. If the SphereMesh (mSphereGeometry) is not created by the time this function is called, it will create the sphere mesh (mSphereGeometry) in addition to returning it. Syntax getSphereMesh(U32 outNumPrimitives, GFXPrimitiveBuffer *&outPrimitives )
Returns
Examples // From inside AdvancedLightBinManager::addLight AdvancedLightBinEntry::LightBinEntry lEntry.vertBuffer = mLightManager-> getSphereMesh( lEntry.numPrims, lEntry.primBuffer ); |
getConeMesh( U32 &, GFXPrimitiveBuffer *& ) |
Will return a vertex buffer handled filled out by information for a cone, along with set the variables passed in. If the cone geomtery (mConeGeometry) is not created by the time this function is called, it will create the cone geometry (mConeGeometry) in addition to returning it. Syntax getConeMesh(U32 outNumPrimitives, GFXPrimitiveBuffer *&outPrimitives )
Returns
Examples // From inside AdvancedLightBinManager::addLight AdvancedLightBinEntry::LightBinEntry lEntry.vertBuffer = mLightManager-> getConeMesh( lEntry.numPrims, lEntry.primBuffer ); |
findShadowMapForObject( SimObject * ) |
Will take in a SimObject*, then cast it to a ISceneLight*. If the converted variable is valid (meaning you passed in a valid ISceneLight), then it would get the shadow map available for the light. Syntax findShadowMapForObject(SimObject *object)
Returns
Examples LightShadowMap *lightShadowMap = lm->findShadowMapForObject( object ); |