Formatting.
This commit is contained in:
parent
76bd8b79b6
commit
0f1ab5317f
20
src/opengl.c
20
src/opengl.c
@ -45,10 +45,10 @@ static GLboolean parseGLVersion(int* major, int* minor, int* rev)
|
|||||||
const char* version;
|
const char* version;
|
||||||
const char* prefixes[] =
|
const char* prefixes[] =
|
||||||
{
|
{
|
||||||
"OpenGL ES-CM ",
|
"OpenGL ES-CM ",
|
||||||
"OpenGL ES-CL ",
|
"OpenGL ES-CL ",
|
||||||
"OpenGL ES ",
|
"OpenGL ES ",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
version = (const char*) glGetString(GL_VERSION);
|
version = (const char*) glGetString(GL_VERSION);
|
||||||
@ -61,13 +61,13 @@ static GLboolean parseGLVersion(int* major, int* minor, int* rev)
|
|||||||
|
|
||||||
for (i = 0; prefixes[i]; i++)
|
for (i = 0; prefixes[i]; i++)
|
||||||
{
|
{
|
||||||
const size_t length = strlen(prefixes[i]);
|
const size_t length = strlen(prefixes[i]);
|
||||||
|
|
||||||
if (strncmp(version, prefixes[i], length) == 0)
|
if (strncmp(version, prefixes[i], length) == 0)
|
||||||
{
|
{
|
||||||
version += length;
|
version += length;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!sscanf(version, "%d.%d.%d", &_major, &_minor, &_rev))
|
if (!sscanf(version, "%d.%d.%d", &_major, &_minor, &_rev))
|
||||||
|
Loading…
Reference in New Issue
Block a user