"but no Cg support is enabled" at runtime

Return to Compiling or Editing the Panda Source

"but no Cg support is enabled" at runtime

Postby doorjuice » Tue Aug 03, 2010 3:28 pm

Hello all,

My work environment has recently been updated from panda 1.5 to 1.7, and i started getting the following error message (or rather, warning) at each and every frame rendered by panda:
"Tried to load Cg shader, but no Cg support is enabled."
(and indeed, the per-pixel lighting is disabled)

A quick Google search pinpoints this error message to the file at http://www.panda3d.org/reference/cxx/sh ... source.php (line 01653)
where it would seem that the library was compiled without the flag HAVE_CG set to 1 (although i'm pretty sure that our video cards support it, being mostly gtx260 and 470 and anyway, it worked on 1.5 before...)
However, i'm not the one who compiled/installed it, so i really have no idea why the flag was left out;
so my question is, is there any way to use Cg shaders anyway, or do we really have to recompile? also, is the HAVE_CG flag set by default in config.pp or it has to be a manual edit? Or maybe it's a prolem with the card's drivers?

Thanks!
doorjuice
 
Posts: 9
Joined: Thu Jul 08, 2010 11:23 am
Location: Montréal

Postby doorjuice » Tue Aug 03, 2010 3:43 pm

oh sorry, i just figured i should add a few more details:
the shaders i'm trying to run are the ones generated by the auto-shader, not custom ones;
also, we're running on fedora core 7/9 in the lab;
lastly, i have no idea how exactly Panda was installed, but my guess is that it was compiled from source of the 1.7 release on the website, not the svn build. It was however installed on a common "file server" and not locally on each machine, so that might have something to do with the problem (but i don't know the specifics of it)
doorjuice
 
Posts: 9
Joined: Thu Jul 08, 2010 11:23 am
Location: Montréal

Postby rdb » Wed Aug 04, 2010 1:36 am

It means it has been compiled without Cg support. You'll need to install a copy of Panda3D that is compiled against the Cg toolkit.

The builds you'll find on the download page are compiled with Cg support.
rdb
 
Posts: 9405
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Postby doorjuice » Mon Aug 09, 2010 9:12 am

Thanks, I haven't yet had the time to try it, but I noticed that that flag #define HAVE_CG wasn't even present in dtool/Config.pp for Panda1.7 (until referenced by #defer HAVE_CG anyway) so adding #define HAVE_CG 1 should fix my problem
doorjuice
 
Posts: 9
Joined: Thu Jul 08, 2010 11:23 am
Location: Montréal

Postby Beau » Thu Feb 02, 2012 5:29 am

Possible thread hijack, but for those trawling the forums looking for answers:

(Behaviour under Panda3D 1.7.2)
If you compile Panda3D with OpenGL but neglect to include Cg, then (funnily enough) GraphicsStateGuardian.getSupportsBasicShaders() will return false.

ie.
This is 'wrong'
Code: Select all
makepanda\makepanda.bat --nothing --use-gl ...otheroptions...


This is 'right'
Code: Select all
makepanda\makepanda.bat --nothing --use-gl --use-nvidiacg ...otheroptions...
User avatar
Beau
 
Posts: 4
Joined: Wed Feb 01, 2012 10:34 pm

Postby rdb » Thu Feb 02, 2012 7:29 am

Right, it's for historical reasons, as we originally only supported Cg.
rdb
 
Posts: 9405
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands


Return to Compiling or Editing the Panda Source

Who is online

Users browsing this forum: No registered users and 0 guests