"CG ERROR : The profile is not supported." occurs no matter what i make the profile

Started by
3 comments, last by Wilhelm van Huyssteen 15 years, 11 months ago
hello, im completely new to CG and also stil relatively new to Opengl i was hoping someone could help me with this problem (GPU: ATI RX1600XT <- and im not proud to say it) the 3D engine that im currently writing has progressed to the extent that i now want to try and add CG to it, ive spent the last 2 days googling up articles and tutorials about it and i understand the concept but im yet to get even the simplest of examples working. all the code i copied from tutorials to load simple vertex programs generate the folowing error "CG ERROR : The profile is not supported." most tutorials use CG_PROFILE_VP20 which i guess is the simplest widest supported one and changing that makes no difference btw i use java together with the JOGL binding but i think/hope that it makes no diference any suggestions greatly apreciated for the curious here is a screenshot of my engine so far with some models that i typed out in notepad and some sword models that i extracted and converted from Final Fantasy 7 http://img519.imageshack.us/img519/7369/82820204ng7.jpg
Advertisement
Quote:
all the code i copied from tutorials

Theres your problem right there! You would expect it to work, and when it doesn't theres no way for you to know why.
Instead I recommend you learn Cg itself and try writing a simple shader of your own.
FYI I have run into the "profile not supported" problem before. Sometimes it really means that the program could not be compiled under that profile because it uses too many instructions or unavailable functions. But mostly it means you are calling into another piece of Cg code (another function) in which there is an error, and (I guess) the compiler could not resolve what it actually was. I have had all sorts of different errors cause "profile not supported".
nVidia has a Cg forum which is active and well monitored by nVidias developers, you could try there. I would also be interested to know their explanation of the poor error resolution!
ok il check that out.. nou just one other thing that bothers me

this compiles in my program



void main(float2 position : POSITION,
out float4 positionO : POSITION,
out float4 color : COLOR)
{
positionO = float4(position, 0, 1);
color = float4(0, 1, 0, 1);
}



but this does not compile




struct C2E1v_Output {

float4 position : POSITION;
float4 color : COLOR;

};
C2E1v_Output main(float2 position : POSITION)
{
C2E1v_Output OUT;
OUT.position = float4(position, 0, 1);
OUT.color = float4(0, 1, 0, 1); // RGBA green
return OUT;
}



the latter one is one i found on nvidia's website the first one i made by changing the origanel one into that format since i saw it in some random tutorial and as far as i can tell by just looking at it these to programs should do the same thing but only one of them works. could someone maybe try and explain to me the difference in these two vertex programs and maybe if possible a reason why the one from nvidias site does not compile
Well I don't know about that, I never use structures for shader parameters, but if no one here can answer I would suggest the nVidia Cg forum.
You could try (and its just a guess):
C2E1v_Output main(in float2 position : POSITION)
Note the "in" flag to tell the compiler the variable is input only.
k both of them is compiling now, now i just need to figure out my origanel problem which i gues lies with my actual java code

thnx for the help

[Edited by - EternityZA on May 30, 2008 5:29:10 AM]

This topic is closed to new replies.

Advertisement