cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Mars_999
Journeyman III

wglGetGPUInfoAMD crashes....

I am trying to use wglGetGPUInfoAMD and wglGetGPUIDsAMD and I crash out when accessing these functions. This is under 10.9 and a Radeon 5870... I use GLEW 1.5.6 to setup the OpenGL extensions... using freeglut 2.6.

 

    GLuint gpuIDs[16] = {0};
    GLuint maxGpus = wglGetGPUIDsAMD(16, gpuIDs);
    GLint freeMem[4] = {0};
    glGetIntegerv(GL_TEXTURE_FREE_MEMORY_ATI, &freeMem[0]);
    availableMemory = freeMem[0] / 1024;
   
    if(wglGetGPUInfoAMD(gpuIDs[0], WGL_GPU_RAM_AMD, GL_UNSIGNED_INT, sizeof(GLuint), &totalMemory) == -1)
    {
        errorLog << "Error on ATI GPU Info Query for GPU RAM!" << std::endl;       
        totalMemory = 0;
    }
    if(wglGetGPUInfoAMD(gpuIDs[0], WGL_GPU_CLOCK_AMD, GL_UNSIGNED_INT, sizeof(GLuint), &clockSpeed) != 1)
    {
        errorLog << "Error on ATI GPU Info Query for GPU speed!" << std::endl;       
        clockSpeed = 0;
    }

 

Thanks

0 Likes
1 Reply
Mars_999
Journeyman III

Ugh anyone? Please can someone confirm this works?

 

 

0 Likes