PDA

View Full Version : error with CG



abhishek bansal
10-09-2010, 12:57 PM
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...

abhishek bansal
10-16-2010, 09:50 AM
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....

BionicBytes
10-20-2010, 05:19 AM
Do you have the GL cg Dlls on the system?

abhishek bansal
10-20-2010, 05:41 AM
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..

mhagain
10-20-2010, 06:12 AM
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 (http://http.developer.nvidia.com/Cg/arbvp1.html) 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: http://www.codesampler.com/oglsrc/oglsrc_10.htm#ogl_glslang_simple_vs2ps.

abhishek bansal
10-20-2010, 06:20 AM
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: http://www.codesampler.com/oglsrc/oglsrc_10.htm#ogl_glslang_simple_vs2ps.

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 ??

mhagain
10-20-2010, 07:13 AM
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 (http://http.developer.nvidia.com/CgTutorial/cg_tutorial_chapter10.html) 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.

abhishek bansal
10-20-2010, 10:18 PM
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..

thekend
10-20-2010, 11:41 PM
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

abhishek bansal
10-21-2010, 01:35 AM
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).

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

thekend
10-21-2010, 02:15 AM
I replied on the CG forums: http://developer.nvidia.com/forums/index.php?showtopic=5260&pid=16154&st=0&#entry1615 4

nigels
10-21-2010, 07:38 AM
Going by the info provided at NVIDIA's page here (http://http.developer.nvidia.com/CgTutorial/cg_tutorial_chapter10.html) it appears as though your choices are somewhat limited...

The list of currently supported Cg profiles:
http://http.developer.nvidia.com/Cg/index_profiles.html

- Nigel