text_and_shaders.cpp
// This method will be called whenever Orx needs the parameters for our shader
This method will be called whenever Orx needs the parameters for our shader
This method will be called whenever Orx needs the parameters for our shader
orxSTATUS orxFASTCALL lightPosHandler(const orxEVENT *_pstEvent) {
    if(_pstEvent->eID == orxSHADER_EVENT_SET_PARAM) {
        orxSHADER_EVENT_PAYLOAD * payload = (orxSHADER_EVENT_PAYLOAD *)_pstEvent->pstPayload;
        if(strcmp(payload->zParamName, "LightPos") == 0) {
            orxMouse_GetPosition(&(payload->vValue));
            payload->vValue.fZ = 100;
        }
    }
    return orxSTATUS_SUCCESS;
}
orxSTATUS orxFASTCALL lightPosHandler ( const orxEVENT * _pstEvent ) { if ( _pstEvent -> eID == orxSHADER_EVENT_SET_PARAM ) { orxSHADER_EVENT_PAYLOAD * payload = ( orxSHADER_EVENT_PAYLOAD * ) _pstEvent -> pstPayload ; if ( strcmp ( payload -> zParamName , " " ) == 0 ) { orxMouse_GetPosition ( & ( payload -> vValue ) ) ; payload -> vValue . fZ = 100 ; } } return orxSTATUS_SUCCESS ; }
This method will be called whenever Orx needs the parameters for our shader
This method will be called whenever Orx needs the parameters for our shader
// Here we set the "LightPos" parameter to be the mouse position