Skip to content

Commit

Permalink
Merge pull request #72 from bullno1/fix-glsl_test
Browse files Browse the repository at this point in the history
Fix glsl_test for non-Apple platforms
  • Loading branch information
aras-p committed Oct 9, 2014
2 parents c0f043c + 716ab23 commit 8828115
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/glsl_optimizer_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,14 @@ static bool CheckGLSL (bool vertex, bool gles, const std::string& testName, cons
if (source.find("#version 140") != std::string::npos)
return true;
#endif

const bool need3 =
(source.find("#version 150") != std::string::npos) ||
(source.find("#version 300") != std::string::npos);

# ifdef __APPLE__
// Mac core context does not accept any older shader versions, so need to switch to
// either legacy context or core one.
const bool need3 =
(source.find("#version 150") != std::string::npos) ||
(source.find("#version 300") != std::string::npos);
if (need3)
{
if (!s_GL3Active)
Expand Down

0 comments on commit 8828115

Please sign in to comment.