virtual bool add(GLuint counterIndex)
     {
         if (NVPMAddCounter(counterIndex) == NVPM_OK) {
             m_counterIndexArray[m_counterIndexArrayCount++] = counterIndex;
             return true;
         } else {
             return false;
         }
     }
Exemple #2
0
int app::perf::counter(UINT index, char *name)
{
    UINT64 type;
    UINT64 hint;

    // Add all GPU and OpenGL counters.  Ignore D3D and Simple Experiments.

    NVPMGetCounterAttribute(index, NVPMA_COUNTER_TYPE, &type);

    if (type == NVPM_CT_GPU || type == NVPM_CT_OGL)
    {
        NVPMAddCounter(index);
        NVPMGetCounterAttribute(index, NVPMA_COUNTER_DISPLAY_HINT, &hint);

        _name[index] = name;
        _hint[index] = hint;
    }
    return NVPM_OK;
}