I have tried PerfStudio 2 version 2.2.791 (ATI).
i have this error in the server log:
OGLWrapper: Cannot make context current; it does not exist (we probably missed the createcontext call)
MakeCurrent failed on hGLRC: 0x00010001
Maybe my OpenGL 3.1 context creation is bad ?
// Create a window compatible with OpenGL 1.1
if(!mainGLWindow.Create("GLAn8Viewer",640,480,32,false,WS_OVERLAPPEDWINDOW,WndProc))
{
MessageBox(NULL,"Can't create the window.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return 0;
}
GLenum err = glewInit();
if (GLEW_OK != err)
{
char buffer[2048];
sprintf(buffer,"%s",glewGetErrorString(err));
MessageBox(NULL,buffer,"ERROR",MB_OK|MB_ICONEXCLAMATION);
}
int useGL3 = MessageBox(mainGLWindow.hWnd,"Do you want to use OpenGL 3.1 core ?","Information",MB_YESNO |MB_ICONEXCLAMATION);
if( WGL_ARB_create_context && useGL3 == 6 )
{
HGLRC hRC;
int attribList[] =
{
WGL_CONTEXT_MAJOR_VERSION_ARB, 3,
WGL_CONTEXT_MINOR_VERSION_ARB, 1,
WGL_CONTEXT_FLAGS_ARB, WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB,
0, 0
};
// Try OpenGL 3.1
if (!(hRC = wglCreateContextAttribsARB(mainGLWindow.hDC, 0, attribList)))
{
MessageBox(NULL,"OpenGL 3.1 context is not supported by your system.
An OpenGL 3.0 context will be tried to be created instead.","Information",MB_OK|MB_ICONEXCLAMATION);
// Try OpenGL 3.0
attribList[3] = 0;
if (!(hRC = wglCreateContextAttribsARB(mainGLWindow.hDC, 0, attribList)))
MessageBox(NULL,"OpenGL 3.0 context is not supported by your system.
An OpenGL 2.x context will be used instead.","Information",MB_OK|MB_ICONEXCLAMATION);
else
SetWindowText(mainGLWindow.hWnd,"GLAn8Viewer - Using OpenGL 3.0");
}
else
{
SetWindowText(mainGLWindow.hWnd,"GLAn8Viewer - Using OpenGL 3.1");
}
if (!wglMakeCurrent(mainGLWindow.hDC, hRC))
MessageBox(NULL,"wglMakeCurrent() failed for OpenGL 3.x context.","Information",MB_OK|MB_ICONEXCLAMATION);
wglDeleteContext(mainGLWindow.hRC);
mainGLWindow.hRC = hRC;
}
else
{
SetWindowText(mainGLWindow.hWnd,"GLAn8Viewer - Using OpenGL 2");
}