mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-11 23:54:18 +00:00
Better parsing of openGL SL version number.
This commit is contained in:
parent
aeb6657cb4
commit
35fd84cc52
2 changed files with 2 additions and 13 deletions
|
|
@ -810,11 +810,7 @@ struct OpenGLDemoClasses
|
|||
attributes = new Attributes (openGLContext, *shader);
|
||||
uniforms = new Uniforms (openGLContext, *shader);
|
||||
|
||||
#if ! JUCE_OPENGL_ES
|
||||
statusText = "GLSL: v" + String (OpenGLShaderProgram::getLanguageVersion(), 2);
|
||||
#else
|
||||
statusText = "GLSL ES";
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -54,15 +54,8 @@ void OpenGLShaderProgram::release() noexcept
|
|||
|
||||
double OpenGLShaderProgram::getLanguageVersion()
|
||||
{
|
||||
#if JUCE_OPENGL_ES
|
||||
// GLES doesn't support this version number, but that shouldn't matter since
|
||||
// on GLES you probably won't need to check it.
|
||||
jassertfalse;
|
||||
return 0;
|
||||
#else
|
||||
return String ((const char*) glGetString (GL_SHADING_LANGUAGE_VERSION))
|
||||
.upToFirstOccurrenceOf (" ", false, false).getDoubleValue();
|
||||
#endif
|
||||
return String::fromUTF8 ((const char*) glGetString (GL_SHADING_LANGUAGE_VERSION))
|
||||
.retainCharacters("1234567890.").getDoubleValue();
|
||||
}
|
||||
|
||||
bool OpenGLShaderProgram::addShader (const String& code, GLenum type)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue