Browse Source

protect against old cg version

David Rose 12 years ago
parent
commit
ef6e88c8be
1 changed files with 2 additions and 0 deletions
  1. 2 0
      panda/src/glstuff/glGraphicsStateGuardian_src.cxx

+ 2 - 0
panda/src/glstuff/glGraphicsStateGuardian_src.cxx

@@ -943,9 +943,11 @@ reset() {
         // usually supported on all cards.
         _shader_caps._active_vprofile = (int)CG_PROFILE_GLSLV;
         _shader_caps._active_fprofile = (int)CG_PROFILE_GLSLF;
+#if CG_VERSION_NUM >= 2200
         if (cgGLIsProfileSupported(CG_PROFILE_GLSLG)) {
           _shader_caps._active_gprofile = (int)CG_PROFILE_GLSLG;
         }
+#endif
       }
     }
     _shader_caps._ultimate_vprofile = (int)CG_PROFILE_VP40;