1. Jason McKesson
  2. glLoadGen
Issue #36 resolved

Major/minor GL version numbers reversed

geoff_wode
created an issue

In the generated 'gl' spec C file, the ogl_GetMajorVersion() function actually returns the minor number while ogl_GetMinorVersion() returns the major.

Using current download v1.0.4.

Command line:

lua52.exe LoadGen.lua gl_4.3 -spec=gl -version=4.3 -profile=core -style=pointer_c -indent=space

Generated code:

int ogl_GetMinorVersion()
{
    if(g_major_version == 0)
        GetGLVersion();
    return g_major_version; /* <<< should read 'g_minor_version' */
}
int ogl_GetMajorVersion()
{
    if(g_major_version == 0) //Yes, check the major version to get the minor one.
        GetGLVersion();
    return g_minor_version; /* <<< should read 'g_major_version' */
}

Thanks.

Comments (2)

  1. Log in to comment