Hi there,
The below function appears to be broken as it is incorrectly translating the result from glGetString(GL_VERSION).
On an iOS 15 iPad Pro, the result is:
OpenGL ES 3.0 Metal - 94.5
So, then the way the function is written, it returns a version equivalent to:
juce::Version{ 0, 0 }
As far as I can see, the develop branch hasn’t changed this function either.
Please let me know if the problem is actually on my side and how I can fix it.
Cheers
static Version getOpenGLVersion()
{
const auto* versionBegin = glGetString (GL_VERSION);
if (versionBegin == nullptr)
return {};
const auto* versionEnd = findNullTerminator (versionBegin);
const std::string versionString (versionBegin, versionEnd);
const auto spaceSeparated = StringArray::fromTokens (versionString.c_str(), false);
if (spaceSeparated.isEmpty())
return {};
const auto pointSeparated = StringArray::fromTokens (spaceSeparated[0], ".", "");
const auto major = pointSeparated[0].getIntValue();
const auto minor = pointSeparated[1].getIntValue();
return { major, minor };
}