[AD] [ alleg-Bugs-3016654 ] _al_ogl_version calculation results can be too high |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: noreply@xxxxxxxxxx
- Subject: [AD] [ alleg-Bugs-3016654 ] _al_ogl_version calculation results can be too high
- From: "SourceForge.net" <noreply@xxxxxxxxxx>
- Date: Sun, 27 Jun 2010 19:29:11 +0000
Bugs item #3016654, was opened at 2010-06-15 18:22
Message generated for change (Comment added) made by elias
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=3016654&group_id=5665
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core Library
Group: 4.9
Status: Open
Resolution: Accepted
Priority: 5
Private: No
Submitted By: Pekka Karjalainen (pekka4)
Assigned to: Nobody/Anonymous (nobody)
Summary: _al_ogl_version calculation results can be too high
Initial Comment:
The function _al_ogl_version() in src/opengl/extensions.c calculates a float value from the OpenGL version string and returns it. The calculation can result in too high a value. The relevant line is as follows in the version 4.9.20:
return major + minor1 / 10.f + minor2 / 100.f;
This is the version string (as returned by glGetString(GL_VERSION)) in one computer I use: "2.1.8087 Release". It results in the Allegro function calculating my OpenGL version as 82.97, while the function should return 2.1 or something slightly larger than that. One side effect resulting from this is that Allegro cannot find any GL extensions, because it tests for them with code that works only with OpenGL 3.0 or newer.
The simplest fix is to remove the minor2 value from the calculation completely.
----------------------------------------------------------------------
>Comment By: Elias Pschernig (elias)
Date: 2010-06-27 19:29
Message:
This should be fixed in revision 13413.
----------------------------------------------------------------------
Comment By: Milan Mimica (mmimica)
Date: 2010-06-15 19:25
Message:
Ah! That's a rather stupid one from me.
We cannot drop minor2 because there is OpenGL versions like 1.2.2.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=3016654&group_id=5665