Ok problem solved. The big bug was hiding in the GLEW, it calls glGetString(GL_EXTENSIONS) on core profile...lol
Yeah, but this isn't any news at all. It's widely known that GLEW isn't core profile ready and that the author(s) have has this on their todo list for a long time. Even AMD advertised against the use of GLEW when using the core profile. For a core GL ready loader you may want to try gl3w. It's totally sufficient for 99% of use cases.
I may run my own API function loader, but is there any gl.h and wgl.h updated to 4.2 API?
You actually need glext.h and wglext.h. The up-to-date version of those files can be found on http://www.opengl.org/registry/
Thanks a lot!
------------------------------
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
While struggling with running my own OpenGL API loader, I encountered a weird problem with wglext.h. It cannot see any windows.h types, such as HGLDC, HDC, ...etc. Besides there's still no clean gl.h for version 4.2. I have to use both gl3.h and glext.h to get all the required function pointer definitions.
Why do you need wglext.h?It cannot see any windows.h types, such as HGLDC, HDC, ...etc.