瀏覽代碼

build on Cg versions prior to 2.2

David Rose 12 年之前
父節點
當前提交
f229da5468
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      panda/src/glstuff/glGraphicsStateGuardian_src.cxx

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

@@ -1795,6 +1795,7 @@ reset() {
   if (GLCAT.is_debug()) {
   if (GLCAT.is_debug()) {
     // Temp ifdef: this crashes Mesa.
     // Temp ifdef: this crashes Mesa.
 #ifndef OSMESA_MAJOR_VERSION
 #ifndef OSMESA_MAJOR_VERSION
+#if CG_VERSION_NUM >= 2200
     GLCAT.debug() << "Supported Cg profiles:\n";
     GLCAT.debug() << "Supported Cg profiles:\n";
     int num_profiles = cgGetNumSupportedProfiles();
     int num_profiles = cgGetNumSupportedProfiles();
     for (int i = 0; i < num_profiles; ++i) {
     for (int i = 0; i < num_profiles; ++i) {
@@ -1803,6 +1804,7 @@ reset() {
         GLCAT.debug() << "  " << cgGetProfileString(profile) << "\n";
         GLCAT.debug() << "  " << cgGetProfileString(profile) << "\n";
       }
       }
     }
     }
+#endif  // CG_VERSION_NUM >= 2200
 
 
     GLCAT.debug()
     GLCAT.debug()
       << "\nCg vertex profile = " << cgGetProfileString(vertex_profile) << "  id = " << vertex_profile
       << "\nCg vertex profile = " << cgGetProfileString(vertex_profile) << "  id = " << vertex_profile