Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 7 of 7

Thread: OpenGL extension

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2012
    Posts
    3

    OpenGL extension

    I'm using get proc address to get accesss to glGenTexturesEXT which is 1.2 and glClientActiveTextureARB which is 1.3. I get a NULL on the 1st one, GenTexture but the ActiveTexture call seems fine. This makes no sense. I've been using some demo apps in Render Monkey and it seems to be fine. I'm not sure why I have issues. If it was the OpenGL32.dll, then wouldn't Render Monkey have issues too? Any suggestions?

  2. #2
    Senior Member OpenGL Lord
    Join Date
    May 2009
    Posts
    5,977
    I'm using get proc address to get accesss to glGenTexturesEXT which is 1.2
    No. glGenTexturesEXT is an extension function. Furthermore, it's one you should never use; `glGenTextures` is core in GL 1.1, which is the minimum version of OpenGL you'll ever see.

    Similarly, you shouldn't use glClientActiveTextureARB; that was made core in GL 1.3, and you should just use the 1.3 function (without the suffix).

  3. #3
    Junior Member Newbie
    Join Date
    Aug 2012
    Posts
    3
    It's strange. The code worked fine under WinXP 32. I recently switched to Win7 64 and re-compiled the code. I also updated from VS 2005 to VS 2010. Now it does not work!!

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,786
    First things first. OS and compiler are completely irrelevant here - availability of OpenGL functionality depends on your hardware and drivers. So when you went to Windows 7 at the very least you got a different driver, and - if you also changed your PC at the time - you would have possibly also got different hardware.

    Secondly, GL_EXT_texture_object is a positively ancient extension (from 1995). No, it's not OpenGL 1.2; it's from OpenGL 1.0 - http://www.opengl.org/registry/specs...ure_object.txt. You should definitely NOT be using it, even if you previously had hardware or a driver that supported it. Texture objects went into the core specification in OpenGL 1.1 (in 1997) so unless you have a pathological desire to support hardware that's over 15 years old, dump it and use the core versions.

    Thirdly, using the extension versions of such common functionality is never a wise move. Drivers are under no obligation whatsoever to support extensions. For something as absolutely ubiquitous as texture objects a driver can just drop the -EXT versions of the entry points and still be fully conformant with the GL spec - that's the whole point of extensions; they're optional. In practice you don't see that happening with -ARB extensions, but for -EXT or vendor-specific extensions you should not be surprised.

    I would be astonished if RenderMonkey used glGenTexturesEXT internally; virtually nothing uses it, there's no reason to.

  5. #5
    Intern Contributor nigels's Avatar
    Join Date
    Apr 2000
    Location
    Texas, USA
    Posts
    87

    Lightbulb Use glewinfo

    I'd suggest running the glew tool bundled with GLEW to see what OpenGL is reporting in terms of GPU, available extensions and GL version.

    http://glew.sourceforge.net/

    - Nigel
    Last edited by nigels; 08-29-2012 at 07:17 AM. Reason: Left out GLEW url
    ---
    Regal - as OpenGL ought to be

  6. #6
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,256
    May I recommend that you at least use GL 2.1. All new video cards are GL 3.3 and GL 4.
    Even a GL 2.1 video card is ancient history now.
    Last edited by V-man; 08-30-2012 at 03:30 AM.
    ------------------------------
    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);

  7. #7
    Junior Member Newbie
    Join Date
    Aug 2012
    Posts
    3
    Quote Originally Posted by V-man View Post
    May I recommend that you at least use GL 2.1. All new video cards are GL 3.3 and GL 4.
    Even a GL 2.1 video card is ancient history now.
    Thanks for the help. The code was passed down to me. Changing the code to use newer GL calls is not a problem. However, the software has been running fine on other PC's. I fear I might have a negative impact on these "legacy" systems.

Posting Permissions

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