Results 1 to 8 of 8

Thread: GL says it is 1.2.1, but missing functions in dll

  1. #1
    Guest

    GL says it is 1.2.1, but missing functions in dll

    The version of OpenGL I am using on my laptop is supposed to version 1.2 that ships with windows NT/2000 since I have Windows XP.

    When I use glGetString(GL_VERSION) it returns "1.2.2"

    The problem:
    a) There is no glTexImage3D(...), even though it is a part of the specs for version 1.2

    I import it as follows:

    __declspec(dllimport) void _stdcall glTexImage3D(GLenum target,
    GLint level,
    GLenum internalformat,
    GLsizei width,
    GLsizei height,
    GLsizei depth,
    GLint border,
    GLenum format,
    GLenum type,
    const GLvoid* pixels);

    and the linker says it is an unresolved external.

    When I use Depends to view all of the exports in the dll, I do not see glTexImage3D, glTextSubImage3D, or any such thing.

    Any ideas on why? is the microsoft really ignoring the standards and calling the version 1.2.1 even though it is missing stuff?

  2. #2
    Guest

    Re: GL says it is 1.2.1, but missing functions in dll

    (I said 1.2.2 but meant 1.2.1)

    QUOTE]Originally posted by WonderingAboutTexture3D:
    The version of OpenGL I am using on my laptop is supposed to version 1.2 that ships with windows NT/2000 since I have Windows XP.

    When I use glGetString(GL_VERSION) it
    returns "1.2.2" <<----I mean "1.2.1"

    The problem:
    a) There is no glTexImage3D(...), even though it is a part of the specs for version 1.2

    I import it as follows:

    __declspec(dllimport) void _stdcall glTexImage3D(GLenum target,
    GLint level,
    GLenum internalformat,
    GLsizei width,
    GLsizei height,
    GLsizei depth,
    GLint border,
    GLenum format,
    GLenum type,
    const GLvoid* pixels);

    and the linker says it is an unresolved external.

    When I use Depends to view all of the exports in the dll, I do not see glTexImage3D, glTextSubImage3D, or any such thing.

    Any ideas on why? is the microsoft really ignoring the standards and calling the version 1.2.1 even though it is missing stuff?

    [/QUOTE]

  3. #3
    Citizen Thomas
    Guest

    Re: GL says it is 1.2.1, but missing functions in dll

    You might want to try something like this:

    typedef void (APIENTRY * PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);

    PFNGLTEXIMAGE3DPROC glTexImage3D;
    glTexImage3D = (PFNGLTEXIMAGE3DPROC)wglGetProcAddress("glTexImage 3D");

    That should help you avoid the unresolved external issue. Your glext.h file might already define "PFNGLTEXIMAGE3DPROC," if you got the file from your video card manufacturer. The one I have from NVidia defines function pointer typedefs like that for all the extensions available on the card.

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: GL says it is 1.2.1, but missing functions in dll

    The problem is not that the driver is missing your function. It's the import library you're likning to that's missing the function.

    The import library you link to, Microsofts software implementation, is stuck at OpenGL 1.1. To access functions in OpenGL 1.2 and later, aswell as extensions, you must load the functions manually from the driver, instead of letting the import library do it for you. To load the functions yourself, do as Citizen Thomas said.

  5. #5
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Nov 2010
    Posts
    2,466

    Re: GL says it is 1.2.1, but missing functions in dll

    >>The version of OpenGL I am using on my laptop is supposed to version 1.2 that ships with windows NT/2000 since I have Windows XP.<<

    first get new drivers

    second it should be there
    (i only know about nvidia cards)
    (3dtextures were the odd man out btw)
    anyways the extension mightnt be in the extension string but if the glstring version saiz 1.2+ u should be able to 'get it' nonetheless (itll be done in software though)

  6. #6
    Guest

    Re: GL says it is 1.2.1, but missing functions in dll

    The method is not returned in glGetString(GL_EXTENSION), using wglGetProcAddress returns NULL, using GetProcAddress with the HMODULE returns NULL, and yet glGetString(GL_VERSION) returns 1.2.1


  7. #7
    Senior Member Frequent Contributor
    Join Date
    Oct 2001
    Posts
    595

    Re: GL says it is 1.2.1, but missing functions in dll

    the extentionstring dont have to return the texture3d extention because it's maybe supported.. nVidia uses that sematic for most new things in the 1.2 and 1.3 versions of gl, that is if it's not reported as an Extention, but its there anyway (required core features) then it's not HW accelerated.

    And you cant get functions for newer versions than 1.1 through the getProcAdress, but you can get them trough wglGetProcAdress

  8. #8
    Guest

    Re: GL says it is 1.2.1, but missing functions in dll

    Yeah, I used wglGetProcAddress, I only tried the other version when that failed.

    Here is some of my code as it is right now:

    char* ext = (char*)glGetString(GL_EXTENSIONS);
    char* vnd = (char*)glGetString(GL_VENDOR);

    char* ver = (char*)glGetString(GL_VERSION);

    PFNGLTEXIMAGE3DPRC glTexImage3D = (PFNGLTEXIMAGE3DPRC)wglGetProcAddress("glTexImage3 D");

    When its done,
    glTexImage3D == NULL,
    ext == "...."
    vnd == "Trident"
    ver == "1.2.1"

Similar Threads

  1. Reinstalled GLM...warnings and missing functions?
    By PrestoChung in forum OpenGL: General
    Replies: 3
    Last Post: 05-17-2011, 04:11 AM
  2. Missing DSA functions
    By imported_Groovounet in forum OpenGL: General
    Replies: 6
    Last Post: 06-09-2010, 04:22 AM
  3. Why 3D texture functions are missing?
    By werewolf in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 12-29-2003, 12:22 PM
  4. missing functions
    By hellox in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-09-2002, 05:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean