Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 2 of 8 FirstFirst 1234 ... LastLast
Results 11 to 20 of 78

Thread: Ugly Core Profile Creation

  1. #11
    Intern Contributor
    Join Date
    May 2012
    Posts
    98
    Quote Originally Posted by Ilian Dinev View Post
    I bet you called glGetString(), though
    It's glGetError() what I'm calling. BTW this weird error I'm getting is when using core profile only. Another weird error the gDebugger cannot detect, but stops without reporting the reason. It only says First chance exception...

  2. #12
    Intern Contributor
    Join Date
    May 2012
    Posts
    98
    Ok problem solved. The big bug was hiding in the GLEW, it calls glGetString(GL_EXTENSIONS) on core profile...lol

  3. #13
    Advanced Member Frequent Contributor
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    892
    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.

  4. #14
    Intern Contributor
    Join Date
    May 2012
    Posts
    98
    I may run my own API function loader, but is there any gl.h and wgl.h updated to 4.2 API?

  5. #15
    Advanced Member Frequent Contributor Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    944
    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/

  6. #16
    Intern Contributor
    Join Date
    May 2012
    Posts
    98
    Thanks a lot!

  7. #17
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,421
    Quote Originally Posted by Janika View Post
    I may run my own API function loader, but is there any gl.h and wgl.h updated to 4.2 API?
    Here you go
    http://www.opengl.org/wiki/FAQ#Where...wnload.3F_.232
    ------------------------------
    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);

  8. #18
    Intern Contributor
    Join Date
    May 2012
    Posts
    98
    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.

  9. #19
    Advanced Member Frequent Contributor
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    892
    It cannot see any windows.h types, such as HGLDC, HDC, ...etc.
    Why do you need wglext.h?

  10. #20
    Intern Contributor
    Join Date
    May 2012
    Posts
    98
    Quote Originally Posted by thokra View Post
    Why do you need wglext.h?
    I need to load mainly the following wgl functions:

    wglMakeContextCurrent
    wglDeleteContext
    wglCreateContextAttribsARB
    wglChoosePixelFormatARB
    wglGetProcAddress

    And of course the macro defs/constants.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •