Jump to content
  • Advertisement
Sign in to follow this  
EternityZA

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

This topic is 3772 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!