rem: newMode = dtime % numModes;
context: void display(void){    if (animate)    {	// Eventually switch between different hardware modes	float ctime   = glutGet(GLUT_ELAPSED_TIME);	int   dtime   = ctime / 1000 / 2;	newMode = dtime % numModes;	// Make the volume rotate 	int movement = (int) (ctime - lastFrame) * aniSpeed; 	if (movement != 0) lastFrame = ctime; 	mgr->mouseButtonPress  (GLUT_LEFT_BUTTON,  0, 0); 	mgr->mouseMove         (movement, 0); 	mgr->mouseButtonRelease(GLUT_LEFT_BUTTON, movement, 0);    }    // Switch shader mode if desired    if (newMode != curMode)    {        beginEditCP(shader, DVRSimpleLUTShader::LutModeFieldMask);	setField<Int8>(shader, "lutMode", newMode);	endEditCP(shader, DVRSimpleLUTShader::LutModeFieldMask);    }    mgr->redraw();    // Output active shader mode - field is valid after redraw only    if (newMode != curMode)    {        SLOG << "Mode " << newMode	     << ": " << shaderTests[newMode].name << " --> "	     << shaderTests[getField<Int8>(shader, "activeLutMode")].name << std::endl;		curMode = newMode;    }}