updated cpp template to support EVENT_RENDERER_RECREATED

updated cpp template to support EVENT_RENDERER_RECREATED