mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-05 03:15:07 -04:00
Fix compilation error when compiling without support for Cg
This commit is contained in:
parent
01b720ceb9
commit
045f7acb41
@ -9588,21 +9588,22 @@ do_point_size() {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: GLGraphicsStateGuardian::get_supports_cg_profile
|
// Function: GLGraphicsStateGuardian::get_supports_cg_profile
|
||||||
// Access: Public, Virtual
|
// Access: Public, Virtual
|
||||||
// Description: Returns true if this particular GSG supports the
|
// Description: Returns true if this particular GSG supports the
|
||||||
// specified Cg Shader Profile.
|
// specified Cg Shader Profile.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
bool CLP(GraphicsStateGuardian)::
|
bool CLP(GraphicsStateGuardian)::
|
||||||
get_supports_cg_profile(const string &name) const {
|
get_supports_cg_profile(const string &name) const {
|
||||||
#ifndef HAVE_CG
|
#ifndef HAVE_CG
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#else
|
||||||
CGprofile profile = cgGetProfile(name.c_str());
|
CGprofile profile = cgGetProfile(name.c_str());
|
||||||
|
|
||||||
if (profile ==CG_PROFILE_UNKNOWN) {
|
if (profile == CG_PROFILE_UNKNOWN) {
|
||||||
GLCAT.error() << name <<", unknown Cg-profile\n";
|
GLCAT.error() << name <<", unknown Cg-profile\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return cgGLIsProfileSupported(profile);
|
return cgGLIsProfileSupported(profile);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user