Browse Source

protect for cg 1.x

David Rose 16 years ago
parent
commit
aa7a6bb5f7
1 changed files with 4 additions and 0 deletions
  1. 4 0
      panda/src/glstuff/glGraphicsStateGuardian_src.cxx

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

@@ -760,11 +760,15 @@ reset() {
     } else { 
     } else { 
       _shader_caps._active_vprofile = (int)cgGLGetLatestProfile(CG_GL_VERTEX);
       _shader_caps._active_vprofile = (int)cgGLGetLatestProfile(CG_GL_VERTEX);
       _shader_caps._active_fprofile = (int)cgGLGetLatestProfile(CG_GL_FRAGMENT);
       _shader_caps._active_fprofile = (int)cgGLGetLatestProfile(CG_GL_FRAGMENT);
+#ifdef CG_CL_GEOMETRY
       _shader_caps._active_gprofile = (int)cgGLGetLatestProfile(CG_GL_GEOMETRY);  // CG2 CHANGE
       _shader_caps._active_gprofile = (int)cgGLGetLatestProfile(CG_GL_GEOMETRY);  // CG2 CHANGE
+#endif
     }
     }
     _shader_caps._ultimate_vprofile = (int)CG_PROFILE_VP40;
     _shader_caps._ultimate_vprofile = (int)CG_PROFILE_VP40;
     _shader_caps._ultimate_fprofile = (int)CG_PROFILE_FP40;
     _shader_caps._ultimate_fprofile = (int)CG_PROFILE_FP40;
+#ifdef CG_PROFILE_GPU_CP
     _shader_caps._ultimate_gprofile = (int)CG_PROFILE_GPU_GP;   // CG2 CHANGE
     _shader_caps._ultimate_gprofile = (int)CG_PROFILE_GPU_GP;   // CG2 CHANGE
+#endif
     _glBindProgram = (PFNGLBINDPROGRAMARBPROC)
     _glBindProgram = (PFNGLBINDPROGRAMARBPROC)
       get_extension_func(GLPREFIX_QUOTED, "BindProgramARB");
       get_extension_func(GLPREFIX_QUOTED, "BindProgramARB");
     // Bug workaround for radeons.
     // Bug workaround for radeons.