error with CG

hi all,
i m trying to run a code that uses nVidia cg …it compiles fine but when i try to run it …it shows following error…

“Neither arbvp1 or vp30 vertex profiles supported on this system”

i m using ati radeon 5470 M graphic card on my laptop…
plz help…

somebody please help …do i need to change my graphic card for nVidia CG or there is some setting in visual studio 2008…help needed badly…i already googled it but found no solution…

Do you have the GL cg Dlls on the system?

ya i definitely have them…!!

is there any problem with my graphic card…this gc supports OpenGL 3.2 and shader model 5.0 with directX 11…

I don’t know much about Cg but I suspect you may just need to specify a different shader profile. arbvp1 is the very very old original assembly language introduced with GeForce 3 level cards ( and should be considered hugely deprecated by now.

It also wouldn’t hurt to try running some demo applications just to confirm that all is well in driver land for you. The CodeSampler stuff is a little old now but the
Simple Vertex & Fragment Shader sample should be sufficient to confirm that you’ve got basic functionality working OK:

i tried Multitexturing with CG and Glslang codes…both compiled and ran fine…does that mean i should choose different vertex and fragment shader profiles …what profiles should i choose??
how would i get to know that which profiles are best suppoted on my system ??

Like I said, I don’t know much Cg so you’ll need to take what I say with a very large grain of salt. Going by the info provided at NVIDIA’s page here it appears as though your choices are somewhat limited, and anything beyond arbvp1 depends on vendor-specific NVIDIA extensions, although that information might be out of date and things might be different now.

Somebody who knows the facts more than I do would need to correct me on this.

If I was in your shoes I’d forget about using Cg altogether and just use GLSL instead.

Actually all the support i m getting for my project is written in nVidia CG. that’s why i am prefering Cg over GLSL…

Normally arbvp1 and arbfp1 should be supported. You can check this directly with

CGbool arbvp1_supported = cgIsProfileSupported(CG_PROFILE_ARBVP1);

On ATI cards, only these profiles and the GLSL profiles work. The other profiles are NVidia specific. You can try the glsl profiles (CG_PROFILE_GLSLV for vertex shaders and CG_PROFILE_GLSLF for fragment shaders). Then the CG code is compiled to GLSL. If you use them, make sure the vertex and fragment shaders are combined with cgCombinePrograms. Otherwise it will won’t work. A complete example is in the CG toolkit: CGToolkitInstallDir/examples/OpenGL/Advanced/combine_program

WOW !!! that just worked…

now a final question can you just plz tell me from where do i get 2 know that what functionalities are supported on these profiles…

thank you

I replied on the CG forums:

The list of currently supported Cg profiles:

  • Nigel