Outputting Counter Data using PVRScope

To output counter data using PVRScope, perform the following steps in a loop from 0 to numCounters:

  1. Check if the counter has been updated and only perform steps 2 through 5 if it has.

    if(i < counterReading.nValueCnt)
  2. Check if the counter is given as a percentage.

        bool isPercentage = counterDefinitions[i].bPercentage;
  3. Retrieve the name of the counter.

        std::string CounterName = counterDefinitions[i].pszName;
  4. Retrieve the value of the counter.

        float counterValue = counterReading.pfValueBuf[i];
  5. Otuput the value of the counter, such as with printf.

        printf("%s : %f%%\n", counterName, counterValue);
    } else {
        printf("%s : %f\n", counterName, counterValue);