IsVersionGEQ

Create issue
Issue #63 resolved
Zachary Lund created an issue

The IsVersionGEQ function in the CPP and C pointer styles are backwards.

if(g_major_version == 0)
    GetGLVersion();

if(majorVersion > g_major_version) return 1;
if(majorVersion < g_major_version) return 0;
if(minorVersion >= g_minor_version) return 1;
return 0;

If we feed this (2, 1) when we have version (4, 4), it will return false. g_major_version is the version of our context, so the first check to pass in this case would be "if (majorVersion < g_major_version) return 0;" which returns false.

Given I've had pull requests going on weeks now, I see no point in explicitly submitting pull requests. It's been fixed in the bleeding branch on my repository if someone would like to pull that in themselves.

Comments (2)

  1. Zachary Lund reporter

    I'll also add that if we have context version of 2.1 and we feed it (2, 1), it passes which isn't consistent. It's bad logic.

  2. Log in to comment