FIX: fix a shader loading failed issue on macos 11.x of m1 processor

Change-Id: I39a4d387a0c80743cd5b7a78547c416b387608fd
This commit is contained in:
lane.wei 2022-12-20 22:34:50 +08:00 committed by Lane.Wei
parent 030efb339a
commit 400ce3bcfd

View file

@ -72,7 +72,7 @@ std::pair<bool, std::string> GLShadersManager::init()
// triangle normals inside fragment shader have the right direction. // triangle normals inside fragment shader have the right direction.
if (platform_flavor() == PlatformFlavor::OSXOnArm && wxPlatformInfo::Get().GetOSMajorVersion() < 12) { if (platform_flavor() == PlatformFlavor::OSXOnArm && wxPlatformInfo::Get().GetOSMajorVersion() < 12) {
//if (GUI::wxGetApp().is_gl_version_greater_or_equal_to(3, 0)) //if (GUI::wxGetApp().is_gl_version_greater_or_equal_to(3, 0))
valid &= append_shader("mm_gouraud", {"mm_gouraud_130.vs", "mm_gouraud_130.fs"}, {"FLIP_TRIANGLE_NORMALS"sv}); valid &= append_shader("mm_gouraud", {"mm_gouraud_wireframe.vs", "mm_gouraud_wireframe.fs"}, {"FLIP_TRIANGLE_NORMALS"sv});
//else //else
// valid &= append_shader("mm_gouraud", {"mm_gouraud.vs", "mm_gouraud.fs"}, {"FLIP_TRIANGLE_NORMALS"sv}); // valid &= append_shader("mm_gouraud", {"mm_gouraud.vs", "mm_gouraud.fs"}, {"FLIP_TRIANGLE_NORMALS"sv});
} }