Actually I manage to create a working GL3.2 context a few minute ago
(test with simple GLSL 1.5 shader).
for any one who want to try this after calling glewInit(); to initialize all the function(the latest version of GLEW already support all GL3.2 function).
call this code to create OpenGL 3.2 context
this->currentContext = wglGetCurrentContext();
this->currentDC = wglGetCurrentDC();
int attribs =
PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB = NULL;
wglCreateContextAttribsARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC) wglGetProcAddress("wglCreateContextAttribsARB");
if(wglCreateContextAttribsARB != NULL)
MessageBox(NULL,"Found the goddamn function
ogl3Context = wglCreateContextAttribsARB(this->currentDC,0, attribs);
this->currentContext = ogl3Context;
currentContext and currentDC are declare as global/member to store current rendering context / HDC (I have to do this since I use GLFW)
The core profile work as expect , attemp to call deprecate function result in Invalid Operation error and GLSL compiler also refuse to compile GLSL 110/120 code.
The only thing still puzzle me is calling.
return major = 3 , minor = 1 but the driver allow me to create GL3.2 context anyway.
May be this is a bug since Catalyst 9.12 suppose to be support GL3.2 ?