mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
added GL_VERSION check
This commit is contained in:
parent
f6e76fe9b5
commit
356959952c
1 changed files with 8 additions and 1 deletions
|
|
@ -287,7 +287,14 @@ check_functions( const char *extensions )
|
|||
for (entry = functions; entry->name; entry++) {
|
||||
if (entry->name[0] == '-') {
|
||||
if (entry->name[1] == '1') {
|
||||
doTests = 1;
|
||||
/* check GL version X.Y */
|
||||
const char *version = (const char *) glGetString(GL_VERSION);
|
||||
if (version[0] == entry->name[1] &&
|
||||
version[1] == entry->name[2] &&
|
||||
version[2] >= entry->name[3])
|
||||
doTests = 1;
|
||||
else
|
||||
doTests = 0;
|
||||
}
|
||||
else {
|
||||
/* check if the named extension is available */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue