From 045f7acb41d727f621c326354cbfaab1a9c5e254 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 5 May 2010 15:19:41 +0000 Subject: [PATCH] Fix compilation error when compiling without support for Cg --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 6dccf8bee9..8da6ed8044 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -9588,21 +9588,22 @@ do_point_size() { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::get_supports_cg_profile // 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. //////////////////////////////////////////////////////////////////// bool CLP(GraphicsStateGuardian):: get_supports_cg_profile(const string &name) const { #ifndef HAVE_CG return false; -#endif +#else CGprofile profile = cgGetProfile(name.c_str()); - - if (profile ==CG_PROFILE_UNKNOWN) { + + if (profile == CG_PROFILE_UNKNOWN) { GLCAT.error() << name <<", unknown Cg-profile\n"; return false; } return cgGLIsProfileSupported(profile); +#endif } ////////////////////////////////////////////////////////////////////